lkml.org 
[lkml]   [2016]   [Mar]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] stmmac: fix noderef.cocci warnings
From
Date
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 <peppe.cavallaro@st.com>
> Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
> ---
>
> 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 <alexandre.torgue@st.com>

--

Regards

Alex

\
 
 \ /
  Last update: 2016-03-04 14:21    [W:0.296 / U:0.392 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site