[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <6a589bf720c5420e09bcc3c40b812bf6822d3a3d.camel@perches.com>
Date: Mon, 10 May 2021 09:41:57 -0700
From: Joe Perches <joe@...ches.com>
To: Michael Zaidman <michael.zaidman@...il.com>, lkp@...el.com
Cc: kbuild-all@...ts.01.org, clang-built-linux@...glegroups.com,
linux-kernel@...r.kernel.org, jikos@...nel.org,
dan.carpenter@...cle.com, linux-input@...r.kernel.org
Subject: Re: [PATCH v2] HID: ft260: fix format type warning in
ft260_word_show()
On Mon, 2021-05-10 at 19:30 +0300, Michael Zaidman wrote:
> Fixes: 6a82582d9fa4 ("HID: ft260: add usb hid to i2c host bridge driver")
>
> Fix warning reported by static analysis when built with W=1 for arm64 by
> clang version 13.0.0
>
> > > drivers/hid/hid-ft260.c:794:44: warning: format specifies type 'short' but
> the argument has type 'int' [-Wformat]
[]
> diff --git a/drivers/hid/hid-ft260.c b/drivers/hid/hid-ft260.c
[]
> @@ -791,7 +791,7 @@ static int ft260_word_show(struct hid_device *hdev, int id, u8 *cfg, int len,
> if (ret != len && ret >= 0)
> return -EIO;
>
>
> - return scnprintf(buf, PAGE_SIZE, "%hi\n", le16_to_cpu(*field));
> + return scnprintf(buf, PAGE_SIZE, "%d\n", le16_to_cpu(*field));
> }
This is likely a clang defect and not an actual problem.
If you are going to convert one of these, convert both.
Powered by blists - more mailing lists