From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753912AbcCDMpz (ORCPT ); Fri, 4 Mar 2016 07:45:55 -0500 Received: from mx07-00178001.pphosted.com ([62.209.51.94]:50478 "EHLO mx07-00178001.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750832AbcCDMpt (ORCPT ); Fri, 4 Mar 2016 07:45:49 -0500 Subject: Re: [PATCH] stmmac: fix noderef.cocci warnings To: kbuild test robot , Giuseppe Cavallaro References: <201603030907.6ptkaLfJ%fengguang.wu@intel.com> <20160303015519.GA43500@lkp-nex06> CC: , , From: Alexandre Torgue Message-ID: <56D98374.6020003@st.com> Date: Fri, 4 Mar 2016 13:45:40 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 MIME-Version: 1.0 In-Reply-To: <20160303015519.GA43500@lkp-nex06> Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.201.23.82] X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2016-03-04_06:,, signatures=0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 -- Regards Alex