From: kernel test robot <lkp@intel.com>
To: KaiLong Wang <wangkailong@jari.cn>,
mpe@ellerman.id.au, npiggin@gmail.com,
christophe.leroy@csgroup.eu, farosas@linux.ibm.com,
mirq-linux@rere.qmqm.pl, dmitry.osipenko@collabora.com,
kda@linux-powerpc.org, naveen.n.rao@linux.vnet.ibm.com
Cc: llvm@lists.linux.dev, linuxppc-dev@lists.ozlabs.org,
linux-kernel@vger.kernel.org, oe-kbuild-all@lists.linux.dev
Subject: Re: [PATCH] powerpc: replace ternary operator with min()
Date: Wed, 26 Oct 2022 20:07:02 +0800 [thread overview]
Message-ID: <202210261921.YmXQfwZR-lkp@intel.com> (raw)
In-Reply-To: <4ebda26c.346.18404df6852.Coremail.wangkailong@jari.cn>
[-- Attachment #1: Type: text/plain, Size: 4476 bytes --]
Hi KaiLong,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on powerpc/next]
[also build test ERROR on linus/master v6.1-rc2 next-20221026]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/KaiLong-Wang/powerpc-replace-ternary-operator-with-min/20221023-204906
base: https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git next
patch link: https://lore.kernel.org/r/4ebda26c.346.18404df6852.Coremail.wangkailong%40jari.cn
patch subject: [PATCH] powerpc: replace ternary operator with min()
config: powerpc-ppc64e_defconfig (attached as .config)
compiler: clang version 16.0.0 (https://github.com/llvm/llvm-project 791a7ae1ba3efd6bca96338e10ffde557ba83920)
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
# install powerpc cross compiling tool for clang build
# apt-get install binutils-powerpc-linux-gnu
# https://github.com/intel-lab-lkp/linux/commit/51fa624eb9fa01ea67de462263913ab61a68cbc5
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review KaiLong-Wang/powerpc-replace-ternary-operator-with-min/20221023-204906
git checkout 51fa624eb9fa01ea67de462263913ab61a68cbc5
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=powerpc SHELL=/bin/bash
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/xmon/xmon.c:2583:7: error: comparison of distinct pointer types ('typeof (n) *' (aka 'long *') and 'typeof (16) *' (aka 'int *')) [-Werror,-Wcompare-distinct-pointer-types]
r = min(n, 16);
^~~~~~~~~~
include/linux/minmax.h:45:19: note: expanded from macro 'min'
#define min(x, y) __careful_cmp(x, y, <)
^~~~~~~~~~~~~~~~~~~~~~
include/linux/minmax.h:36:24: note: expanded from macro '__careful_cmp'
__builtin_choose_expr(__safe_cmp(x, y), \
^~~~~~~~~~~~~~~~
include/linux/minmax.h:26:4: note: expanded from macro '__safe_cmp'
(__typecheck(x, y) && __no_side_effects(x, y))
^~~~~~~~~~~~~~~~~
include/linux/minmax.h:20:28: note: expanded from macro '__typecheck'
(!!(sizeof((typeof(x) *)1 == (typeof(y) *)1)))
~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~
arch/powerpc/xmon/xmon.c:2987:7: error: comparison of distinct pointer types ('typeof (n) *' (aka 'long *') and 'typeof (16) *' (aka 'int *')) [-Werror,-Wcompare-distinct-pointer-types]
r = min(n, 16);
^~~~~~~~~~
include/linux/minmax.h:45:19: note: expanded from macro 'min'
#define min(x, y) __careful_cmp(x, y, <)
^~~~~~~~~~~~~~~~~~~~~~
include/linux/minmax.h:36:24: note: expanded from macro '__careful_cmp'
__builtin_choose_expr(__safe_cmp(x, y), \
^~~~~~~~~~~~~~~~
include/linux/minmax.h:26:4: note: expanded from macro '__safe_cmp'
(__typecheck(x, y) && __no_side_effects(x, y))
^~~~~~~~~~~~~~~~~
include/linux/minmax.h:20:28: note: expanded from macro '__typecheck'
(!!(sizeof((typeof(x) *)1 == (typeof(y) *)1)))
~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~
2 errors generated.
vim +2583 arch/powerpc/xmon/xmon.c
2576
2577 static void xmon_rawdump (unsigned long adrs, long ndump)
2578 {
2579 long n, m, r, nr;
2580 unsigned char temp[16];
2581
2582 for (n = ndump; n > 0;) {
> 2583 r = min(n, 16);
2584 nr = mread(adrs, temp, r);
2585 adrs += nr;
2586 for (m = 0; m < r; ++m) {
2587 if (m < nr)
2588 printf("%.2x", temp[m]);
2589 else
2590 printf("%s", fault_chars[fault_type]);
2591 }
2592 n -= r;
2593 if (nr < r)
2594 break;
2595 }
2596 printf("\n");
2597 }
2598
--
0-DAY CI Kernel Test Service
https://01.org/lkp
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 21814 bytes --]
prev parent reply other threads:[~2022-10-26 12:09 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-23 12:44 [PATCH] powerpc: replace ternary operator with min() KaiLong Wang
2022-10-24 4:33 ` Russell Currey
2022-11-02 9:23 ` Christophe Leroy
2022-10-26 12:07 ` kernel test robot [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=202210261921.YmXQfwZR-lkp@intel.com \
--to=lkp@intel.com \
--cc=christophe.leroy@csgroup.eu \
--cc=dmitry.osipenko@collabora.com \
--cc=farosas@linux.ibm.com \
--cc=kda@linux-powerpc.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=llvm@lists.linux.dev \
--cc=mirq-linux@rere.qmqm.pl \
--cc=mpe@ellerman.id.au \
--cc=naveen.n.rao@linux.vnet.ibm.com \
--cc=npiggin@gmail.com \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=wangkailong@jari.cn \
/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;
as well as URLs for NNTP newsgroup(s).