* [PATCH] HID: uclogic: Fix warning in uclogic_rdesc_template_apply
@ 2022-07-11 7:33 José Expósito
0 siblings, 0 replies; only message in thread
From: José Expósito @ 2022-07-11 7:33 UTC (permalink / raw)
To: jikos
Cc: benjamin.tissoires, spbnick, linux-input, linux-kernel,
José Expósito
Building with Sparse enabled prints this warning:
warning: incorrect type in assignment (different base types)
expected signed int x
got restricted __le32 [usertype]
Cast the return value of cpu_to_le32() to fix the warning.
Fixes: 08177f40bd00 ("HID: uclogic: merge hid-huion driver in hid-uclogic")
Signed-off-by: José Expósito <jose.exposito89@gmail.com>
---
drivers/hid/hid-uclogic-rdesc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/hid/hid-uclogic-rdesc.c b/drivers/hid/hid-uclogic-rdesc.c
index 13f9ce73f1b1..9fe048729e51 100644
--- a/drivers/hid/hid-uclogic-rdesc.c
+++ b/drivers/hid/hid-uclogic-rdesc.c
@@ -1009,7 +1009,7 @@ __u8 *uclogic_rdesc_template_apply(const __u8 *template_ptr,
if (memcmp(p, head, sizeof(head)) == 0 &&
p[sizeof(head)] < param_num) {
v = param_list[p[sizeof(head)]];
- put_unaligned(cpu_to_le32(v), (s32 *)p);
+ put_unaligned((__force u32)cpu_to_le32(v), (s32 *)p);
p += sizeof(head) + 1;
} else {
p++;
--
2.25.1
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-07-11 7:33 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-11 7:33 [PATCH] HID: uclogic: Fix warning in uclogic_rdesc_template_apply José Expósito
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®