From patchwork Mon Jan 17 01:41:58 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: kernel test robot X-Patchwork-Id: 12714710 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 392FBC433F5 for ; Mon, 17 Jan 2022 01:43:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=oeD9thxv8LgrRpmA2hJwGOtpuhZIVS+ua4EGVwjdG1Q=; b=SrSemEDlZdkfnV FXjHXAhaIWA6IAhlc9uWdNBywFlJDQaGQXEUobyY2tBi4OmfabbgOkJTqotSBe0ZNdxDNkKK+JjsQ YG3/x0R4WMEhxIHbrD+zpReYgeEAWrclexTEeCSKgUqopqJxf/lYzTp5iOc78W5r/DP3AgcKwjxuR PsMnJQARY7h+pbeMxI6PMyTfJ+BmxDOjkw8L43LCcHWtRpb3QhrCmz4a8nHfvAcfjzQKxTDRuhghM FL5lVVpGJaI45yWmF0gHEXBQdIkyOiSDM+L7t+7dPmu2V/sRD2njk7+9UQ224Jln7nvJuq2HMvrHm odbU5WN4XkW6GxOspncw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1n9H2Q-00DD9b-2g; Mon, 17 Jan 2022 01:42:26 +0000 Received: from mga05.intel.com ([192.55.52.43]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1n9H2N-00DD8v-5S for linux-arm-kernel@lists.infradead.org; Mon, 17 Jan 2022 01:42:24 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1642383743; x=1673919743; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=b1FOijXCNGQB+U1xU7xrE/yLYnM+fWJ5qonwhyGl+54=; b=L1EkNnZNXcjY9n3sDKZs2sTGgba6wsYKOSPZaB18WbTsC+Uyf4GIO8Kz SnODDbnXJdTWVK8ko7xiIVHhYqmDu9D8Sler5HL7+a5SnaGBHjucyQ08l EQo7tlOOoERSUgM3AYt+WxVEp/IVt4EZm0XGPHIoHVELId7TLoSpb5j5s Xb86Ms3D8f9T/WPOtKtX9Uvcl6hiFTSau0YtJnd7B3cnl1VSA8gzDmUJ5 PnqrDof2yGYBF9ZMErgaAocRbASsX34zDZjLiWBTsSBkXm2WrjfyoyJL2 pDedTu+RJQYhOC4VQtbET1mxwblqm1PbNuKC92Z0ei0c2wG8p8J/q8nYc Q==; X-IronPort-AV: E=McAfee;i="6200,9189,10229"; a="330883100" X-IronPort-AV: E=Sophos;i="5.88,294,1635231600"; d="scan'208";a="330883100" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Jan 2022 17:42:21 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.88,294,1635231600"; d="scan'208";a="531138659" Received: from lkp-server01.sh.intel.com (HELO 276f1b88eecb) ([10.239.97.150]) by orsmga008.jf.intel.com with ESMTP; 16 Jan 2022 17:42:20 -0800 Received: from kbuild by 276f1b88eecb with local (Exim 4.92) (envelope-from ) id 1n9H2J-000B97-Vb; Mon, 17 Jan 2022 01:42:19 +0000 Date: Mon, 17 Jan 2022 09:41:58 +0800 From: kernel test robot To: Linus Walleij Cc: kbuild-all@lists.01.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH] power: supply_core: fix noderef.cocci warnings Message-ID: <20220117014158.GA3685@07889aeafbfc> References: <202201170953.yxBdZqTf-lkp@intel.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <202201170953.yxBdZqTf-lkp@intel.com> User-Agent: Mutt/1.10.1 (2018-07-13) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220116_174223_255336_973CF896 X-CRM114-Status: GOOD ( 12.69 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: kernel test robot drivers/power/supply/cw2015_battery.c:692:12-18: 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 Fixes: 0839e7a54fc2 ("power: supply_core: Pass pointer to battery info") Reported-by: kernel test robot Signed-off-by: kernel test robot --- tree: https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-nomadik.git ux500-href-charging-v5.16-rc1 head: 1e846b0b60ac01cac4f283975a1bc395ff73d995 commit: 0839e7a54fc2233ea74b21651d022b981c124f78 [32/58] power: supply_core: Pass pointer to battery info :::::: branch date: 2 days ago :::::: commit date: 4 weeks ago cw2015_battery.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/power/supply/cw2015_battery.c +++ b/drivers/power/supply/cw2015_battery.c @@ -689,7 +689,7 @@ static int cw_bat_probe(struct i2c_clien if (ret) { /* Allocate an empty battery */ cw_bat->battery = devm_kzalloc(&client->dev, - sizeof(cw_bat->battery), + sizeof(*cw_bat->battery), GFP_KERNEL); if (!cw_bat->battery) return -ENOMEM;