mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Sasha Levin <sashal@kernel.org>
To: linux-kernel@vger.kernel.org, stable@vger.kernel.org
Cc: Vishnu Sankar <vishnuocv@gmail.com>,
	Vishnu Sankar <vsankar@lenovo.com>,
	kernel test robot <lkp@intel.com>, Jiri Kosina <jkosina@suse.com>,
	Sasha Levin <sashal@kernel.org>,
	jikos@kernel.org, bentiss@kernel.org,
	linux-input@vger.kernel.org
Subject: [PATCH AUTOSEL 6.14 19/27] HID: lenovo: Fix to ensure the data as __le32 instead of u32
Date: Mon, 31 Mar 2025 10:52:37 -0400	[thread overview]
Message-ID: <20250331145245.1704714-19-sashal@kernel.org> (raw)
In-Reply-To: <20250331145245.1704714-1-sashal@kernel.org>

From: Vishnu Sankar <vishnuocv@gmail.com>

[ Upstream commit d6ea85f8371b99c1d3a90ee4e2fb1a648f8d71d3 ]

Ensure that data is treated as __le32 instead of u32 before
applying le32_to_cpu.
This patch fixes the sparse warning "sparse: cast to restricted __le32".

Signed-off-by: Vishnu Sankar <vishnuocv@gmail.com>
Signed-off-by: Vishnu Sankar <vsankar@lenovo.com>
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202501101635.qJrwAOwf-lkp@intel.com/
Signed-off-by: Jiri Kosina <jkosina@suse.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/hid/hid-lenovo.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/hid/hid-lenovo.c b/drivers/hid/hid-lenovo.c
index a7d9ca02779ea..04508c36bdc82 100644
--- a/drivers/hid/hid-lenovo.c
+++ b/drivers/hid/hid-lenovo.c
@@ -778,7 +778,7 @@ static int lenovo_raw_event(struct hid_device *hdev,
 	if (unlikely((hdev->product == USB_DEVICE_ID_LENOVO_X12_TAB
 			|| hdev->product == USB_DEVICE_ID_LENOVO_X12_TAB2)
 			&& size >= 3 && report->id == 0x03))
-		return lenovo_raw_event_TP_X12_tab(hdev, le32_to_cpu(*(u32 *)data));
+		return lenovo_raw_event_TP_X12_tab(hdev, le32_to_cpu(*(__le32 *)data));
 
 	return 0;
 }
-- 
2.39.5


  parent reply	other threads:[~2025-03-31 14:53 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-31 14:52 [PATCH AUTOSEL 6.14 01/27] platform/chrome: cros_ec_lpc: Match on Framework ACPI device Sasha Levin
2025-03-31 14:52 ` [PATCH AUTOSEL 6.14 02/27] ASoC: SOF: topology: Use krealloc_array() to replace krealloc() Sasha Levin
2025-03-31 14:52 ` [PATCH AUTOSEL 6.14 03/27] HID: pidff: Convert infinite length from Linux API to PID standard Sasha Levin
2025-03-31 14:52 ` [PATCH AUTOSEL 6.14 04/27] HID: pidff: Do not send effect envelope if it's empty Sasha Levin
2025-03-31 14:52 ` [PATCH AUTOSEL 6.14 05/27] HID: pidff: Add MISSING_DELAY quirk and its detection Sasha Levin
2025-03-31 14:52 ` [PATCH AUTOSEL 6.14 06/27] HID: pidff: Add MISSING_PBO " Sasha Levin
2025-03-31 14:52 ` [PATCH AUTOSEL 6.14 07/27] HID: pidff: Add PERMISSIVE_CONTROL quirk Sasha Levin
2025-03-31 14:52 ` [PATCH AUTOSEL 6.14 08/27] HID: pidff: Add hid_pidff_init_with_quirks and export as GPL symbol Sasha Levin
2025-03-31 14:52 ` [PATCH AUTOSEL 6.14 09/27] HID: pidff: Add FIX_WHEEL_DIRECTION quirk Sasha Levin
2025-03-31 14:52 ` [PATCH AUTOSEL 6.14 10/27] HID: Add hid-universal-pidff driver and supported device ids Sasha Levin
2025-03-31 14:52 ` [PATCH AUTOSEL 6.14 11/27] HID: pidff: Add PERIODIC_SINE_ONLY quirk Sasha Levin
2025-03-31 14:52 ` [PATCH AUTOSEL 6.14 12/27] HID: pidff: Fix null pointer dereference in pidff_find_fields Sasha Levin
2025-03-31 14:52 ` [PATCH AUTOSEL 6.14 13/27] ASoC: amd: ps: use macro for ACP6.3 pci revision id Sasha Levin
2025-03-31 14:52 ` [PATCH AUTOSEL 6.14 14/27] ASoC: amd: amd_sdw: Add quirks for Dell SKU's Sasha Levin
2025-03-31 14:52 ` [PATCH AUTOSEL 6.14 15/27] ALSA: hda: intel: Fix Optimus when GPU has no sound Sasha Levin
2025-03-31 14:52 ` [PATCH AUTOSEL 6.14 16/27] ALSA: hda: intel: Add Lenovo IdeaPad Z570 to probe denylist Sasha Levin
2025-03-31 14:52 ` [PATCH AUTOSEL 6.14 17/27] ASoC: fsl_audmix: register card device depends on 'dais' property Sasha Levin
2025-03-31 14:52 ` [PATCH AUTOSEL 6.14 18/27] media: uvcvideo: Add quirk for Actions UVC05 Sasha Levin
2025-03-31 14:52 ` Sasha Levin [this message]
2025-03-31 14:52 ` [PATCH AUTOSEL 6.14 20/27] media: s5p-mfc: Corrected NV12M/NV21M plane-sizes Sasha Levin
2025-03-31 14:52 ` [PATCH AUTOSEL 6.14 21/27] mmc: dw_mmc: add a quirk for accessing 64-bit FIFOs in two halves Sasha Levin
2025-03-31 14:52 ` [PATCH AUTOSEL 6.14 22/27] ALSA: usb-audio: Fix CME quirk for UF series keyboards Sasha Levin
2025-03-31 14:52 ` [PATCH AUTOSEL 6.14 23/27] ASoC: amd: Add DMI quirk for ACP6X mic support Sasha Levin
2025-03-31 14:52 ` [PATCH AUTOSEL 6.14 24/27] ALSA: hda/realtek: fix micmute LEDs on HP Laptops with ALC3315 Sasha Levin
2025-03-31 14:52 ` [PATCH AUTOSEL 6.14 25/27] ALSA: hda/realtek: fix micmute LEDs on HP Laptops with ALC3247 Sasha Levin
2025-03-31 14:52 ` [PATCH AUTOSEL 6.14 26/27] ASoC: amd: yc: update quirk data for new Lenovo model Sasha Levin
2025-03-31 14:52 ` [PATCH AUTOSEL 6.14 27/27] platform/x86: x86-android-tablets: Add select POWER_SUPPLY to Kconfig Sasha Levin

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=20250331145245.1704714-19-sashal@kernel.org \
    --to=sashal@kernel.org \
    --cc=bentiss@kernel.org \
    --cc=jikos@kernel.org \
    --cc=jkosina@suse.com \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lkp@intel.com \
    --cc=stable@vger.kernel.org \
    --cc=vishnuocv@gmail.com \
    --cc=vsankar@lenovo.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®