LKML Archive on lore.kernel.org
 help / color / 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
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 index

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <201603030907.6ptkaLfJ%fengguang.wu@intel.com>
2016-03-03  1:55 ` kbuild test robot [this message]
2016-03-04 12:45   ` 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

LKML Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/lkml/0 lkml/git/0.git
	git clone --mirror https://lore.kernel.org/lkml/1 lkml/git/1.git
	git clone --mirror https://lore.kernel.org/lkml/2 lkml/git/2.git
	git clone --mirror https://lore.kernel.org/lkml/3 lkml/git/3.git
	git clone --mirror https://lore.kernel.org/lkml/4 lkml/git/4.git
	git clone --mirror https://lore.kernel.org/lkml/5 lkml/git/5.git
	git clone --mirror https://lore.kernel.org/lkml/6 lkml/git/6.git
	git clone --mirror https://lore.kernel.org/lkml/7 lkml/git/7.git
	git clone --mirror https://lore.kernel.org/lkml/8 lkml/git/8.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 lkml lkml/ https://lore.kernel.org/lkml \
		linux-kernel@vger.kernel.org
	public-inbox-index lkml

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-kernel


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git