[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20161121120531.GA65643@xian.lkp.intel.com>
Date: Mon, 21 Nov 2016 20:05:31 +0800
From: kbuild test robot <lkp@...el.com>
To: Benjamin Tissoires <benjamin.tissoires@...hat.com>
Cc: kbuild-all@...org, Jiri Kosina <jikos@...nel.org>,
linux-input@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: [PATCH] HID: lg: fix noderef.cocci warnings
drivers/hid/hid-lg.c:780:47-53: 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: Benjamin Tissoires <benjamin.tissoires@...hat.com>
Signed-off-by: Fengguang Wu <fengguang.wu@...el.com>
---
hid-lg.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
--- a/drivers/hid/hid-lg.c
+++ b/drivers/hid/hid-lg.c
@@ -777,8 +777,10 @@ static int lg_probe(struct hid_device *h
buf[1] = 0xB2;
get_random_bytes(&buf[2], 2);
- ret = hid_hw_raw_request(hdev, buf[0], buf, sizeof(buf),
- HID_FEATURE_REPORT, HID_REQ_SET_REPORT);
+ ret = hid_hw_raw_request(hdev, buf[0], buf,
+ sizeof(*buf),
+ HID_FEATURE_REPORT,
+ HID_REQ_SET_REPORT);
}
kfree(buf);
}
Powered by blists - more mailing lists