All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Alexandru Ardelean <alexandru.ardelean@analog.com>,
	linux-hwmon@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org
Cc: kbuild-all@lists.01.org, clang-built-linux@googlegroups.com,
	robh+dt@kernel.org, linux@roeck-us.net, jdelvare@suse.com,
	mark.thoren@analog.com, ardeleanalex@gmail.com,
	Alexandru Ardelean <alexandru.ardelean@analog.com>
Subject: Re: [PATCH v2 2/4] docs: hwmon: (ltc2945): change type of val to ULL in ltc2945_val_to_reg()
Date: Fri, 13 Nov 2020 15:25:51 +0800	[thread overview]
Message-ID: <202011131534.5nWjFdSV-lkp@intel.com> (raw)
In-Reply-To: <20201111091259.46773-3-alexandru.ardelean@analog.com>

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

Hi Alexandru,

I love your patch! Yet something to improve:

[auto build test ERROR on hwmon/hwmon-next]
[also build test ERROR on v5.10-rc3 next-20201112]
[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/Alexandru-Ardelean/hwmon-ltc2945-add-support-for-sense-resistor/20201111-171129
base:   https://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging.git hwmon-next
config: powerpc64-randconfig-r005-20201111 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project 874b0a0b9db93f5d3350ffe6b5efda2d908415d0)
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 powerpc64 cross compiling tool for clang build
        # apt-get install binutils-powerpc64-linux-gnu
        # https://github.com/0day-ci/linux/commit/4e0e9315df2733ae5efe6095c5ab9b7675d07fb0
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Alexandru-Ardelean/hwmon-ltc2945-add-support-for-sense-resistor/20201111-171129
        git checkout 4e0e9315df2733ae5efe6095c5ab9b7675d07fb0
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=powerpc64 

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

All errors (new ones prefixed by >>):

>> drivers/hwmon/ltc2945.c:256:26: error: incompatible pointer types passing 'unsigned long long *' to parameter of type 'unsigned long *' [-Werror,-Wincompatible-pointer-types]
           ret = kstrtoul(buf, 10, &val);
                                   ^~~~
   include/linux/kernel.h:351:90: note: passing argument to parameter 'res' here
   static inline int __must_check kstrtoul(const char *s, unsigned int base, unsigned long *res)
                                                                                            ^
   1 error generated.

vim +256 drivers/hwmon/ltc2945.c

6700ce035f8301 Guenter Roeck      2014-01-11  241  
5614e26d84a99a Guenter Roeck      2018-12-06  242  static ssize_t ltc2945_value_store(struct device *dev,
6700ce035f8301 Guenter Roeck      2014-01-11  243  				   struct device_attribute *da,
6700ce035f8301 Guenter Roeck      2014-01-11  244  				   const char *buf, size_t count)
6700ce035f8301 Guenter Roeck      2014-01-11  245  {
6700ce035f8301 Guenter Roeck      2014-01-11  246  	struct sensor_device_attribute *attr = to_sensor_dev_attr(da);
c159257a60302f Alexandru Ardelean 2020-11-11  247  	struct ltc2945_state *st = dev_get_drvdata(dev);
c159257a60302f Alexandru Ardelean 2020-11-11  248  	struct regmap *regmap = st->regmap;
6700ce035f8301 Guenter Roeck      2014-01-11  249  	u8 reg = attr->index;
4e0e9315df2733 Alexandru Ardelean 2020-11-11  250  	unsigned long long val;
6700ce035f8301 Guenter Roeck      2014-01-11  251  	u8 regbuf[3];
6700ce035f8301 Guenter Roeck      2014-01-11  252  	int num_regs;
6700ce035f8301 Guenter Roeck      2014-01-11  253  	int regval;
6700ce035f8301 Guenter Roeck      2014-01-11  254  	int ret;
6700ce035f8301 Guenter Roeck      2014-01-11  255  
6700ce035f8301 Guenter Roeck      2014-01-11 @256  	ret = kstrtoul(buf, 10, &val);
6700ce035f8301 Guenter Roeck      2014-01-11  257  	if (ret)
6700ce035f8301 Guenter Roeck      2014-01-11  258  		return ret;
6700ce035f8301 Guenter Roeck      2014-01-11  259  
6700ce035f8301 Guenter Roeck      2014-01-11  260  	/* convert to register value, then clamp and write result */
6700ce035f8301 Guenter Roeck      2014-01-11  261  	regval = ltc2945_val_to_reg(dev, reg, val);
6700ce035f8301 Guenter Roeck      2014-01-11  262  	if (is_power_reg(reg)) {
6700ce035f8301 Guenter Roeck      2014-01-11  263  		regval = clamp_val(regval, 0, 0xffffff);
6700ce035f8301 Guenter Roeck      2014-01-11  264  		regbuf[0] = regval >> 16;
6700ce035f8301 Guenter Roeck      2014-01-11  265  		regbuf[1] = (regval >> 8) & 0xff;
6700ce035f8301 Guenter Roeck      2014-01-11  266  		regbuf[2] = regval;
6700ce035f8301 Guenter Roeck      2014-01-11  267  		num_regs = 3;
6700ce035f8301 Guenter Roeck      2014-01-11  268  	} else {
6700ce035f8301 Guenter Roeck      2014-01-11  269  		regval = clamp_val(regval, 0, 0xfff) << 4;
6700ce035f8301 Guenter Roeck      2014-01-11  270  		regbuf[0] = regval >> 8;
6700ce035f8301 Guenter Roeck      2014-01-11  271  		regbuf[1] = regval & 0xff;
6700ce035f8301 Guenter Roeck      2014-01-11  272  		num_regs = 2;
6700ce035f8301 Guenter Roeck      2014-01-11  273  	}
6700ce035f8301 Guenter Roeck      2014-01-11  274  	ret = regmap_bulk_write(regmap, reg, regbuf, num_regs);
6700ce035f8301 Guenter Roeck      2014-01-11  275  	return ret < 0 ? ret : count;
6700ce035f8301 Guenter Roeck      2014-01-11  276  }
6700ce035f8301 Guenter Roeck      2014-01-11  277  

