* [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'
@ 2021-06-11 12:27 kernel test robot
2021-06-11 13:26 ` Greg Kroah-Hartman
0 siblings, 1 reply; 4+ messages in thread
From: kernel test robot @ 2021-06-11 12:27 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 2194 bytes --]
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 basics 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=1 build):
# https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc.git/commit/?id=fd307a4ad332ef50be5569c92490219e7cd84ce5
git remote add char-misc https://git.kernel.org/pub/scm/linux/kernel/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=1 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/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
175
176 static ssize_t sernum_show(struct device *dev, struct device_attribute *attr, char *buf)
177 {
178 struct at25_data *at25;
179
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);
184
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 65660 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* 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'
2021-06-11 12:27 [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' kernel test robot
@ 2021-06-11 13:26 ` Greg Kroah-Hartman
2021-06-11 13:32 ` Jiří Prchal
0 siblings, 1 reply; 4+ messages in thread
From: Greg Kroah-Hartman @ 2021-06-11 13:26 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 2561 bytes --]
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 basics 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=1 build):
> # https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc.git/commit/?id=fd307a4ad332ef50be5569c92490219e7cd84ce5
> git remote add char-misc https://git.kernel.org/pub/scm/linux/kernel/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=1 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/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
>
> 175
> 176 static ssize_t sernum_show(struct device *dev, struct device_attribute *attr, char *buf)
> 177 {
> 178 struct at25_data *at25;
> 179
> 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);
> 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
^ permalink raw reply [flat|nested] 4+ messages in thread
* 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'
2021-06-11 13:26 ` Greg Kroah-Hartman
@ 2021-06-11 13:32 ` Jiří Prchal
2021-06-11 14:03 ` Greg Kroah-Hartman
0 siblings, 1 reply; 4+ messages in thread
From: Jiří Prchal @ 2021-06-11 13:32 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 2794 bytes --]
On 11. 06. 21 15:26, Greg Kroah-Hartman wrote:
> 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 basics 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=1 build):
>> # https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc.git/commit/?id=fd307a4ad332ef50be5569c92490219e7cd84ce5
>> git remote add char-misc https://git.kernel.org/pub/scm/linux/kernel/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=1 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/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
>>
>> 175
>> 176 static ssize_t sernum_show(struct device *dev, struct device_attribute *attr, char *buf)
>> 177 {
>> 178 struct at25_data *at25;
>> 179
>> 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);
>> 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.
Just for this as new, next patch?
Or whole series - v11?
Also, isn't it better as bool?
>
> thanks,
>
> greg k-h
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* 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'
2021-06-11 13:32 ` Jiří Prchal
@ 2021-06-11 14:03 ` Greg Kroah-Hartman
0 siblings, 0 replies; 4+ messages in thread
From: Greg Kroah-Hartman @ 2021-06-11 14:03 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 3237 bytes --]
On Fri, Jun 11, 2021 at 03:32:45PM +0200, Jiří Prchal wrote:
>
>
> On 11. 06. 21 15:26, Greg Kroah-Hartman wrote:
> > 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 basics 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=1 build):
> > > # https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc.git/commit/?id=fd307a4ad332ef50be5569c92490219e7cd84ce5
> > > git remote add char-misc https://git.kernel.org/pub/scm/linux/kernel/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=1 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/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
> > >
> > > 175
> > > 176 static ssize_t sernum_show(struct device *dev, struct device_attribute *attr, char *buf)
> > > 177 {
> > > 178 struct at25_data *at25;
> > > 179
> > > 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);
> > > 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.
>
> Just for this as new, next patch?
> Or whole series - v11?
> Also, isn't it better as bool?
An add-on patch is fine, I don't want to have to drop what I've already
applied.
And if you want to make it a bool, that's fine with me, it's up to you,
I don't know what this code is supposed to be doing :)
thanks,
greg k-h
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-06-11 14:03 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-11 12:27 [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' kernel test robot
2021-06-11 13:26 ` Greg Kroah-Hartman
2021-06-11 13:32 ` Jiří Prchal
2021-06-11 14:03 ` Greg Kroah-Hartman
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.