Commit 62fad137 authored by Srinivas Pandruvada's avatar Srinivas Pandruvada Committed by Jiri Kosina

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: default avatarkbuild test robot <fengguang.wu@intel.com>
Signed-off-by: default avatarSrinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Signed-off-by: default avatarJiri Kosina <jkosina@suse.cz>
parent eb964833
...@@ -220,7 +220,7 @@ int sensor_hub_set_feature(struct hid_sensor_hub_device *hsdev, u32 report_id, ...@@ -220,7 +220,7 @@ int sensor_hub_set_feature(struct hid_sensor_hub_device *hsdev, u32 report_id,
if (buffer_size) { if (buffer_size) {
for (i = 0; i < buffer_size; ++i) { for (i = 0; i < buffer_size; ++i) {
hid_set_field(report->field[field_index], i, hid_set_field(report->field[field_index], i,
cpu_to_le32(*buf32)); (__force __s32)cpu_to_le32(*buf32));
++buf32; ++buf32;
} }
} }
...@@ -228,7 +228,7 @@ int sensor_hub_set_feature(struct hid_sensor_hub_device *hsdev, u32 report_id, ...@@ -228,7 +228,7 @@ int sensor_hub_set_feature(struct hid_sensor_hub_device *hsdev, u32 report_id,
value = 0; value = 0;
memcpy(&value, (u8 *)buf32, remaining_bytes); memcpy(&value, (u8 *)buf32, remaining_bytes);
hid_set_field(report->field[field_index], i, hid_set_field(report->field[field_index], i,
cpu_to_le32(value)); (__force __s32)cpu_to_le32(value));
} }
hid_hw_request(hsdev->hdev, report, HID_REQ_SET_REPORT); hid_hw_request(hsdev->hdev, report, HID_REQ_SET_REPORT);
hid_hw_wait(hsdev->hdev); hid_hw_wait(hsdev->hdev);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment