mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: kbuild test robot <lkp@intel.com>
To: Moritz Fischer <moritz.fischer@ettus.com>
Cc: kbuild-all@01.org, linux-kernel@vger.kernel.org,
	bleung@chromium.org, enric.balletbo@collabora.com,
	groeck@chromium.org, lee.jones@linaro.org, moritz@ettus.com,
	Moritz Fischer <mdf@kernel.org>
Subject: Re: [PATCH v2] platform/chrome: Add cros_ec_readmem() helpers for I2C/SPI based ECs
Date: Tue, 8 Jan 2019 19:23:34 +0800	[thread overview]
Message-ID: <201901081949.ojjEUz9I%fengguang.wu@intel.com> (raw)
In-Reply-To: <20190108035638.9685-1-moritz.fischer@ettus.com>

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

Hi Moritz,

I love your patch! Perhaps something to improve:

[auto build test WARNING on linus/master]
[also build test WARNING on v5.0-rc1 next-20190108]
[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/Moritz-Fischer/platform-chrome-Add-cros_ec_readmem-helpers-for-I2C-SPI-based-ECs/20190108-184758
config: x86_64-randconfig-x005-201901 (attached as .config)
compiler: gcc-7 (Debian 7.3.0-1) 7.3.0
reproduce:
        # save the attached .config to linux build tree
        make ARCH=x86_64 

All warnings (new ones prefixed by >>):

   In file included from include/linux/list.h:9:0,
                    from include/linux/kobject.h:19,
                    from include/linux/cdev.h:5,
                    from include/linux/mfd/cros_ec.h:19,
                    from drivers/platform/chrome/cros_ec_proto.c:17:
   drivers/platform/chrome/cros_ec_proto.c: In function 'cros_ec_readmem':
   include/linux/kernel.h:846:29: warning: comparison of distinct pointer types lacks a cast
      (!!(sizeof((typeof(x) *)1 == (typeof(y) *)1)))
                                ^
   include/linux/kernel.h:860:4: note: in expansion of macro '__typecheck'
      (__typecheck(x, y) && __no_side_effects(x, y))
       ^~~~~~~~~~~
   include/linux/kernel.h:870:24: note: in expansion of macro '__safe_cmp'
     __builtin_choose_expr(__safe_cmp(x, y), \
                           ^~~~~~~~~~
   include/linux/kernel.h:886:19: note: in expansion of macro '__careful_cmp'
    #define max(x, y) __careful_cmp(x, y, >)
                      ^~~~~~~~~~~~~
>> drivers/platform/chrome/cros_ec_proto.c:650:31: note: in expansion of macro 'max'
     msg = kzalloc(sizeof(*msg) + max(sizeof(*params), bytes), GFP_KERNEL);
                                  ^~~

vim +/max +650 drivers/platform/chrome/cros_ec_proto.c

   639	
   640	int cros_ec_readmem(struct cros_ec_device *ec, unsigned int offset,
   641			    unsigned int bytes, void *dest)
   642	{
   643		int ret;
   644		struct ec_params_read_memmap *params;
   645		struct cros_ec_command *msg;
   646	
   647		if (offset >= EC_MEMMAP_SIZE - bytes)
   648			return -EINVAL;
   649	
 > 650		msg = kzalloc(sizeof(*msg) + max(sizeof(*params), bytes), GFP_KERNEL);

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

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

  reply	other threads:[~2019-01-08 11:24 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-08  3:56 Moritz Fischer
2019-01-08 11:23 ` kbuild test robot [this message]
2019-01-08 14:28 ` Enric Balletbo i Serra
2019-01-08 14:34   ` Guenter Roeck
2019-01-08 15:00     ` Enric Balletbo i Serra
2019-01-08 18:12       ` Moritz Fischer

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=201901081949.ojjEUz9I%fengguang.wu@intel.com \
    --to=lkp@intel.com \
    --cc=bleung@chromium.org \
    --cc=enric.balletbo@collabora.com \
    --cc=groeck@chromium.org \
    --cc=kbuild-all@01.org \
    --cc=lee.jones@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mdf@kernel.org \
    --cc=moritz.fischer@ettus.com \
    --cc=moritz@ettus.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®