linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Christophe Leroy <christophe.leroy@csgroup.eu>
To: "paulmck@kernel.org" <paulmck@kernel.org>,
	kernel test robot <lkp@intel.com>
Cc: Frederic Weisbecker <frederic@kernel.org>,
	"kbuild-all@lists.01.org" <kbuild-all@lists.01.org>,
	Linux Memory Management List <linux-mm@kvack.org>,
	Nicolas Saenz Julienne <nsaenzju@redhat.com>
Subject: Re: [linux-next:master 4204/5575] arch/powerpc/kernel/interrupt.c:542:55: error: suggest braces around empty body in an 'if' statement
Date: Fri, 24 Jun 2022 05:47:54 +0000	[thread overview]
Message-ID: <fc18f95d-d52b-f539-12cd-cd530dea815e@csgroup.eu> (raw)
In-Reply-To: <20220624025240.GM1790663@paulmck-ThinkPad-P17-Gen-1>



Le 24/06/2022 à 04:52, Paul E. McKenney a écrit :
> On Thu, Jun 23, 2022 at 04:50:49PM +0800, kernel test robot wrote:
>> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
>> head:   08897940f458ee55416cf80ab13d2d8b9f20038e
>> commit: 620ac34fef9e21aa2fd4aed6e01eed2e4fc605d4 [4204/5575] context_tracking: Convert state to atomic_t
>> config: powerpc-mgcoge_defconfig (https://download.01.org/0day-ci/archive/20220623/202206231654.cuANhsQq-lkp@intel.com/config)
>> compiler: powerpc-linux-gcc (GCC) 11.3.0
>> reproduce (this is a W=1 build):
>>          wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
>>          chmod +x ~/bin/make.cross
>>          # https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=620ac34fef9e21aa2fd4aed6e01eed2e4fc605d4
>>          git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
>>          git fetch --no-tags linux-next master
>>          git checkout 620ac34fef9e21aa2fd4aed6e01eed2e4fc605d4
>>          # save the config file
>>          mkdir build_dir && cp config build_dir/.config
>>          COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.3.0 make.cross W=1 O=build_dir ARCH=powerpc SHELL=/bin/bash arch/powerpc/kernel/
>>
>> If you fix the issue, kindly add following tag where applicable
>> Reported-by: kernel test robot <lkp@intel.com>
>>
>> All errors (new ones prefixed by >>):
>>
>>     arch/powerpc/kernel/interrupt.c: In function 'interrupt_exit_kernel_prepare':
>>>> arch/powerpc/kernel/interrupt.c:542:55: error: suggest braces around empty body in an 'if' statement [-Werror=empty-body]
>>       542 |                 CT_WARN_ON(ct_state() == CONTEXT_USER);
>>           |                                                       ^
>>     cc1: all warnings being treated as errors
> 
> This is a bit odd, and perhaps should instead be written as follows:
> 
> 	WARN_ON_ONCE(TRAP(regs) != INTERRUPT_PROGRAM && CT_WARN_ON(ct_state() == CONTEXT_USER));
> 
> But this code has been around for awhile, and was not changed by the
> commit called out above.  I will let the PowerPC guys choose what they
> want to do with it.


The commit called out above did a change. It added:

	#define CT_WARN_ON(cond)

When CONFIG_CONTEXT_TRACKING_USER is not defined


That change is wrong, it should be:

	#define CT_WARN_ON(cond)	do { } while (0)


Christophe

  reply	other threads:[~2022-06-24  5:47 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-23  8:50 kernel test robot
2022-06-24  2:52 ` Paul E. McKenney
2022-06-24  5:47   ` Christophe Leroy [this message]
2022-06-24 12:57     ` Paul E. McKenney

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=fc18f95d-d52b-f539-12cd-cd530dea815e@csgroup.eu \
    --to=christophe.leroy@csgroup.eu \
    --cc=frederic@kernel.org \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-mm@kvack.org \
    --cc=lkp@intel.com \
    --cc=nsaenzju@redhat.com \
    --cc=paulmck@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox