* drivers/hid/hid-ft260.c:794:44: warning: format specifies type 'short' but the argument has type 'int'
@ 2021-07-26 3:07 ` kernel test robot
0 siblings, 0 replies; 14+ messages in thread
From: kernel test robot @ 2021-07-26 3:07 UTC (permalink / raw)
To: Michael Zaidman; +Cc: clang-built-linux, kbuild-all, linux-kernel, Jiri Kosina
[-- Attachment #1: Type: text/plain, Size: 3577 bytes --]
Hi Michael,
FYI, the error/warning still remains.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: ff1176468d368232b684f75e82563369208bc371
commit: 6a82582d9fa438045191074856f47165334f2777 HID: ft260: add usb hid to i2c host bridge driver
date: 4 months ago
config: arm64-randconfig-r022-20210726 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project c63dbd850182797bc4b76124d08e1c320ab2365d)
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 arm64 cross compiling tool for clang build
# apt-get install binutils-aarch64-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=6a82582d9fa438045191074856f47165334f2777
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 6a82582d9fa438045191074856f47165334f2777
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm64
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/hid/hid-ft260.c:515:59: warning: variable 'len' is uninitialized when used here [-Wuninitialized]
hid_err(hdev, "%s: unsupported wr len: %d\n", __func__, len);
^~~
include/linux/hid.h:1190:30: note: expanded from macro 'hid_err'
dev_err(&(hid)->dev, fmt, ##__VA_ARGS__)
^~~~~~~~~~~
include/linux/dev_printk.h:112:32: note: expanded from macro 'dev_err'
_dev_err(dev, dev_fmt(fmt), ##__VA_ARGS__)
^~~~~~~~~~~
drivers/hid/hid-ft260.c:507:9: note: initialize the variable 'len' to silence this warning
int len, ret;
^
= 0
>> drivers/hid/hid-ft260.c:794:44: warning: format specifies type 'short' but the argument has type 'int' [-Wformat]
return scnprintf(buf, PAGE_SIZE, "%hi\n", le16_to_cpu(*field));
~~~ ^~~~~~~~~~~~~~~~~~~
%i
include/linux/byteorder/generic.h:91:21: note: expanded from macro 'le16_to_cpu'
#define le16_to_cpu __le16_to_cpu
^
include/uapi/linux/byteorder/big_endian.h:36:26: note: expanded from macro '__le16_to_cpu'
#define __le16_to_cpu(x) __swab16((__force __u16)(__le16)(x))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/uapi/linux/swab.h:105:2: note: expanded from macro '__swab16'
(__builtin_constant_p((__u16)(x)) ? \
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2 warnings generated.
vim +794 drivers/hid/hid-ft260.c
784
785 static int ft260_word_show(struct hid_device *hdev, int id, u8 *cfg, int len,
786 u16 *field, u8 *buf)
787 {
788 int ret;
789
790 ret = ft260_hid_feature_report_get(hdev, id, cfg, len);
791 if (ret != len && ret >= 0)
792 return -EIO;
793
> 794 return scnprintf(buf, PAGE_SIZE, "%hi\n", le16_to_cpu(*field));
795 }
796
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 42510 bytes --]
^ permalink raw reply [flat|nested] 14+ messages in thread
* drivers/hid/hid-ft260.c:794:44: warning: format specifies type 'short' but the argument has type 'int'
@ 2021-07-26 3:07 ` kernel test robot
0 siblings, 0 replies; 14+ messages in thread
From: kernel test robot @ 2021-07-26 3:07 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 3654 bytes --]
Hi Michael,
FYI, the error/warning still remains.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: ff1176468d368232b684f75e82563369208bc371
commit: 6a82582d9fa438045191074856f47165334f2777 HID: ft260: add usb hid to i2c host bridge driver
date: 4 months ago
config: arm64-randconfig-r022-20210726 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project c63dbd850182797bc4b76124d08e1c320ab2365d)
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 arm64 cross compiling tool for clang build
# apt-get install binutils-aarch64-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=6a82582d9fa438045191074856f47165334f2777
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 6a82582d9fa438045191074856f47165334f2777
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm64
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/hid/hid-ft260.c:515:59: warning: variable 'len' is uninitialized when used here [-Wuninitialized]
hid_err(hdev, "%s: unsupported wr len: %d\n", __func__, len);
^~~
include/linux/hid.h:1190:30: note: expanded from macro 'hid_err'
dev_err(&(hid)->dev, fmt, ##__VA_ARGS__)
^~~~~~~~~~~
include/linux/dev_printk.h:112:32: note: expanded from macro 'dev_err'
_dev_err(dev, dev_fmt(fmt), ##__VA_ARGS__)
^~~~~~~~~~~
drivers/hid/hid-ft260.c:507:9: note: initialize the variable 'len' to silence this warning
int len, ret;
^
= 0
>> drivers/hid/hid-ft260.c:794:44: warning: format specifies type 'short' but the argument has type 'int' [-Wformat]
return scnprintf(buf, PAGE_SIZE, "%hi\n", le16_to_cpu(*field));
~~~ ^~~~~~~~~~~~~~~~~~~
%i
include/linux/byteorder/generic.h:91:21: note: expanded from macro 'le16_to_cpu'
#define le16_to_cpu __le16_to_cpu
^
include/uapi/linux/byteorder/big_endian.h:36:26: note: expanded from macro '__le16_to_cpu'
#define __le16_to_cpu(x) __swab16((__force __u16)(__le16)(x))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/uapi/linux/swab.h:105:2: note: expanded from macro '__swab16'
(__builtin_constant_p((__u16)(x)) ? \
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2 warnings generated.
vim +794 drivers/hid/hid-ft260.c
784
785 static int ft260_word_show(struct hid_device *hdev, int id, u8 *cfg, int len,
786 u16 *field, u8 *buf)
787 {
788 int ret;
789
790 ret = ft260_hid_feature_report_get(hdev, id, cfg, len);
791 if (ret != len && ret >= 0)
792 return -EIO;
793
> 794 return scnprintf(buf, PAGE_SIZE, "%hi\n", le16_to_cpu(*field));
795 }
796
---
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: 42510 bytes --]
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: drivers/hid/hid-ft260.c:794:44: warning: format specifies type 'short' but the argument has type 'int'
2021-07-26 3:07 ` kernel test robot
@ 2021-07-26 9:09 ` Michael Zaidman
-1 siblings, 0 replies; 14+ messages in thread
From: Michael Zaidman @ 2021-07-26 9:09 UTC (permalink / raw)
To: kernel test robot, Jiri Kosina
Cc: clang-built-linux, kbuild-all, linux-kernel
On Mon, Jul 26, 2021 at 11:07:07AM +0800, kernel test robot wrote:
> Hi Michael,
>
> FYI, the error/warning still remains.
>
> tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> head: ff1176468d368232b684f75e82563369208bc371
> commit: 6a82582d9fa438045191074856f47165334f2777 HID: ft260: add usb hid to i2c host bridge driver
> date: 4 months ago
> config: arm64-randconfig-r022-20210726 (attached as .config)
> compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project c63dbd850182797bc4b76124d08e1c320ab2365d)
> 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 arm64 cross compiling tool for clang build
> # apt-get install binutils-aarch64-linux-gnu
> # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=6a82582d9fa438045191074856f47165334f2777
> git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
> git fetch --no-tags linus master
> git checkout 6a82582d9fa438045191074856f47165334f2777
> # save the attached .config to linux build tree
> COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm64
>
> 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/hid/hid-ft260.c:515:59: warning: variable 'len' is uninitialized when used here [-Wuninitialized]
> hid_err(hdev, "%s: unsupported wr len: %d\n", __func__, len);
> ^~~
> include/linux/hid.h:1190:30: note: expanded from macro 'hid_err'
> dev_err(&(hid)->dev, fmt, ##__VA_ARGS__)
> ^~~~~~~~~~~
> include/linux/dev_printk.h:112:32: note: expanded from macro 'dev_err'
> _dev_err(dev, dev_fmt(fmt), ##__VA_ARGS__)
> ^~~~~~~~~~~
> drivers/hid/hid-ft260.c:507:9: note: initialize the variable 'len' to silence this warning
> int len, ret;
> ^
> = 0
> >> drivers/hid/hid-ft260.c:794:44: warning: format specifies type 'short' but the argument has type 'int' [-Wformat]
> return scnprintf(buf, PAGE_SIZE, "%hi\n", le16_to_cpu(*field));
> ~~~ ^~~~~~~~~~~~~~~~~~~
> %i
> include/linux/byteorder/generic.h:91:21: note: expanded from macro 'le16_to_cpu'
> #define le16_to_cpu __le16_to_cpu
> ^
> include/uapi/linux/byteorder/big_endian.h:36:26: note: expanded from macro '__le16_to_cpu'
> #define __le16_to_cpu(x) __swab16((__force __u16)(__le16)(x))
> ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> include/uapi/linux/swab.h:105:2: note: expanded from macro '__swab16'
> (__builtin_constant_p((__u16)(x)) ? \
> ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> 2 warnings generated.
>
>
> vim +794 drivers/hid/hid-ft260.c
>
> 784
> 785 static int ft260_word_show(struct hid_device *hdev, int id, u8 *cfg, int len,
> 786 u16 *field, u8 *buf)
> 787 {
> 788 int ret;
> 789
> 790 ret = ft260_hid_feature_report_get(hdev, id, cfg, len);
> 791 if (ret != len && ret >= 0)
> 792 return -EIO;
> 793
> > 794 return scnprintf(buf, PAGE_SIZE, "%hi\n", le16_to_cpu(*field));
> 795 }
> 796
>
> ---
> 0-DAY CI Kernel Test Service, Intel Corporation
> https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
The fix was discussed and submitted on May 10 in this commit
https://patchwork.kernel.org/project/linux-input/patch/20210510163428.2415-1-michael.zaidman@gmail.com/
But I see that it was not taken into v5.13.
Jiri, could you please comment?
Thanks,
Michael
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: drivers/hid/hid-ft260.c:794:44: warning: format specifies type 'short' but the argument has type 'int'
@ 2021-07-26 9:09 ` Michael Zaidman
0 siblings, 0 replies; 14+ messages in thread
From: Michael Zaidman @ 2021-07-26 9:09 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 4141 bytes --]
On Mon, Jul 26, 2021 at 11:07:07AM +0800, kernel test robot wrote:
> Hi Michael,
>
> FYI, the error/warning still remains.
>
> tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> head: ff1176468d368232b684f75e82563369208bc371
> commit: 6a82582d9fa438045191074856f47165334f2777 HID: ft260: add usb hid to i2c host bridge driver
> date: 4 months ago
> config: arm64-randconfig-r022-20210726 (attached as .config)
> compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project c63dbd850182797bc4b76124d08e1c320ab2365d)
> 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 arm64 cross compiling tool for clang build
> # apt-get install binutils-aarch64-linux-gnu
> # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=6a82582d9fa438045191074856f47165334f2777
> git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
> git fetch --no-tags linus master
> git checkout 6a82582d9fa438045191074856f47165334f2777
> # save the attached .config to linux build tree
> COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm64
>
> 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/hid/hid-ft260.c:515:59: warning: variable 'len' is uninitialized when used here [-Wuninitialized]
> hid_err(hdev, "%s: unsupported wr len: %d\n", __func__, len);
> ^~~
> include/linux/hid.h:1190:30: note: expanded from macro 'hid_err'
> dev_err(&(hid)->dev, fmt, ##__VA_ARGS__)
> ^~~~~~~~~~~
> include/linux/dev_printk.h:112:32: note: expanded from macro 'dev_err'
> _dev_err(dev, dev_fmt(fmt), ##__VA_ARGS__)
> ^~~~~~~~~~~
> drivers/hid/hid-ft260.c:507:9: note: initialize the variable 'len' to silence this warning
> int len, ret;
> ^
> = 0
> >> drivers/hid/hid-ft260.c:794:44: warning: format specifies type 'short' but the argument has type 'int' [-Wformat]
> return scnprintf(buf, PAGE_SIZE, "%hi\n", le16_to_cpu(*field));
> ~~~ ^~~~~~~~~~~~~~~~~~~
> %i
> include/linux/byteorder/generic.h:91:21: note: expanded from macro 'le16_to_cpu'
> #define le16_to_cpu __le16_to_cpu
> ^
> include/uapi/linux/byteorder/big_endian.h:36:26: note: expanded from macro '__le16_to_cpu'
> #define __le16_to_cpu(x) __swab16((__force __u16)(__le16)(x))
> ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> include/uapi/linux/swab.h:105:2: note: expanded from macro '__swab16'
> (__builtin_constant_p((__u16)(x)) ? \
> ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> 2 warnings generated.
>
>
> vim +794 drivers/hid/hid-ft260.c
>
> 784
> 785 static int ft260_word_show(struct hid_device *hdev, int id, u8 *cfg, int len,
> 786 u16 *field, u8 *buf)
> 787 {
> 788 int ret;
> 789
> 790 ret = ft260_hid_feature_report_get(hdev, id, cfg, len);
> 791 if (ret != len && ret >= 0)
> 792 return -EIO;
> 793
> > 794 return scnprintf(buf, PAGE_SIZE, "%hi\n", le16_to_cpu(*field));
> 795 }
> 796
>
> ---
> 0-DAY CI Kernel Test Service, Intel Corporation
> https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
The fix was discussed and submitted on May 10 in this commit
https://patchwork.kernel.org/project/linux-input/patch/20210510163428.2415-1-michael.zaidman(a)gmail.com/
But I see that it was not taken into v5.13.
Jiri, could you please comment?
Thanks,
Michael
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: drivers/hid/hid-ft260.c:794:44: warning: format specifies type 'short' but the argument has type 'int'
2021-07-26 9:09 ` Michael Zaidman
@ 2021-07-27 10:23 ` Jiri Kosina
-1 siblings, 0 replies; 14+ messages in thread
From: Jiri Kosina @ 2021-07-27 10:23 UTC (permalink / raw)
To: Michael Zaidman
Cc: kernel test robot, clang-built-linux, kbuild-all, linux-kernel
On Mon, 26 Jul 2021, Michael Zaidman wrote:
> > vim +794 drivers/hid/hid-ft260.c
> >
> > 784
> > 785 static int ft260_word_show(struct hid_device *hdev, int id, u8 *cfg, int len,
> > 786 u16 *field, u8 *buf)
> > 787 {
> > 788 int ret;
> > 789
> > 790 ret = ft260_hid_feature_report_get(hdev, id, cfg, len);
> > 791 if (ret != len && ret >= 0)
> > 792 return -EIO;
> > 793
> > > 794 return scnprintf(buf, PAGE_SIZE, "%hi\n", le16_to_cpu(*field));
> > 795 }
> > 796
> >
> > ---
> > 0-DAY CI Kernel Test Service, Intel Corporation
> > https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
>
> The fix was discussed and submitted on May 10 in this commit
> https://patchwork.kernel.org/project/linux-input/patch/20210510163428.2415-1-michael.zaidman@gmail.com/
> But I see that it was not taken into v5.13.
> Jiri, could you please comment?
This one fell in between cracks of my inbox, sorry. Now queued in
for-5.14/upstream-fixes.
--
Jiri Kosina
SUSE Labs
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: drivers/hid/hid-ft260.c:794:44: warning: format specifies type 'short' but the argument has type 'int'
@ 2021-07-27 10:23 ` Jiri Kosina
0 siblings, 0 replies; 14+ messages in thread
From: Jiri Kosina @ 2021-07-27 10:23 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 1058 bytes --]
On Mon, 26 Jul 2021, Michael Zaidman wrote:
> > vim +794 drivers/hid/hid-ft260.c
> >
> > 784
> > 785 static int ft260_word_show(struct hid_device *hdev, int id, u8 *cfg, int len,
> > 786 u16 *field, u8 *buf)
> > 787 {
> > 788 int ret;
> > 789
> > 790 ret = ft260_hid_feature_report_get(hdev, id, cfg, len);
> > 791 if (ret != len && ret >= 0)
> > 792 return -EIO;
> > 793
> > > 794 return scnprintf(buf, PAGE_SIZE, "%hi\n", le16_to_cpu(*field));
> > 795 }
> > 796
> >
> > ---
> > 0-DAY CI Kernel Test Service, Intel Corporation
> > https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
>
> The fix was discussed and submitted on May 10 in this commit
> https://patchwork.kernel.org/project/linux-input/patch/20210510163428.2415-1-michael.zaidman(a)gmail.com/
> But I see that it was not taken into v5.13.
> Jiri, could you please comment?
This one fell in between cracks of my inbox, sorry. Now queued in
for-5.14/upstream-fixes.
--
Jiri Kosina
SUSE Labs
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: drivers/hid/hid-ft260.c:794:44: warning: format specifies type 'short' but the argument has type 'int'
2021-05-07 10:00 ` Chen, Rong A
@ 2021-05-09 18:25 ` Michael Zaidman
0 siblings, 0 replies; 14+ messages in thread
From: Michael Zaidman @ 2021-05-09 18:25 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 2476 bytes --]
On Fri, May 07, 2021 at 06:00:31PM +0800, Chen, Rong A wrote:
>
>
> On 5/6/2021 7:55 PM, Michael Zaidman wrote:
> > On Thu, May 06, 2021 at 06:47:46AM +0800, kernel test robot wrote:
> > >
> > > drivers/hid/hid-ft260.c:515:59: warning: variable 'len' is uninitialized when used here [-Wuninitialized]
> > > hid_err(hdev, "%s: unsupported wr len: %d\n", __func__, len);
> > > ^~~
> > > include/linux/hid.h:1190:30: note: expanded from macro 'hid_err'
> > > dev_err(&(hid)->dev, fmt, ##__VA_ARGS__)
> > > ^~~~~~~~~~~
> > > include/linux/dev_printk.h:112:32: note: expanded from macro 'dev_err'
> > > _dev_err(dev, dev_fmt(fmt), ##__VA_ARGS__)
> > > ^~~~~~~~~~~
> > > drivers/hid/hid-ft260.c:507:9: note: initialize the variable 'len' to silence this warning
> > > int len, ret;
> > > ^
> > > = 0
> >
> > This warning has already been found and fixed by Dan Carpenter in
> > the "HID: ft260: fix an error message in ft260_i2c_write_read()" commit
> > on March 18, 2021.
>
> Hi Michael,
>
> This report is about the below warning prefixed by '>>', it's still in
> mainline:
>
> >> drivers/hid/hid-ft260.c:794:44: warning: format specifies type 'short'
> but the argument has type 'int' [-Wformat]
> return scnprintf(buf, PAGE_SIZE, "%hi\n", le16_to_cpu(*field));
> ~~~ ^~~~~~~~~~~~~~~~~~~
> %i
>
> Best Regards,
> Rong Chen
Hi Rong,
Sure, but since the report states - "2 warnings generated", I addressed
the first one for which we already have a commit with the fix.
I tried to reproduce the second warning you referred to in this e-mail,
but make.cross script failed since the "clang-latest" directory does not
exist under the "0day". As a workaround, I modified the make command
generated by the script replacing all "clang-latest" occurrences with
"clang" and run it manually.
Another workaround could be to use the symbolic link as reported in the
https://groups.google.com/g/clang-built-linux/c/qCjZblHi8lY/m/eBEEl2JxBgAJ
on March 27, 2021.
Anyway, I reproduced this warning and am going to submit a fix shortly.
Thanks,
Michael
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: drivers/hid/hid-ft260.c:794:44: warning: format specifies type 'short' but the argument has type 'int'
2021-05-06 11:55 ` Michael Zaidman
(?)
@ 2021-05-07 10:00 ` Chen, Rong A
2021-05-09 18:25 ` Michael Zaidman
-1 siblings, 1 reply; 14+ messages in thread
From: Chen, Rong A @ 2021-05-07 10:00 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 1593 bytes --]
On 5/6/2021 7:55 PM, Michael Zaidman wrote:
> On Thu, May 06, 2021 at 06:47:46AM +0800, kernel test robot wrote:
>>
>> drivers/hid/hid-ft260.c:515:59: warning: variable 'len' is uninitialized when used here [-Wuninitialized]
>> hid_err(hdev, "%s: unsupported wr len: %d\n", __func__, len);
>> ^~~
>> include/linux/hid.h:1190:30: note: expanded from macro 'hid_err'
>> dev_err(&(hid)->dev, fmt, ##__VA_ARGS__)
>> ^~~~~~~~~~~
>> include/linux/dev_printk.h:112:32: note: expanded from macro 'dev_err'
>> _dev_err(dev, dev_fmt(fmt), ##__VA_ARGS__)
>> ^~~~~~~~~~~
>> drivers/hid/hid-ft260.c:507:9: note: initialize the variable 'len' to silence this warning
>> int len, ret;
>> ^
>> = 0
>
> This warning has already been found and fixed by Dan Carpenter in
> the "HID: ft260: fix an error message in ft260_i2c_write_read()" commit
> on March 18, 2021.
Hi Michael,
This report is about the below warning prefixed by '>>', it's still in
mainline:
>> drivers/hid/hid-ft260.c:794:44: warning: format specifies type
'short' but the argument has type 'int' [-Wformat]
return scnprintf(buf, PAGE_SIZE, "%hi\n", le16_to_cpu(*field));
~~~ ^~~~~~~~~~~~~~~~~~~
%i
Best Regards,
Rong Chen
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: drivers/hid/hid-ft260.c:794:44: warning: format specifies type 'short' but the argument has type 'int'
2021-05-05 22:47 ` kernel test robot
@ 2021-05-06 11:55 ` Michael Zaidman
-1 siblings, 0 replies; 14+ messages in thread
From: Michael Zaidman @ 2021-05-06 11:55 UTC (permalink / raw)
To: kernel test robot
Cc: kbuild-all, clang-built-linux, linux-kernel, Jiri Kosina,
Jiri Kosina, Michael Zaidman, Dan Carpenter
On Thu, May 06, 2021 at 06:47:46AM +0800, kernel test robot wrote:
>
> drivers/hid/hid-ft260.c:515:59: warning: variable 'len' is uninitialized when used here [-Wuninitialized]
> hid_err(hdev, "%s: unsupported wr len: %d\n", __func__, len);
> ^~~
> include/linux/hid.h:1190:30: note: expanded from macro 'hid_err'
> dev_err(&(hid)->dev, fmt, ##__VA_ARGS__)
> ^~~~~~~~~~~
> include/linux/dev_printk.h:112:32: note: expanded from macro 'dev_err'
> _dev_err(dev, dev_fmt(fmt), ##__VA_ARGS__)
> ^~~~~~~~~~~
> drivers/hid/hid-ft260.c:507:9: note: initialize the variable 'len' to silence this warning
> int len, ret;
> ^
> = 0
This warning has already been found and fixed by Dan Carpenter in
the "HID: ft260: fix an error message in ft260_i2c_write_read()" commit
on March 18, 2021.
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: drivers/hid/hid-ft260.c:794:44: warning: format specifies type 'short' but the argument has type 'int'
@ 2021-05-06 11:55 ` Michael Zaidman
0 siblings, 0 replies; 14+ messages in thread
From: Michael Zaidman @ 2021-05-06 11:55 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 1056 bytes --]
On Thu, May 06, 2021 at 06:47:46AM +0800, kernel test robot wrote:
>
> drivers/hid/hid-ft260.c:515:59: warning: variable 'len' is uninitialized when used here [-Wuninitialized]
> hid_err(hdev, "%s: unsupported wr len: %d\n", __func__, len);
> ^~~
> include/linux/hid.h:1190:30: note: expanded from macro 'hid_err'
> dev_err(&(hid)->dev, fmt, ##__VA_ARGS__)
> ^~~~~~~~~~~
> include/linux/dev_printk.h:112:32: note: expanded from macro 'dev_err'
> _dev_err(dev, dev_fmt(fmt), ##__VA_ARGS__)
> ^~~~~~~~~~~
> drivers/hid/hid-ft260.c:507:9: note: initialize the variable 'len' to silence this warning
> int len, ret;
> ^
> = 0
This warning has already been found and fixed by Dan Carpenter in
the "HID: ft260: fix an error message in ft260_i2c_write_read()" commit
on March 18, 2021.
^ permalink raw reply [flat|nested] 14+ messages in thread
* drivers/hid/hid-ft260.c:794:44: warning: format specifies type 'short' but the argument has type 'int'
@ 2021-05-05 22:47 ` kernel test robot
0 siblings, 0 replies; 14+ messages in thread
From: kernel test robot @ 2021-05-05 22:47 UTC (permalink / raw)
To: Michael Zaidman; +Cc: kbuild-all, clang-built-linux, linux-kernel, Jiri Kosina
[-- Attachment #1: Type: text/plain, Size: 3580 bytes --]
Hi Michael,
FYI, the error/warning still remains.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 8404c9fbc84b741f66cff7d4934a25dd2c344452
commit: 6a82582d9fa438045191074856f47165334f2777 HID: ft260: add usb hid to i2c host bridge driver
date: 7 weeks ago
config: arm64-randconfig-r023-20210505 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 8f5a2a5836cc8e4c1def2bdeb022e7b496623439)
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 arm64 cross compiling tool for clang build
# apt-get install binutils-aarch64-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=6a82582d9fa438045191074856f47165334f2777
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 6a82582d9fa438045191074856f47165334f2777
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=arm64
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/hid/hid-ft260.c:515:59: warning: variable 'len' is uninitialized when used here [-Wuninitialized]
hid_err(hdev, "%s: unsupported wr len: %d\n", __func__, len);
^~~
include/linux/hid.h:1190:30: note: expanded from macro 'hid_err'
dev_err(&(hid)->dev, fmt, ##__VA_ARGS__)
^~~~~~~~~~~
include/linux/dev_printk.h:112:32: note: expanded from macro 'dev_err'
_dev_err(dev, dev_fmt(fmt), ##__VA_ARGS__)
^~~~~~~~~~~
drivers/hid/hid-ft260.c:507:9: note: initialize the variable 'len' to silence this warning
int len, ret;
^
= 0
>> drivers/hid/hid-ft260.c:794:44: warning: format specifies type 'short' but the argument has type 'int' [-Wformat]
return scnprintf(buf, PAGE_SIZE, "%hi\n", le16_to_cpu(*field));
~~~ ^~~~~~~~~~~~~~~~~~~
%i
include/linux/byteorder/generic.h:91:21: note: expanded from macro 'le16_to_cpu'
#define le16_to_cpu __le16_to_cpu
^
include/uapi/linux/byteorder/big_endian.h:36:26: note: expanded from macro '__le16_to_cpu'
#define __le16_to_cpu(x) __swab16((__force __u16)(__le16)(x))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/uapi/linux/swab.h:105:2: note: expanded from macro '__swab16'
(__builtin_constant_p((__u16)(x)) ? \
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2 warnings generated.
vim +794 drivers/hid/hid-ft260.c
784
785 static int ft260_word_show(struct hid_device *hdev, int id, u8 *cfg, int len,
786 u16 *field, u8 *buf)
787 {
788 int ret;
789
790 ret = ft260_hid_feature_report_get(hdev, id, cfg, len);
791 if (ret != len && ret >= 0)
792 return -EIO;
793
> 794 return scnprintf(buf, PAGE_SIZE, "%hi\n", le16_to_cpu(*field));
795 }
796
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 34284 bytes --]
^ permalink raw reply [flat|nested] 14+ messages in thread
* drivers/hid/hid-ft260.c:794:44: warning: format specifies type 'short' but the argument has type 'int'
@ 2021-05-05 22:47 ` kernel test robot
0 siblings, 0 replies; 14+ messages in thread
From: kernel test robot @ 2021-05-05 22:47 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 3657 bytes --]
Hi Michael,
FYI, the error/warning still remains.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 8404c9fbc84b741f66cff7d4934a25dd2c344452
commit: 6a82582d9fa438045191074856f47165334f2777 HID: ft260: add usb hid to i2c host bridge driver
date: 7 weeks ago
config: arm64-randconfig-r023-20210505 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 8f5a2a5836cc8e4c1def2bdeb022e7b496623439)
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 arm64 cross compiling tool for clang build
# apt-get install binutils-aarch64-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=6a82582d9fa438045191074856f47165334f2777
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 6a82582d9fa438045191074856f47165334f2777
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=arm64
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/hid/hid-ft260.c:515:59: warning: variable 'len' is uninitialized when used here [-Wuninitialized]
hid_err(hdev, "%s: unsupported wr len: %d\n", __func__, len);
^~~
include/linux/hid.h:1190:30: note: expanded from macro 'hid_err'
dev_err(&(hid)->dev, fmt, ##__VA_ARGS__)
^~~~~~~~~~~
include/linux/dev_printk.h:112:32: note: expanded from macro 'dev_err'
_dev_err(dev, dev_fmt(fmt), ##__VA_ARGS__)
^~~~~~~~~~~
drivers/hid/hid-ft260.c:507:9: note: initialize the variable 'len' to silence this warning
int len, ret;
^
= 0
>> drivers/hid/hid-ft260.c:794:44: warning: format specifies type 'short' but the argument has type 'int' [-Wformat]
return scnprintf(buf, PAGE_SIZE, "%hi\n", le16_to_cpu(*field));
~~~ ^~~~~~~~~~~~~~~~~~~
%i
include/linux/byteorder/generic.h:91:21: note: expanded from macro 'le16_to_cpu'
#define le16_to_cpu __le16_to_cpu
^
include/uapi/linux/byteorder/big_endian.h:36:26: note: expanded from macro '__le16_to_cpu'
#define __le16_to_cpu(x) __swab16((__force __u16)(__le16)(x))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/uapi/linux/swab.h:105:2: note: expanded from macro '__swab16'
(__builtin_constant_p((__u16)(x)) ? \
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2 warnings generated.
vim +794 drivers/hid/hid-ft260.c
784
785 static int ft260_word_show(struct hid_device *hdev, int id, u8 *cfg, int len,
786 u16 *field, u8 *buf)
787 {
788 int ret;
789
790 ret = ft260_hid_feature_report_get(hdev, id, cfg, len);
791 if (ret != len && ret >= 0)
792 return -EIO;
793
> 794 return scnprintf(buf, PAGE_SIZE, "%hi\n", le16_to_cpu(*field));
795 }
796
---
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: 34284 bytes --]
^ permalink raw reply [flat|nested] 14+ messages in thread
* drivers/hid/hid-ft260.c:794:44: warning: format specifies type 'short' but the argument has type 'int'
@ 2021-05-05 4:02 ` kernel test robot
0 siblings, 0 replies; 14+ messages in thread
From: kernel test robot @ 2021-05-05 4:02 UTC (permalink / raw)
To: Michael Zaidman; +Cc: kbuild-all, clang-built-linux, linux-kernel, Jiri Kosina
[-- Attachment #1: Type: text/plain, Size: 3580 bytes --]
Hi Michael,
FYI, the error/warning still remains.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: d665ea6ea86c785760ee4bad4543dab3267ad074
commit: 6a82582d9fa438045191074856f47165334f2777 HID: ft260: add usb hid to i2c host bridge driver
date: 7 weeks ago
config: arm64-randconfig-r023-20210505 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 8f5a2a5836cc8e4c1def2bdeb022e7b496623439)
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 arm64 cross compiling tool for clang build
# apt-get install binutils-aarch64-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=6a82582d9fa438045191074856f47165334f2777
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 6a82582d9fa438045191074856f47165334f2777
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=arm64
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/hid/hid-ft260.c:515:59: warning: variable 'len' is uninitialized when used here [-Wuninitialized]
hid_err(hdev, "%s: unsupported wr len: %d\n", __func__, len);
^~~
include/linux/hid.h:1190:30: note: expanded from macro 'hid_err'
dev_err(&(hid)->dev, fmt, ##__VA_ARGS__)
^~~~~~~~~~~
include/linux/dev_printk.h:112:32: note: expanded from macro 'dev_err'
_dev_err(dev, dev_fmt(fmt), ##__VA_ARGS__)
^~~~~~~~~~~
drivers/hid/hid-ft260.c:507:9: note: initialize the variable 'len' to silence this warning
int len, ret;
^
= 0
>> drivers/hid/hid-ft260.c:794:44: warning: format specifies type 'short' but the argument has type 'int' [-Wformat]
return scnprintf(buf, PAGE_SIZE, "%hi\n", le16_to_cpu(*field));
~~~ ^~~~~~~~~~~~~~~~~~~
%i
include/linux/byteorder/generic.h:91:21: note: expanded from macro 'le16_to_cpu'
#define le16_to_cpu __le16_to_cpu
^
include/uapi/linux/byteorder/big_endian.h:36:26: note: expanded from macro '__le16_to_cpu'
#define __le16_to_cpu(x) __swab16((__force __u16)(__le16)(x))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/uapi/linux/swab.h:105:2: note: expanded from macro '__swab16'
(__builtin_constant_p((__u16)(x)) ? \
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2 warnings generated.
vim +794 drivers/hid/hid-ft260.c
784
785 static int ft260_word_show(struct hid_device *hdev, int id, u8 *cfg, int len,
786 u16 *field, u8 *buf)
787 {
788 int ret;
789
790 ret = ft260_hid_feature_report_get(hdev, id, cfg, len);
791 if (ret != len && ret >= 0)
792 return -EIO;
793
> 794 return scnprintf(buf, PAGE_SIZE, "%hi\n", le16_to_cpu(*field));
795 }
796
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 34284 bytes --]
^ permalink raw reply [flat|nested] 14+ messages in thread
* drivers/hid/hid-ft260.c:794:44: warning: format specifies type 'short' but the argument has type 'int'
@ 2021-05-05 4:02 ` kernel test robot
0 siblings, 0 replies; 14+ messages in thread
From: kernel test robot @ 2021-05-05 4:02 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 3657 bytes --]
Hi Michael,
FYI, the error/warning still remains.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: d665ea6ea86c785760ee4bad4543dab3267ad074
commit: 6a82582d9fa438045191074856f47165334f2777 HID: ft260: add usb hid to i2c host bridge driver
date: 7 weeks ago
config: arm64-randconfig-r023-20210505 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 8f5a2a5836cc8e4c1def2bdeb022e7b496623439)
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 arm64 cross compiling tool for clang build
# apt-get install binutils-aarch64-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=6a82582d9fa438045191074856f47165334f2777
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 6a82582d9fa438045191074856f47165334f2777
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=arm64
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/hid/hid-ft260.c:515:59: warning: variable 'len' is uninitialized when used here [-Wuninitialized]
hid_err(hdev, "%s: unsupported wr len: %d\n", __func__, len);
^~~
include/linux/hid.h:1190:30: note: expanded from macro 'hid_err'
dev_err(&(hid)->dev, fmt, ##__VA_ARGS__)
^~~~~~~~~~~
include/linux/dev_printk.h:112:32: note: expanded from macro 'dev_err'
_dev_err(dev, dev_fmt(fmt), ##__VA_ARGS__)
^~~~~~~~~~~
drivers/hid/hid-ft260.c:507:9: note: initialize the variable 'len' to silence this warning
int len, ret;
^
= 0
>> drivers/hid/hid-ft260.c:794:44: warning: format specifies type 'short' but the argument has type 'int' [-Wformat]
return scnprintf(buf, PAGE_SIZE, "%hi\n", le16_to_cpu(*field));
~~~ ^~~~~~~~~~~~~~~~~~~
%i
include/linux/byteorder/generic.h:91:21: note: expanded from macro 'le16_to_cpu'
#define le16_to_cpu __le16_to_cpu
^
include/uapi/linux/byteorder/big_endian.h:36:26: note: expanded from macro '__le16_to_cpu'
#define __le16_to_cpu(x) __swab16((__force __u16)(__le16)(x))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/uapi/linux/swab.h:105:2: note: expanded from macro '__swab16'
(__builtin_constant_p((__u16)(x)) ? \
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2 warnings generated.
vim +794 drivers/hid/hid-ft260.c
784
785 static int ft260_word_show(struct hid_device *hdev, int id, u8 *cfg, int len,
786 u16 *field, u8 *buf)
787 {
788 int ret;
789
790 ret = ft260_hid_feature_report_get(hdev, id, cfg, len);
791 if (ret != len && ret >= 0)
792 return -EIO;
793
> 794 return scnprintf(buf, PAGE_SIZE, "%hi\n", le16_to_cpu(*field));
795 }
796
---
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: 34284 bytes --]
^ permalink raw reply [flat|nested] 14+ messages in thread
end of thread, other threads:[~2021-07-27 10:23 UTC | newest]
Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-26 3:07 drivers/hid/hid-ft260.c:794:44: warning: format specifies type 'short' but the argument has type 'int' kernel test robot
2021-07-26 3:07 ` kernel test robot
2021-07-26 9:09 ` Michael Zaidman
2021-07-26 9:09 ` Michael Zaidman
2021-07-27 10:23 ` Jiri Kosina
2021-07-27 10:23 ` Jiri Kosina
-- strict thread matches above, loose matches on Subject: below --
2021-05-05 22:47 kernel test robot
2021-05-05 22:47 ` kernel test robot
2021-05-06 11:55 ` Michael Zaidman
2021-05-06 11:55 ` Michael Zaidman
2021-05-07 10:00 ` Chen, Rong A
2021-05-09 18:25 ` Michael Zaidman
2021-05-05 4:02 kernel test robot
2021-05-05 4:02 ` kernel test robot
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.