Re: [PATCH v10 4/4] nvmem: eeprom: at25: export FRAM serial num

From: kernel test robot
Date: Tue Jun 22 2021 - 05:33:49 EST

Hi Jiri,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on robh/for-next]
[also build test WARNING on linux/master linus/master v5.13-rc7]
[cannot apply to char-misc/char-misc-testing next-20210621]
[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]

base: for-next
config: mips-randconfig-r035-20210622 (attached as .config)
compiler: mips64-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget -O ~/bin/make.cross
chmod +x ~/bin/make.cross
git remote add linux-review
git fetch --no-tags linux-review Jiri-Prchal/add-support-for-FRAM/20210616-203024
git checkout a1e83140e4bcb84fc663fdb074e2cbb5a771bfc8
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=mips

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

All warnings (new ones prefixed by >>):

drivers/misc/eeprom/at25.c: In function 'sernum_show':
>> drivers/misc/eeprom/at25.c:181:27: warning: field width specifier '*' expects argument of type 'int', but argument 3 has type 'long unsigned int' [-Wformat=]
181 | return sysfs_emit(buf, "%*ph\n", sizeof(at25->sernum), at25->sernum);
| ~^~ ~~~~~~~~~~~~~~~~~~~~
| | |
| int long unsigned int
drivers/misc/eeprom/at25.c: In function 'at25_probe':
drivers/misc/eeprom/at25.c:386:13: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
386 | is_fram = (int)match->data;
| ^

vim +181 drivers/misc/eeprom/at25.c

176 static ssize_t sernum_show(struct device *dev, struct device_attribute *attr, char *buf)
177 {
178 struct at25_data *at25;
180 at25 = dev_get_drvdata(dev);
> 181 return sysfs_emit(buf, "%*ph\n", sizeof(at25->sernum), at25->sernum);
182 }
183 static DEVICE_ATTR_RO(sernum);

0-DAY CI Kernel Test Service, Intel Corporation

Attachment: .config.gz
Description: application/gzip