[PATCH] HID: intel-thc-hid: intel-quicki2c: Fix wrong type casting

Xinpeng Sun posted 1 patch 2 months, 1 week ago
drivers/hid/intel-thc-hid/intel-quicki2c/pci-quicki2c.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[PATCH] HID: intel-thc-hid: intel-quicki2c: Fix wrong type casting
Posted by Xinpeng Sun 2 months, 1 week ago
The type definition of qcdev->i2c_max_frame_size is already
u32, so remove the unnecessary type casting le16_to_cpu.

Signed-off-by: Xinpeng Sun <xinpeng.sun@intel.com>
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202509280841.pxmgBzKW-lkp@intel.com/
---
 drivers/hid/intel-thc-hid/intel-quicki2c/pci-quicki2c.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/hid/intel-thc-hid/intel-quicki2c/pci-quicki2c.c b/drivers/hid/intel-thc-hid/intel-quicki2c/pci-quicki2c.c
index 8433a991e7f4..0156ab391778 100644
--- a/drivers/hid/intel-thc-hid/intel-quicki2c/pci-quicki2c.c
+++ b/drivers/hid/intel-thc-hid/intel-quicki2c/pci-quicki2c.c
@@ -466,7 +466,7 @@ static void quicki2c_dma_adv_enable(struct quicki2c_device *qcdev)
 			dev_warn(qcdev->dev,
 				 "Max frame size is smaller than hid max input length!");
 			thc_i2c_set_rx_max_size(qcdev->thc_hw,
-						le16_to_cpu(qcdev->i2c_max_frame_size));
+						qcdev->i2c_max_frame_size);
 		}
 		thc_i2c_rx_max_size_enable(qcdev->thc_hw, true);
 	}
-- 
2.40.1
Re: [PATCH] HID: intel-thc-hid: intel-quicki2c: Fix wrong type casting
Posted by Jiri Kosina 2 months ago
On Thu, 9 Oct 2025, Xinpeng Sun wrote:

> The type definition of qcdev->i2c_max_frame_size is already
> u32, so remove the unnecessary type casting le16_to_cpu.
> 
> Signed-off-by: Xinpeng Sun <xinpeng.sun@intel.com>
> Reported-by: kernel test robot <lkp@intel.com>
> Closes: https://lore.kernel.org/oe-kbuild-all/202509280841.pxmgBzKW-lkp@intel.com/

Applied to hid.git#for-6.18/upstream-fixes, thanks.

-- 
Jiri Kosina
SUSE Labs