From mboxrd@z Thu Jan 1 00:00:00 1970 From: kbuild test robot Subject: [PATCH] HID: fix noderef.cocci warnings Date: Sat, 18 Jun 2016 20:13:15 +0800 Message-ID: <20160618121314.GA95633@lkp-ib04> References: <201606182012.7NLmbFhz%fengguang.wu@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: <201606182012.7NLmbFhz%fengguang.wu-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org> Sender: linux-usb-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org Cc: kbuild-all-JC7UmRfGjtg@public.gmane.org, linux-input-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Jiri Kosina , Masaki Ota List-Id: linux-input@vger.kernel.org drivers/hid/hid-alps.c:139:3-9: ERROR: application of sizeof to pointer drivers/hid/hid-alps.c:148:4-10: ERROR: application of sizeof to pointer sizeof when applied to a pointer typed expression gives the size of the pointer Generated by: scripts/coccinelle/misc/noderef.cocci CC: Masaki Ota Signed-off-by: Fengguang Wu --- hid-alps.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) --- a/drivers/hid/hid-alps.c +++ b/drivers/hid/hid-alps.c @@ -136,7 +136,8 @@ static int u1_read_write_register(struct input[7] = check_sum; ret = hid_hw_raw_request(hdev, U1_FEATURE_REPORT_ID, input, - sizeof(input), HID_FEATURE_REPORT, HID_REQ_SET_REPORT); + sizeof(*input), HID_FEATURE_REPORT, + HID_REQ_SET_REPORT); if (ret < 0) { dev_err(&hdev->dev, "failed to read command (%d)\n", ret); @@ -145,7 +146,7 @@ static int u1_read_write_register(struct if (read_flag) { ret = hid_hw_raw_request(hdev, U1_FEATURE_REPORT_ID, readbuf, - sizeof(readbuf), HID_FEATURE_REPORT, + sizeof(*readbuf), HID_FEATURE_REPORT, HID_REQ_GET_REPORT); if (ret < 0) { -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html