---
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: 27065 bytes --]

WARNING: multiple messages have this Message-ID (diff)
From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: Re: [PATCH v2 2/4] docs: hwmon: (ltc2945): change type of val to ULL in ltc2945_val_to_reg()
Date: Fri, 13 Nov 2020 15:25:51 +0800	[thread overview]
Message-ID: <202011131534.5nWjFdSV-lkp@intel.com> (raw)
In-Reply-To: <20201111091259.46773-3-alexandru.ardelean@analog.com>

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

Hi Alexandru,

I love your patch! Yet something to improve:

[auto build test ERROR on hwmon/hwmon-next]
[also build test ERROR on v5.10-rc3 next-20201112]
[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/Alexandru-Ardelean/hwmon-ltc2945-add-support-for-sense-resistor/20201111-171129
base:   https://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging.git hwmon-next
config: powerpc64-randconfig-r005-20201111 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project 874b0a0b9db93f5d3350ffe6b5efda2d908415d0)
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 powerpc64 cross compiling tool for clang build
        # apt-get install binutils-powerpc64-linux-gnu
        # https://github.com/0day-ci/linux/commit/4e0e9315df2733ae5efe6095c5ab9b7675d07fb0
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Alexandru-Ardelean/hwmon-ltc2945-add-support-for-sense-resistor/20201111-171129
        git checkout 4e0e9315df2733ae5efe6095c5ab9b7675d07fb0
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=powerpc64 

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

All errors (new ones prefixed by >>):

>> drivers/hwmon/ltc2945.c:256:26: error: incompatible pointer types passing 'unsigned long long *' to parameter of type 'unsigned long *' [-Werror,-Wincompatible-pointer-types]
           ret = kstrtoul(buf, 10, &val);
                                   ^~~~
   include/linux/kernel.h:351:90: note: passing argument to parameter 'res' here
   static inline int __must_check kstrtoul(const char *s, unsigned int base, unsigned long *res)
                                                                                            ^
   1 error generated.

vim +256 drivers/hwmon/ltc2945.c

