From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1760099AbcCDVcn (ORCPT ); Fri, 4 Mar 2016 16:32:43 -0500 Received: from shards.monkeyblade.net ([149.20.54.216]:36318 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758765AbcCDVcm (ORCPT ); Fri, 4 Mar 2016 16:32:42 -0500 Date: Fri, 04 Mar 2016 16:32:38 -0500 (EST) Message-Id: <20160304.163238.95510004512138022.davem@davemloft.net> To: alexandre.torgue@st.com Cc: fengguang.wu@intel.com, peppe.cavallaro@st.com, kbuild-all@01.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] stmmac: fix noderef.cocci warnings From: David Miller In-Reply-To: <56D98374.6020003@st.com> References: <201603030907.6ptkaLfJ%fengguang.wu@intel.com> <20160303015519.GA43500@lkp-nex06> <56D98374.6020003@st.com> X-Mailer: Mew version 6.7 on Emacs 24.5 / Mule 6.0 (HANACHIRUSATO) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.12 (shards.monkeyblade.net [149.20.54.216]); Fri, 04 Mar 2016 13:32:40 -0800 (PST) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Alexandre Torgue Date: Fri, 4 Mar 2016 13:45:40 +0100 > Hi, > > On 03/03/2016 02:55 AM, kbuild test robot wrote: >> 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); >> >> > > > Thanks. > You can add my Acked-by: Alexandre Torgue Don't do this. Automated tools look for Acked-by: tags in replies to patch postings in a certain way, so you must provide you Acked-by: on the first column of a line in order for it to be picked up properly by those tools.