diff mbox

linux-next: manual merge of the wireless-next tree with the net-next tree

Message ID 20120413124103.5bc632a6425ea9da9c5c4aae@canb.auug.org.au
State Not Applicable, archived
Delegated to: David Miller
Headers show

Commit Message

Stephen Rothwell April 13, 2012, 2:41 a.m. UTC
Hi John,

Today's linux-next merge of the wireless-next tree got a semantic
conflict in net/nfc/netlink.c between commit b3fe91c53a0a ("netlink:
Delete all NLA_PUT*() macros") from the net-next tree and commit
8112a5c91d78 ("NFC: Add a target lost netlink event") from the
wireless-next tree.

I added the below merge fix patch.

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Fri, 13 Apr 2012 12:34:10 +1000
Subject: [PATCH] NFC: fix up for NLA_PUT_ api changes

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 net/nfc/netlink.c |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

Comments

Stephen Rothwell April 13, 2012, 2:49 a.m. UTC | #1
Hi John,

On Fri, 13 Apr 2012 12:41:03 +1000 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> diff --git a/net/nfc/netlink.c b/net/nfc/netlink.c
> index 539d041..24d8d12 100644
> --- a/net/nfc/netlink.c
> +++ b/net/nfc/netlink.c
> @@ -202,8 +202,10 @@ int nfc_genl_target_lost(struct nfc_dev *dev, u32 target_idx)
>  	if (!hdr)
>  		goto free_msg;
>  
> -	NLA_PUT_STRING(msg, NFC_ATTR_DEVICE_NAME, nfc_device_name(dev));
> -	NLA_PUT_U32(msg, NFC_ATTR_TARGET_INDEX, target_idx);
> +	if (nla_put_string(msg, NFC_ATTR_DEVICE_NAME, nfc_device_name(dev)))
> +		goto nla_put_failure;
> +	if (nla_put_u32((msg, NFC_ATTR_TARGET_INDEX, target_idx))
                       ^
I removed this extra parenthesis. :-(
diff mbox

Patch

diff --git a/net/nfc/netlink.c b/net/nfc/netlink.c
index 539d041..24d8d12 100644
--- a/net/nfc/netlink.c
+++ b/net/nfc/netlink.c
@@ -202,8 +202,10 @@  int nfc_genl_target_lost(struct nfc_dev *dev, u32 target_idx)
 	if (!hdr)
 		goto free_msg;
 
-	NLA_PUT_STRING(msg, NFC_ATTR_DEVICE_NAME, nfc_device_name(dev));
-	NLA_PUT_U32(msg, NFC_ATTR_TARGET_INDEX, target_idx);
+	if (nla_put_string(msg, NFC_ATTR_DEVICE_NAME, nfc_device_name(dev)))
+		goto nla_put_failure;
+	if (nla_put_u32((msg, NFC_ATTR_TARGET_INDEX, target_idx))
+		goto nla_put_failure;
 
 	genlmsg_end(msg, hdr);