6700ce035f8301 Guenter Roeck      2014-01-11  241  
5614e26d84a99a Guenter Roeck      2018-12-06  242  static ssize_t ltc2945_value_store(struct device *dev,
6700ce035f8301 Guenter Roeck      2014-01-11  243  				   struct device_attribute *da,
6700ce035f8301 Guenter Roeck      2014-01-11  244  				   const char *buf, size_t count)
6700ce035f8301 Guenter Roeck      2014-01-11  245  {
6700ce035f8301 Guenter Roeck      2014-01-11  246  	struct sensor_device_attribute *attr = to_sensor_dev_attr(da);
c159257a60302f Alexandru Ardelean 2020-11-11  247  	struct ltc2945_state *st = dev_get_drvdata(dev);
c159257a60302f Alexandru Ardelean 2020-11-11  248  	struct regmap *regmap = st->regmap;
6700ce035f8301 Guenter Roeck      2014-01-11  249  	u8 reg = attr->index;
4e0e9315df2733 Alexandru Ardelean 2020-11-11  250  	unsigned long long val;
6700ce035f8301 Guenter Roeck      2014-01-11  251  	u8 regbuf[3];
6700ce035f8301 Guenter Roeck      2014-01-11  252  	int num_regs;
6700ce035f8301 Guenter Roeck      2014-01-11  253  	int regval;
6700ce035f8301 Guenter Roeck      2014-01-11  254  	int ret;
6700ce035f8301 Guenter Roeck      2014-01-11  255  
6700ce035f8301 Guenter Roeck      2014-01-11 @256  	ret = kstrtoul(buf, 10, &val);
6700ce035f8301 Guenter Roeck      2014-01-11  257  	if (ret)
6700ce035f8301 Guenter Roeck      2014-01-11  258  		return ret;
6700ce035f8301 Guenter Roeck      2014-01-11  259  
6700ce035f8301 Guenter Roeck      2014-01-11  260  	/* convert to register value, then clamp and write result */
6700ce035f8301 Guenter Roeck      2014-01-11  261  	regval = ltc2945_val_to_reg(dev, reg, val);
6700ce035f8301 Guenter Roeck      2014-01-11  262  	if (is_power_reg(reg)) {
6700ce035f8301 Guenter Roeck      2014-01-11  263  		regval = clamp_val(regval, 0, 0xffffff);
6700ce035f8301 Guenter Roeck      2014-01-11  264  		regbuf[0] = regval >> 16;
6700ce035f8301 Guenter Roeck      2014-01-11  265  		regbuf[1] = (regval >> 8) & 0xff;
6700ce035f8301 Guenter Roeck      2014-01-11  266  		regbuf[2] = regval;
6700ce035f8301 Guenter Roeck      2014-01-11  267  		num_regs = 3;
6700ce035f8301 Guenter Roeck      2014-01-11  268  	} else {
6700ce035f8301 Guenter Roeck      2014-01-11  269  		regval = clamp_val(regval, 0, 0xfff) << 4;
6700ce035f8301 Guenter Roeck      2014-01-11  270  		regbuf[0] = regval >> 8;
6700ce035f8301 Guenter Roeck      2014-01-11  271  		regbuf[1] = regval & 0xff;
6700ce035f8301 Guenter Roeck      2014-01-11  272  		num_regs = 2;
6700ce035f8301 Guenter Roeck      2014-01-11  273  	}
6700ce035f8301 Guenter Roeck      2014-01-11  274  	ret = regmap_bulk_write(regmap, reg, regbuf, num_regs);
6700ce035f8301 Guenter Roeck      2014-01-11  275  	return ret < 0 ? ret : count;
6700ce035f8301 Guenter Roeck      2014-01-11  276  }
6700ce035f8301 Guenter Roeck      2014-01-11  277  

---
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: 27065 bytes --]

  parent reply	other threads:[~2020-11-13  7:27 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-11  9:12 [PATCH v2 0/4] hwmon: (ltc2945): add support for sense resistor Alexandru Ardelean
2020-11-11  9:12 ` [PATCH v2 1/4] hwmon: (ltc2945): wrap regmap into an ltc2945_state struct Alexandru Ardelean
2020-11-11  9:12 ` [PATCH v2 2/4] docs: hwmon: (ltc2945): change type of val to ULL in ltc2945_val_to_reg() Alexandru Ardelean
2020-11-11 14:54   ` Guenter Roeck
2020-11-11 15:28     ` Alexandru Ardelean
2020-11-11 15:44       ` Guenter Roeck
2020-11-18 14:40     ` Alexandru Ardelean
2020-11-18 15:19       ` Guenter Roeck
2020-11-13  7:25   ` kernel test robot [this message]
2020-11-13  7:25     ` kernel test robot
2020-11-11  9:12 ` [PATCH v2 3/4] hwmon: (ltc2945): add support for sense resistor Alexandru Ardelean
2020-11-18 14:43   ` Alexandru Ardelean
2020-11-18 15:21     ` Guenter Roeck
2020-11-11  9:12 ` [PATCH v2 4/4] dt-bindings: hwmon: ltc2945: add device tree doc for ltc2945 Alexandru Ardelean
2020-11-16 17:36   ` Rob Herring

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=202011131534.5nWjFdSV-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=alexandru.ardelean@analog.com \
    --cc=ardeleanalex@gmail.com \
    --cc=clang-built-linux@googlegroups.com \
    --cc=devicetree@vger.kernel.org \
    --cc=jdelvare@suse.com \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-hwmon@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=mark.thoren@analog.com \
    --cc=robh+dt@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 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.