Fix sparse warnings in hid-huion.c by using correct buffer type for retrieved string descriptor. The warnings in question were: drivers/hid/hid-huion.c:144:44: sparse: cast to restricted __le16 drivers/hid/hid-huion.c:145:44: sparse: cast to restricted __le16 drivers/hid/hid-huion.c:146:51: sparse: cast to restricted __le16 drivers/hid/hid-huion.c:147:30: sparse: cast to restricted __le16 Signed-off-by: Nikolai Kondrashov <spbnick@xxxxxxxxx> --- Hi Jiri, Benjamin, Thanks for the review. There is one minor problem, though. I didn't run a sparse check and only just got a message with "sparse" warnings. This patch fixes them. If you wouldn't like adding a tiny patch like this, I can send another version of the original patches. Otherwise, please feel free to just fixup my "Switch to generating report descriptor" commit with this one. I'll try to remember to run sparse next time before submitting the patches. Thank you. Nick drivers/hid/hid-huion.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/hid/hid-huion.c b/drivers/hid/hid-huion.c index 438b54e..60f44cd 100644 --- a/drivers/hid/hid-huion.c +++ b/drivers/hid/hid-huion.c @@ -115,7 +115,7 @@ static int huion_tablet_enable(struct hid_device *hdev) int rc; struct usb_device *usb_dev = hid_to_usb_dev(hdev); struct huion_drvdata *drvdata = hid_get_drvdata(hdev); - u16 buf[6]; + __le16 buf[6]; /* * Read string descriptor containing tablet parameters. The specific -- 2.0.1 -- To unsubscribe from this list: send the line "unsubscribe linux-input" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html