From: Michael Zaidman <michael.zaidman@gmail.com>
To: kbuild-all@lists.01.org
Subject: Re: drivers/hid/hid-ft260.c:794:44: warning: format specifies type 'short' but the argument has type 'int'
Date: Sun, 09 May 2021 21:25:58 +0300 [thread overview]
Message-ID: <20210509182558.GA4940@michael-VirtualBox> (raw)
In-Reply-To: <0102b8fe-3edf-3d4f-2622-d1fefb36274f@intel.com>
[-- 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
WARNING: multiple messages have this Message-ID (diff)
From: Michael Zaidman <michael.zaidman@gmail.com>
To: "Chen, Rong A" <rong.a.chen@intel.com>
Cc: kernel test robot <lkp@intel.com>,
kbuild-all@lists.01.org, clang-built-linux@googlegroups.com,
linux-kernel@vger.kernel.org, Jiri Kosina <jkosina@suse.cz>,
Jiri Kosina <jikos@kernel.org>,
Dan Carpenter <dan.carpenter@oracle.com>,
michael.zaidman@gmail.com
Subject: Re: [kbuild-all] Re: drivers/hid/hid-ft260.c:794:44: warning: format specifies type 'short' but the argument has type 'int'
Date: Sun, 9 May 2021 21:25:58 +0300 [thread overview]
Message-ID: <20210509182558.GA4940@michael-VirtualBox> (raw)
In-Reply-To: <0102b8fe-3edf-3d4f-2622-d1fefb36274f@intel.com>
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
next prev parent reply other threads:[~2021-05-09 18:25 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-05 22:47 drivers/hid/hid-ft260.c:794:44: warning: format specifies type 'short' but the argument has type 'int' 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-07 10:00 ` [kbuild-all] " Chen, Rong A
2021-05-09 18:25 ` Michael Zaidman [this message]
2021-05-09 18:25 ` Michael Zaidman
2021-05-09 19:32 ` [PATCH] HID: ft260: fix format type warning in ft260_word_show() Michael Zaidman
2021-05-09 19:32 ` Michael Zaidman
2021-05-09 20:39 ` Joe Perches
2021-05-09 20:39 ` Joe Perches
2021-05-10 9:17 ` Michael Zaidman
2021-05-10 9:17 ` Michael Zaidman
2021-05-10 9:52 ` Joe Perches
2021-05-10 9:52 ` Joe Perches
2021-05-10 10:15 ` Dan Carpenter
2021-05-10 10:15 ` Dan Carpenter
2021-05-10 10:22 ` Dan Carpenter
2021-05-10 10:22 ` Dan Carpenter
2021-05-10 12:51 ` Michael Zaidman
2021-05-10 12:51 ` Michael Zaidman
2021-05-10 16:30 ` [PATCH v2] " Michael Zaidman
2021-05-10 16:30 ` Michael Zaidman
2021-05-10 16:41 ` Joe Perches
2021-05-10 16:41 ` Joe Perches
2021-05-10 16:34 ` [PATCH v3] " Michael Zaidman
2021-05-10 16:34 ` Michael Zaidman
-- strict thread matches above, loose matches on Subject: below --
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
2021-05-05 4:02 kernel test robot
2021-05-05 4:02 ` kernel test robot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210509182558.GA4940@michael-VirtualBox \
--to=michael.zaidman@gmail.com \
--cc=kbuild-all@lists.01.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.