Skip to content

Commit 62fad13

Browse files
spandruvadaJiri Kosina
authored andcommitted
HID: hid-sensor-hub: Fix sparse warning
Since I can't change the type of hid_set_field argument 3, using __force __s32 to remove this warning. Reported-by: kbuild test robot <[email protected]> Signed-off-by: Srinivas Pandruvada <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
1 parent eb96483 commit 62fad13

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/hid/hid-sensor-hub.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -220,15 +220,15 @@ int sensor_hub_set_feature(struct hid_sensor_hub_device *hsdev, u32 report_id,
220220
if (buffer_size) {
221221
for (i = 0; i < buffer_size; ++i) {
222222
hid_set_field(report->field[field_index], i,
223-
cpu_to_le32(*buf32));
223+
(__force __s32)cpu_to_le32(*buf32));
224224
++buf32;
225225
}
226226
}
227227
if (remaining_bytes) {
228228
value = 0;
229229
memcpy(&value, (u8 *)buf32, remaining_bytes);
230230
hid_set_field(report->field[field_index], i,
231-
cpu_to_le32(value));
231+
(__force __s32)cpu_to_le32(value));
232232
}
233233
hid_hw_request(hsdev->hdev, report, HID_REQ_SET_REPORT);
234234
hid_hw_wait(hsdev->hdev);

0 commit comments

Comments
 (0)