From patchwork Mon Nov 21 12:05:31 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: kernel test robot X-Patchwork-Id: 9439295 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 93CAD606DB for ; Mon, 21 Nov 2016 12:06:33 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7EF5428A71 for ; Mon, 21 Nov 2016 12:06:33 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7126A288FE; Mon, 21 Nov 2016 12:06:33 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0C5A1288FE for ; Mon, 21 Nov 2016 12:06:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754075AbcKUMGO (ORCPT ); Mon, 21 Nov 2016 07:06:14 -0500 Received: from mga07.intel.com ([134.134.136.100]:57125 "EHLO mga07.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754191AbcKUMGM (ORCPT ); Mon, 21 Nov 2016 07:06:12 -0500 Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga105.jf.intel.com with ESMTP; 21 Nov 2016 04:06:11 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.31,675,1473145200"; d="scan'208";a="903912784" Received: from bee.sh.intel.com (HELO bee) ([10.239.97.14]) by orsmga003.jf.intel.com with ESMTP; 21 Nov 2016 04:06:08 -0800 Received: from kbuild by bee with local (Exim 4.84_2) (envelope-from ) id 1c8nN8-000Nhk-SD; Mon, 21 Nov 2016 20:06:54 +0800 Date: Mon, 21 Nov 2016 20:05:31 +0800 From: kbuild test robot To: Benjamin Tissoires Cc: kbuild-all@01.org, Jiri Kosina , linux-input@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] HID: lg: fix noderef.cocci warnings Message-ID: <20161121120531.GA65643@xian.lkp.intel.com> References: <201611211942.OoqNaSxL%fengguang.wu@intel.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <1479725322-30863-3-git-send-email-benjamin.tissoires@redhat.com> User-Agent: Mutt/1.5.23 (2014-03-12) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: fengguang.wu@intel.com X-SA-Exim-Scanned: No (on bee); SAEximRunCond expanded to false Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 Signed-off-by: Fengguang Wu --- hid-lg.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-input" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html --- 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); }