CC: [email protected]
BCC: [email protected]
In-Reply-To: <[email protected]>
References: <[email protected]>
TO: Zev Weiss <[email protected]>

Hi Zev,

I love your patch! Perhaps something to improve:

[auto build test WARNING on groeck-staging/hwmon-next]
[also build test WARNING on linus/master v5.18-rc4]
[cannot apply to next-20220428]
[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/intel-lab-lkp/linux/commits/Zev-Weiss/hwmon-nct6775-Convert-to-regmap-add-i2c-support/20220427-090529
base:   
https://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging.git 
hwmon-next
:::::: branch date: 33 hours ago
:::::: commit date: 33 hours ago
compiler: xtensa-linux-gcc (GCC) 11.3.0
reproduce (cppcheck warning):
        # apt-get install cppcheck
        git checkout 348351883e68a4e034f4a4b8a600a82177d68cc7
        cppcheck --quiet --enable=style,performance,portability --template=gcc 
FILE

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <[email protected]>


cppcheck warnings: (new ones prefixed by >>)
>> drivers/hwmon/nct6775-core.c:1867:9: warning: %d in format string (no. 1) 
>> requires 'int' but the argument type is 'unsigned int'. 
>> [invalidPrintfArgType_sint]
    return sprintf(buf, "%dn", data->rpm[nr]);
           ^
   drivers/hwmon/nct6775-core.c:1880:9: warning: %d in format string (no. 1) 
requires 'int' but the argument type is 'unsigned int'. 
[invalidPrintfArgType_sint]
    return sprintf(buf, "%dn",
           ^
   drivers/hwmon/nct6775-core.c:2798:9: warning: %d in format string (no. 1) 
requires 'int' but the argument type is 'unsigned int'. 
[invalidPrintfArgType_sint]
    return sprintf(buf, "%dn",
           ^
   drivers/hwmon/nct6775-core.c:3016:9: warning: %d in format string (no. 1) 
requires 'int' but the argument type is 'unsigned int'. 
[invalidPrintfArgType_sint]
    return sprintf(buf, "%dn",
           ^

cppcheck possible warnings: (new ones prefixed by >>, may not real problems)

>> drivers/hwmon/nct6775-core.c:1867:9: warning: %d in format string (no. 1) 
>> requires 'int' but the argument type is 'unsigned int'. 
>> [invalidPrintfArgType_sint]
    return sprintf(buf, "%dn", data->rpm[nr]);
           ^
   drivers/hwmon/nct6775-core.c:1880:9: warning: %d in format string (no. 1) 
requires 'int' but the argument type is 'unsigned int'. 
[invalidPrintfArgType_sint]
    return sprintf(buf, "%dn",
           ^
   drivers/hwmon/nct6775-core.c:2798:9: warning: %d in format string (no. 1) 
requires 'int' but the argument type is 'unsigned int'. 
[invalidPrintfArgType_sint]
    return sprintf(buf, "%dn",
           ^
   drivers/hwmon/nct6775-core.c:3016:9: warning: %d in format string (no. 1) 
requires 'int' but the argument type is 'unsigned int'. 
[invalidPrintfArgType_sint]
    return sprintf(buf, "%dn",
           ^
>> drivers/hwmon/nct6775-core.c:945:7: warning: union member 
>> 'Anonymous0::index' is never used. [unusedStructMember]
     int index;
         ^

vim +1867 drivers/hwmon/nct6775-core.c

9de2e2e84e7d52 drivers/hwmon/nct6775.c Guenter Roeck 2012-05-20  1856  
1c65dc365ed38d drivers/hwmon/nct6775.c Guenter Roeck 2012-12-04  1857  static 
ssize_t
1c65dc365ed38d drivers/hwmon/nct6775.c Guenter Roeck 2012-12-04  1858  
show_fan(struct device *dev, struct device_attribute *attr, char *buf)
1c65dc365ed38d drivers/hwmon/nct6775.c Guenter Roeck 2012-12-04  1859  {
1c65dc365ed38d drivers/hwmon/nct6775.c Guenter Roeck 2012-12-04  1860   struct 
nct6775_data *data = nct6775_update_device(dev);
1c65dc365ed38d drivers/hwmon/nct6775.c Guenter Roeck 2012-12-04  1861   struct 
sensor_device_attribute *sattr = to_sensor_dev_attr(attr);
1c65dc365ed38d drivers/hwmon/nct6775.c Guenter Roeck 2012-12-04  1862   int nr 
= sattr->index;
9cd892bcbe32fe drivers/hwmon/nct6775.c Guenter Roeck 2014-11-16  1863  
bc1057310b7eb6 drivers/hwmon/nct6775.c Zev Weiss     2022-04-26  1864   if 
(IS_ERR(data))
bc1057310b7eb6 drivers/hwmon/nct6775.c Zev Weiss     2022-04-26  1865           
return PTR_ERR(data);
bc1057310b7eb6 drivers/hwmon/nct6775.c Zev Weiss     2022-04-26  1866  
1c65dc365ed38d drivers/hwmon/nct6775.c Guenter Roeck 2012-12-04 @1867   return 
sprintf(buf, "%d\n", data->rpm[nr]);
1c65dc365ed38d drivers/hwmon/nct6775.c Guenter Roeck 2012-12-04  1868  }
1c65dc365ed38d drivers/hwmon/nct6775.c Guenter Roeck 2012-12-04  1869  

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp
_______________________________________________
kbuild mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to