lkml.org 
[lkml]   [2021]   [Mar]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 06/15] ACPI: acpi_lpss: fix some coding style issues
Hi Xiaofei,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on pm/linux-next]
[also build test WARNING on v5.12-rc4 next-20210326]
[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/Xiaofei-Tan/acpi-fix-some-coding-style-issues/20210327-144714
base: https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git linux-next
config: x86_64-randconfig-a005-20210326 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project d50fe9f0d6b9ee61df8830a67ea0a33c27a637e7)
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 x86_64 cross compiling tool for clang build
# apt-get install binutils-x86-64-linux-gnu
# https://github.com/0day-ci/linux/commit/31b45f08e2017005a1da942954093a6f09be7269
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Xiaofei-Tan/acpi-fix-some-coding-style-issues/20210327-144714
git checkout 31b45f08e2017005a1da942954093a6f09be7269
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64

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/acpi/acpi_lpss.c:190:26: warning: incompatible pointer to integer conversion passing 'void *' to parameter of type 'unsigned int' [-Wint-conversion]
uid = kstrtol(uid_str, NULL, 10);
^~~~
include/linux/stddef.h:8:14: note: expanded from macro 'NULL'
#define NULL ((void *)0)
^~~~~~~~~~~
include/linux/kernel.h:246:68: note: passing argument to parameter 'base' here
static inline int __must_check kstrtol(const char *s, unsigned int base, long *res)
^
>> drivers/acpi/acpi_lpss.c:190:32: warning: incompatible integer to pointer conversion passing 'int' to parameter of type 'long *' [-Wint-conversion]
uid = kstrtol(uid_str, NULL, 10);
^~
include/linux/kernel.h:246:80: note: passing argument to parameter 'res' here
static inline int __must_check kstrtol(const char *s, unsigned int base, long *res)
^
2 warnings generated.


vim +190 drivers/acpi/acpi_lpss.c

179
180 static void byt_i2c_setup(struct lpss_private_data *pdata)
181 {
182 const char *uid_str = acpi_device_uid(pdata->adev);
183 acpi_handle handle = pdata->adev->handle;
184 unsigned long long shared_host = 0;
185 acpi_status status;
186 long uid = 0;
187
188 /* Expected to always be true, but better safe then sorry */
189 if (uid_str)
> 190 uid = kstrtol(uid_str, NULL, 10);
191
192 /* Detect I2C bus shared with PUNIT and ignore its d3 status */
193 status = acpi_evaluate_integer(handle, "_SEM", NULL, &shared_host);
194 if (ACPI_SUCCESS(status) && shared_host && uid)
195 pmc_atom_d3_mask &= ~(BIT_LPSS2_F1_I2C1 << (uid - 1));
196
197 lpss_deassert_reset(pdata);
198
199 if (readl(pdata->mmio_base + pdata->dev_desc->prv_offset))
200 pdata->fixed_clk_rate = 133000000;
201
202 writel(0, pdata->mmio_base + LPSS_I2C_ENABLE);
203 }
204

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[unhandled content-type:application/gzip]
\
 
 \ /
  Last update: 2021-03-27 09:44    [W:0.103 / U:0.460 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site