From: Jani Nikula <jani.nikula@intel.com>
To: kbuild test robot <lkp@intel.com>
Cc: kbuild-all@01.org, linux-kernel@vger.kernel.org,
Andrew Morton <akpm@linux-foundation.org>,
Chris Wilson <chris@chris-wilson.co.uk>
Subject: Re: [PATCH] log2: make is_power_of_2() integer constant expression when possible
Date: Mon, 04 Mar 2019 13:47:17 +0200 [thread overview]
Message-ID: <87o96qn9oa.fsf@intel.com> (raw)
In-Reply-To: <201903041956.eLAFVhUK%fengguang.wu@intel.com>
On Mon, 04 Mar 2019, kbuild test robot <lkp@intel.com> wrote:
> Hi Jani,
>
> I love your patch! Perhaps something to improve:
>
> [auto build test WARNING on linus/master]
> [also build test WARNING on v5.0 next-20190301]
> [if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
>
> url: https://github.com/0day-ci/linux/commits/Jani-Nikula/log2-make-is_power_of_2-integer-constant-expression-when-possible/20190304-153529
> config: microblaze-mmu_defconfig (attached as .config)
> compiler: microblaze-linux-gcc (GCC) 8.2.0
> reproduce:
> wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
> chmod +x ~/bin/make.cross
> # save the attached .config to linux build tree
> GCC_VERSION=8.2.0 make.cross ARCH=microblaze
>
> All warnings (new ones prefixed by >>):
>
>>> arch/microblaze/mm/pgtable.c:185: warning: "is_power_of_2" redefined
> #define is_power_of_2(x) ((x) != 0 && (((x) & ((x) - 1)) == 0))
Oh wow, a copy of is_power_of_2() introduced 10 years ago, apparently
unused since its introduction.
BR,
Jani.
>
> In file included from include/linux/kernel.h:12,
> from arch/microblaze/mm/pgtable.c:30:
> include/linux/log2.h:56: note: this is the location of the previous definition
> #define is_power_of_2(n) \
>
>
> vim +/is_power_of_2 +185 arch/microblaze/mm/pgtable.c
>
> 15902bf6 Michal Simek 2009-05-26 183
> 15902bf6 Michal Simek 2009-05-26 184 /* is x a power of 2? */
> 15902bf6 Michal Simek 2009-05-26 @185 #define is_power_of_2(x) ((x) != 0 && (((x) & ((x) - 1)) == 0))
> 15902bf6 Michal Simek 2009-05-26 186
>
> :::::: The code at line 185 was first introduced by commit
> :::::: 15902bf63c8332946e5a1f48a72e3ae22874b11b microblaze_mmu_v2: Page table - ioremap - pgtable.c/h, section update
>
> :::::: TO: Michal Simek <monstr@monstr.eu>
> :::::: CC: Michal Simek <monstr@monstr.eu>
>
> ---
> 0-DAY kernel test infrastructure Open Source Technology Center
> https://lists.01.org/pipermail/kbuild-all Intel Corporation
--
Jani Nikula, Intel Open Source Graphics Center
prev parent reply other threads:[~2019-03-04 11:45 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-01 12:52 [PATCH] log2: make is_power_of_2() integer constant expression when possible Jani Nikula
2019-03-01 13:07 ` Chris Wilson
2019-03-01 20:26 ` Andrew Morton
2019-03-04 10:16 ` Jani Nikula
[not found] ` <201903041956.eLAFVhUK%fengguang.wu@intel.com>
2019-03-04 11:47 ` Jani Nikula [this message]
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=87o96qn9oa.fsf@intel.com \
--to=jani.nikula@intel.com \
--cc=akpm@linux-foundation.org \
--cc=chris@chris-wilson.co.uk \
--cc=kbuild-all@01.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lkp@intel.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.