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