From patchwork Sat Jun 18 12:13:15 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fengguang Wu X-Patchwork-Id: 9185527 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 5F5A26075F for ; Sat, 18 Jun 2016 12:14:01 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4EBD327D4A for ; Sat, 18 Jun 2016 12:14:01 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 40E2628358; Sat, 18 Jun 2016 12:14:01 +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 A889F27D4A for ; Sat, 18 Jun 2016 12:14:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751228AbcFRMNz (ORCPT ); Sat, 18 Jun 2016 08:13:55 -0400 Received: from mga03.intel.com ([134.134.136.65]:11850 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751015AbcFRMNz (ORCPT ); Sat, 18 Jun 2016 08:13:55 -0400 Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga103.jf.intel.com with ESMTP; 18 Jun 2016 05:13:54 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.26,487,1459839600"; d="scan'208";a="1004860315" Received: from bee.sh.intel.com (HELO bee) ([10.239.97.14]) by fmsmga002.fm.intel.com with ESMTP; 18 Jun 2016 05:13:47 -0700 Received: from kbuild by bee with local (Exim 4.83) (envelope-from ) id 1bEF88-000T2j-AY; Sat, 18 Jun 2016 20:13:40 +0800 Date: Sat, 18 Jun 2016 20:13:15 +0800 From: kbuild test robot Cc: kbuild-all@01.org, linux-input@vger.kernel.org, linux-usb@vger.kernel.org, Jiri Kosina , Masaki Ota Subject: [PATCH] HID: fix noderef.cocci warnings Message-ID: <20160618121314.GA95633@lkp-ib04> References: <201606182012.7NLmbFhz%fengguang.wu@intel.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <201606182012.7NLmbFhz%fengguang.wu@intel.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 To: unlisted-recipients:; (no To-header on input) 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-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(-) -- 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-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) {