Search Linux Wireless

Re: [RFC][PATCH v2 3/7] NFC: add nfc generic netlink interface

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Jun 22, 2011 at 1:05 AM, Gustavo F. Padovan
<padovan@xxxxxxxxxxxxxx> wrote:
>> +static int nfc_genl_send_target(struct sk_buff *msg, struct nfc_target *target,
>> +                                     struct netlink_callback *cb, int flags)
>> +{
>> +     void *hdr;
>> +
>> +     pr_debug("%s\n", __func__);
>> +
>> +     hdr = genlmsg_put(msg, NETLINK_CB(cb->skb).pid, cb->nlh->nlmsg_seq,
>> +                             &nfc_genl_family, flags, NFC_CMD_GET_TARGET);
>> +     if (!hdr)
>> +             return -EMSGSIZE;
>> +
>> +     genl_dump_check_consistent(cb, hdr, &nfc_genl_family);
>> +
>> +     NLA_PUT_U32(msg, NFC_ATTR_TARGET_INDEX, target->idx);
>> +     NLA_PUT_U32(msg, NFC_ATTR_PROTOCOLS,
>> +                             target->supported_protocols);
>> +     NLA_PUT_U16(msg, NFC_ATTR_TARGET_SENS_RES, target->sens_res);
>> +     NLA_PUT_U8(msg, NFC_ATTR_TARGET_SEL_RES, target->sel_res);
>> +
>> +     return genlmsg_end(msg, hdr);
>> +
>> +nla_put_failure:
>
> There is no use for this macro in all function that have a label with this
> name.

the NLA_PUT_* macros use this label:

#define NLA_PUT(skb, attrtype, attrlen, data) \
	do { \
		if (unlikely(nla_put(skb, attrtype, attrlen, data) < 0)) \
			goto nla_put_failure; \
	} while(0)

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


[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux