From mboxrd@z Thu Jan 1 00:00:00 1970 Content-Type: multipart/mixed; boundary="===============5804246912368648150==" MIME-Version: 1.0 From: Greg Kroah-Hartman To: kbuild-all@lists.01.org Subject: Re: [char-misc:char-misc-testing 98/99] drivers/misc/eeprom/at25.c:181:27: warning: field width specifier '*' expects argument of type 'int', but argument 3 has type 'long unsigned int' Date: Fri, 11 Jun 2021 15:26:50 +0200 Message-ID: In-Reply-To: <202106112039.PT2OEn3Z-lkp@intel.com> List-Id: --===============5804246912368648150== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable On Fri, Jun 11, 2021 at 08:27:46PM +0800, kernel test robot wrote: > tree: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc.= git char-misc-testing > head: 63879e2964bceee2aa5bbe8b99ea58bba28bb64f > commit: fd307a4ad332ef50be5569c92490219e7cd84ce5 [98/99] nvmem: prepare b= asics for FRAM support > config: x86_64-allyesconfig (attached as .config) > compiler: gcc-9 (Debian 9.3.0-22) 9.3.0 > reproduce (this is a W=3D1 build): > # https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-mis= c.git/commit/?id=3Dfd307a4ad332ef50be5569c92490219e7cd84ce5 > git remote add char-misc https://git.kernel.org/pub/scm/linux/ker= nel/git/gregkh/char-misc.git > git fetch --no-tags char-misc char-misc-testing > git checkout fd307a4ad332ef50be5569c92490219e7cd84ce5 > # save the attached .config to linux build tree > make W=3D1 ARCH=3Dx86_64 = > = > If you fix the issue, kindly add following tag as appropriate > Reported-by: kernel test robot > = > 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=3D] > 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 integ= er of different size [-Wpointer-to-int-cast] > 386 | is_fram =3D (int)match->data; > | ^ > = > = > vim +181 drivers/misc/eeprom/at25.c > = > 175 = > 176 static ssize_t sernum_show(struct device *dev, struct device_attri= bute *attr, char *buf) > 177 { > 178 struct at25_data *at25; > 179 = > 180 at25 =3D dev_get_drvdata(dev); > > 181 return sysfs_emit(buf, "%*ph\n", sizeof(at25->sernum), at25->sern= um); > 182 } > 183 static DEVICE_ATTR_RO(sernum); > 184 = > = > --- > 0-DAY CI Kernel Test Service, Intel Corporation > https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org Jiri, can you send a patch for this? Looks like I was wrong with the cast issue, sorry about that. Just make "is_fram" an unsigned long and you should be ok on all platforms. thanks, greg k-h --===============5804246912368648150==--