netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alexandru Copot <alex.mihai.c@gmail.com>
To: linux-kernel@vger.kernel.org, netdev@vger.kernel.org,
	davem@davemloft.net
Cc: honkiko@gmail.com, tgraf@suug.ch,
	Alexandru Copot <alex.mihai.c@gmail.com>
Subject: [PATCH net-next] audit: pass int* to nlmsg_next
Date: Thu, 28 Mar 2013 23:31:29 +0200	[thread overview]
Message-ID: <1364506289-9146-1-git-send-email-alex.mihai.c@gmail.com> (raw)

Commit 941912133025926307c7a65b203fa38403b1063a replaced the macros
NLMSG_NEXT with calls to nlmsg_next which produces this warning:

kernel/audit.c: In function ‘audit_receive_skb’:
kernel/audit.c:928:3: warning: passing argument 2 of ‘nlmsg_next’ makes pointer from integer without a cast
In file included from include/net/rtnetlink.h:5:0,
                 from include/net/neighbour.h:28,
                 from include/net/dst.h:17,
                 from include/net/sock.h:68,
                 from kernel/audit.c:55:
include/net/netlink.h:359:1: note: expected ‘int *’ but argument is of type ‘int’

Fix this by sending the intended pointer.

Signed-off-by: Alexandru Copot <alex.mihai.c@gmail.com>
---
 kernel/audit.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/audit.c b/kernel/audit.c
index 4dbb047..488f85f 100644
--- a/kernel/audit.c
+++ b/kernel/audit.c
@@ -925,7 +925,7 @@ static void audit_receive_skb(struct sk_buff *skb)
 		if (err || (nlh->nlmsg_flags & NLM_F_ACK))
 			netlink_ack(skb, nlh, err);
 
-		nlh = nlmsg_next(nlh, len);
+		nlh = nlmsg_next(nlh, &len);
 	}
 }
 
-- 
1.8.2

             reply	other threads:[~2013-03-28 21:31 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-28 21:31 Alexandru Copot [this message]
2013-03-28 21:40 ` [PATCH net-next] audit: pass int* to nlmsg_next David Miller
2013-03-29 14:54 ` Sergei Shtylyov

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=1364506289-9146-1-git-send-email-alex.mihai.c@gmail.com \
    --to=alex.mihai.c@gmail.com \
    --cc=davem@davemloft.net \
    --cc=honkiko@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=tgraf@suug.ch \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).