From mboxrd@z Thu Jan 1 00:00:00 1970 From: kbuild test robot Subject: [PATCH] stmmac: fix noderef.cocci warnings Date: Thu, 3 Mar 2016 09:55:19 +0800 Message-ID: <20160303015519.GA43500@lkp-nex06> References: <201603030907.6ptkaLfJ%fengguang.wu@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: kbuild-all@01.org, netdev@vger.kernel.org, Alexandre TORGUE , linux-kernel@vger.kernel.org To: Giuseppe Cavallaro Return-path: Received: from mga11.intel.com ([192.55.52.93]:44039 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751270AbcCCB43 (ORCPT ); Wed, 2 Mar 2016 20:56:29 -0500 Content-Disposition: inline In-Reply-To: <201603030907.6ptkaLfJ%fengguang.wu@intel.com> Sender: netdev-owner@vger.kernel.org List-ID: drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c:115:15-21: 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: Giuseppe Cavallaro Signed-off-by: Fengguang Wu --- stmmac_platform.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c @@ -112,7 +112,7 @@ static struct stmmac_axi *stmmac_axi_set if (!np) return NULL; - axi = kzalloc(sizeof(axi), GFP_KERNEL); + axi = kzalloc(sizeof(*axi), GFP_KERNEL); if (!axi) return ERR_PTR(-ENOMEM);