All of lore.kernel.org
 help / color / mirror / Atom feed
From: kbuild test robot <fengguang.wu@intel.com>
To: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Cc: kbuild-all@01.org, netdev@vger.kernel.org,
	Alexandre TORGUE <alexandre.torgue@st.com>,
	linux-kernel@vger.kernel.org
Subject: [PATCH] stmmac: fix noderef.cocci warnings
Date: Thu, 3 Mar 2016 09:55:19 +0800	[thread overview]
Message-ID: <20160303015519.GA43500@lkp-nex06> (raw)
In-Reply-To: <201603030907.6ptkaLfJ%fengguang.wu@intel.com>

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);
 

  reply	other threads:[~2016-03-03  1:56 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-03  1:55 [net-next:master 963/985] drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c:115:15-21: ERROR: application of sizeof to pointer kbuild test robot
2016-03-03  1:55 ` kbuild test robot [this message]
2016-03-04 12:45   ` [PATCH] stmmac: fix noderef.cocci warnings Alexandre Torgue
2016-03-04 21:32     ` David Miller
2016-03-07  3:46   ` David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160303015519.GA43500@lkp-nex06 \
    --to=fengguang.wu@intel.com \
    --cc=alexandre.torgue@st.com \
    --cc=kbuild-all@01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=peppe.cavallaro@st.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.