openbmc.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Eddie James <eajames@linux.ibm.com>, linux-kernel@vger.kernel.org
Cc: linux-hwmon@vger.kernel.org, jdelvare@suse.com,
	kbuild-all@lists.01.org, openbmc@lists.ozlabs.org,
	Eddie James <eajames@linux.ibm.com>,
	clang-built-linux@googlegroups.com, linux@roeck-us.net,
	linux-fsi@lists.ozlabs.org
Subject: Re: [PATCH 2/3] hwmon: (occ) Remove sequence numbering and checksum calculation
Date: Mon, 19 Jul 2021 04:08:14 +0800	[thread overview]
Message-ID: <202107190411.8vF4LQnA-lkp@intel.com> (raw)
In-Reply-To: <20210716151850.28973-3-eajames@linux.ibm.com>

[-- Attachment #1: Type: text/plain, Size: 4362 bytes --]

Hi Eddie,

I love your patch! Perhaps something to improve:

[auto build test WARNING on hwmon/hwmon-next]
[also build test WARNING on linux/master linus/master v5.14-rc1 next-20210716]
[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]

url:    https://github.com/0day-ci/linux/commits/Eddie-James/OCC-fsi-and-hwmon-Set-sequence-number-in-submit-interface/20210718-103535
base:   https://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging.git hwmon-next
config: arm-randconfig-r033-20210718 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 5d5b08761f944d5b9822d582378333cc4b36a0a7)
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 arm cross compiling tool for clang build
        # apt-get install binutils-arm-linux-gnueabi
        # https://github.com/0day-ci/linux/commit/5e8ecc23325ef0310d83a4520071aae18418f88a
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Eddie-James/OCC-fsi-and-hwmon-Set-sequence-number-in-submit-interface/20210718-103535
        git checkout 5e8ecc23325ef0310d83a4520071aae18418f88a
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All warnings (new ones prefixed by >>):

>> drivers/hwmon/occ/p8_i2c.c:104:23: warning: comparison of distinct pointer types ('typeof (len) *' (aka 'unsigned int *') and 'typeof (4UL) *' (aka 'unsigned long *')) [-Wcompare-distinct-pointer-types]
           memcpy(&data0, data, min(len, 4UL));
                                ^~~~~~~~~~~~~
   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)))
                      ~~~~~~~~~~~~~~ ^  ~~~~~~~~~~~~~~
   drivers/hwmon/occ/p8_i2c.c:107:28: warning: comparison of distinct pointer types ('typeof (len) *' (aka 'unsigned int *') and 'typeof (4UL) *' (aka 'unsigned long *')) [-Wcompare-distinct-pointer-types]
                   memcpy(&data1, data + 4, min(len, 4UL));
                                            ^~~~~~~~~~~~~
   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 warnings generated.


vim +104 drivers/hwmon/occ/p8_i2c.c

    98	
    99	static int p8_i2c_occ_putscom_be(struct i2c_client *client, u32 address,
   100					 u8 *data, size_t len)
   101	{
   102		__be32 data0 = 0, data1 = 0;
   103	
 > 104		memcpy(&data0, data, min(len, 4UL));
   105		if (len > 4UL) {
   106			len -= 4;
   107			memcpy(&data1, data + 4, min(len, 4UL));
   108		}
   109	
   110		return p8_i2c_occ_putscom_u32(client, address, be32_to_cpu(data0),
   111					      be32_to_cpu(data1));
   112	}
   113	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 34688 bytes --]

  parent reply	other threads:[~2021-07-18 20:10 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-16 15:18 [PATCH 0/3] OCC: fsi and hwmon: Set sequence number in submit interface Eddie James
2021-07-16 15:18 ` [PATCH 1/3] fsi: occ: Force sequence numbering per OCC Eddie James
2021-07-21  2:37   ` Joel Stanley
2021-07-21 13:27     ` Eddie James
2021-07-16 15:18 ` [PATCH 2/3] hwmon: (occ) Remove sequence numbering and checksum calculation Eddie James
2021-07-17 14:04   ` Guenter Roeck
2021-07-18 20:08   ` kernel test robot [this message]
2021-07-18 20:26   ` kernel test robot
2021-07-21  2:43   ` Joel Stanley
2021-07-21 13:41     ` Eddie James
2021-07-16 15:18 ` [PATCH 3/3] fsi: occ: Add dynamic debug to dump command and response Eddie James
2021-07-19  0:26   ` kernel test robot
2021-07-21 23:28   ` Jeremy Kerr

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=202107190411.8vF4LQnA-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=clang-built-linux@googlegroups.com \
    --cc=eajames@linux.ibm.com \
    --cc=jdelvare@suse.com \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-fsi@lists.ozlabs.org \
    --cc=linux-hwmon@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=openbmc@lists.ozlabs.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;
as well as URLs for NNTP newsgroup(s).