summaryrefslogtreecommitdiffstats
path: root/drivers/hid/hid-sensor-hub.c
diff options
context:
space:
mode:
authorSrinivas Pandruvada <srinivas.pandruvada@linux.intel.com>2015-02-26 20:04:44 +0100
committerJiri Kosina <jkosina@suse.cz>2015-03-16 16:24:55 +0100
commit62fad137bb1fc1dd08352aba18e7e13d0d682ef3 (patch)
treed480809500e7f11c2cae549eb62a404d444bdf83 /drivers/hid/hid-sensor-hub.c
parentHID: hid-sensor-hub: fix attribute read for logical usage id (diff)
downloadlinux-62fad137bb1fc1dd08352aba18e7e13d0d682ef3.tar.xz
linux-62fad137bb1fc1dd08352aba18e7e13d0d682ef3.zip
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 <fengguang.wu@intel.com> Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'drivers/hid/hid-sensor-hub.c')
-rw-r--r--drivers/hid/hid-sensor-hub.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/hid/hid-sensor-hub.c b/drivers/hid/hid-sensor-hub.c
index 96f18be9c4e1..ecdcb5ac91f9 100644
--- a/drivers/hid/hid-sensor-hub.c
+++ b/drivers/hid/hid-sensor-hub.c
@@ -220,7 +220,7 @@ int sensor_hub_set_feature(struct hid_sensor_hub_device *hsdev, u32 report_id,
if (buffer_size) {
for (i = 0; i < buffer_size; ++i) {
hid_set_field(report->field[field_index], i,
- cpu_to_le32(*buf32));
+ (__force __s32)cpu_to_le32(*buf32));
++buf32;
}
}
@@ -228,7 +228,7 @@ int sensor_hub_set_feature(struct hid_sensor_hub_device *hsdev, u32 report_id,
value = 0;
memcpy(&value, (u8 *)buf32, remaining_bytes);
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_wait(hsdev->hdev);