Patchwork [net-next] doc: fix some syntax errors in netlink mmap sample code

login
register
mail settings
Submitter Amerigo Wang
Date June 24, 2013, 11:46 a.m.
Message ID <1372074414-11639-1-git-send-email-amwang@redhat.com>
Download mbox | patch
Permalink /patch/253808/
State Accepted
Delegated to: David Miller
Headers show

Comments

Amerigo Wang - June 24, 2013, 11:46 a.m.
From: Cong Wang <amwang@redhat.com>


Cc: Patrick McHardy <kaber@trash.net>
Cc: David S. Miller <davem@davemloft.net>
Signed-off-by: Cong Wang <amwang@redhat.com>
---
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
David Miller - June 25, 2013, 11:47 p.m.
From: Cong Wang <amwang@redhat.com>
Date: Mon, 24 Jun 2013 19:46:54 +0800

> From: Cong Wang <amwang@redhat.com>
> 
> 
> Cc: Patrick McHardy <kaber@trash.net>
> Cc: David S. Miller <davem@davemloft.net>
> Signed-off-by: Cong Wang <amwang@redhat.com>

Applied.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch

diff --git a/Documentation/networking/netlink_mmap.txt b/Documentation/networking/netlink_mmap.txt
index e6088ba..5cc6005 100644
--- a/Documentation/networking/netlink_mmap.txt
+++ b/Documentation/networking/netlink_mmap.txt
@@ -274,9 +274,9 @@  This example assumes some ring parameters of the ring setup are available.
 			/* Get next frame header */
 			hdr = rx_ring + frame_offset;
 
-			if (hdr->nm_status == NL_MMAP_STATUS_VALID)
+			if (hdr->nm_status == NL_MMAP_STATUS_VALID) {
 				/* Regular memory mapped frame */
-				nlh = (void *hdr) + NL_MMAP_HDRLEN;
+				nlh = (void *)hdr + NL_MMAP_HDRLEN;
 				len = hdr->nm_len;
 
 				/* Release empty message immediately. May happen