[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <DM4PR11MB599552C6835165C5FCD7F65793FF2@DM4PR11MB5995.namprd11.prod.outlook.com>
Date: Mon, 3 Jun 2024 02:58:20 +0000
From: "Zhang, Lixu" <lixu.zhang@...el.com>
To: Arnd Bergmann <arnd@...nel.org>, Srinivas Pandruvada
<srinivas.pandruvada@...ux.intel.com>, Jiri Kosina <jikos@...nel.org>,
Benjamin Tissoires <bentiss@...nel.org>
CC: Arnd Bergmann <arnd@...db.de>, "linux-input@...r.kernel.org"
<linux-input@...r.kernel.org>, "linux-kernel@...r.kernel.org"
<linux-kernel@...r.kernel.org>
Subject: RE: [PATCH] [v2] HID: intel-ish-hid: fix endian-conversion
>-----Original Message-----
>From: Arnd Bergmann <arnd@...nel.org>
>Sent: Saturday, June 1, 2024 12:28 AM
>To: Srinivas Pandruvada <srinivas.pandruvada@...ux.intel.com>; Jiri Kosina
><jikos@...nel.org>; Benjamin Tissoires <bentiss@...nel.org>; Zhang, Lixu
><lixu.zhang@...el.com>
>Cc: Arnd Bergmann <arnd@...db.de>; linux-input@...r.kernel.org; linux-
>kernel@...r.kernel.org
>Subject: [PATCH] [v2] HID: intel-ish-hid: fix endian-conversion
>
>From: Arnd Bergmann <arnd@...db.de>
>
>The newly added file causes a ton of sparse warnings about the incorrect use of
>__le32 and similar types:
>
>drivers/hid/intel-ish-hid/ishtp/loader.h:41:23: error: invalid bitfield specifier for
>type restricted __le32.
>drivers/hid/intel-ish-hid/ishtp/loader.h:42:27: error: invalid bitfield specifier for
>type restricted __le32.
>drivers/hid/intel-ish-hid/ishtp/loader.h:43:24: error: invalid bitfield specifier for
>type restricted __le32.
>drivers/hid/intel-ish-hid/ishtp/loader.h:44:24: error: invalid bitfield specifier for
>type restricted __le32.
>drivers/hid/intel-ish-hid/ishtp/loader.h:45:22: error: invalid bitfield specifier for
>type restricted __le32.
>drivers/hid/intel-ish-hid/ishtp/loader.c:172:33: warning: restricted __le32
>degrades to integer
>drivers/hid/intel-ish-hid/ishtp/loader.c:178:50: warning: incorrect type in
>assignment (different base types)
>drivers/hid/intel-ish-hid/ishtp/loader.c:178:50: expected restricted __le32
>[usertype] length
>drivers/hid/intel-ish-hid/ishtp/loader.c:178:50: got unsigned long
>drivers/hid/intel-ish-hid/ishtp/loader.c:179:50: warning: incorrect type in
>assignment (different base types)
>drivers/hid/intel-ish-hid/ishtp/loader.c:179:50: expected restricted __le32
>[usertype] fw_off
>drivers/hid/intel-ish-hid/ishtp/loader.c:179:50: got unsigned int [usertype]
>offset
>drivers/hid/intel-ish-hid/ishtp/loader.c:180:17: warning: cast from restricted
>__le32
>drivers/hid/intel-ish-hid/ishtp/loader.c:183:24: warning: invalid assignment: +=
>drivers/hid/intel-ish-hid/ishtp/loader.c:183:24: left side has type unsigned int
>drivers/hid/intel-ish-hid/ishtp/loader.c:183:24: right side has type restricted
>__le32
>
>Add the necessary conversions and use temporary variables where appropriate
>to avoid converting back.
>
>Fixes: 579a267e4617 ("HID: intel-ish-hid: Implement loading firmware from
>host feature")
>Signed-off-by: Arnd Bergmann <arnd@...db.de>
>---
>v2:
> - fix minor issues introduced in rebasing
> - rebase again on linux-next without the cache management patch
> - fix up changelog text
>---
Thanks for your patch. I have tested it on LNL platform, it works fine.
Please fix the build warning reported by kernel test robot. https://lore.kernel.org/oe-kbuild-all/202406011319.hk4MAysc-lkp@intel.com/
drivers/hid/intel-ish-hid/ishtp/loader.c:170: warning: Function parameter or struct member 'fragment_count' not described in 'prepare_dma_bufs'
After that, please add my name.
Reviewed-by: Zhang Lixu <lixu.zhang@...el.com>
Tested-by: Zhang Lixu <lixu.zhang@...el.com>
Thanks,
Lixu
Powered by blists - more mailing lists