* [PATCH 1/1] netlink: nla_nest_end return "unsigned init"
@ 2011-05-16 14:23 Wey-Yi Guy
2011-05-16 17:35 ` John W. Linville
0 siblings, 1 reply; 3+ messages in thread
From: Wey-Yi Guy @ 2011-05-16 14:23 UTC (permalink / raw)
To: linville; +Cc: linux-wireless, ipw3945-devel, Wey-Yi Guy
skb->len has unsigned int, return the correct value from nla_nest_end call.
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
---
include/net/netlink.h | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/include/net/netlink.h b/include/net/netlink.h
index 8a3906a..241fc0d 100644
--- a/include/net/netlink.h
+++ b/include/net/netlink.h
@@ -1015,7 +1015,8 @@ static inline struct nlattr *nla_nest_start(struct sk_buff *skb, int attrtype)
*
* Returns the total data length of the skb.
*/
-static inline int nla_nest_end(struct sk_buff *skb, struct nlattr *start)
+static inline unsigned int nla_nest_end(struct sk_buff *skb,
+ struct nlattr *start)
{
start->nla_len = skb_tail_pointer(skb) - (unsigned char *)start;
return skb->len;
--
1.7.0.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH 1/1] netlink: nla_nest_end return "unsigned init"
2011-05-16 14:23 [PATCH 1/1] netlink: nla_nest_end return "unsigned init" Wey-Yi Guy
@ 2011-05-16 17:35 ` John W. Linville
2011-05-16 17:51 ` David Miller
0 siblings, 1 reply; 3+ messages in thread
From: John W. Linville @ 2011-05-16 17:35 UTC (permalink / raw)
To: Wey-Yi Guy; +Cc: linux-wireless, ipw3945-devel, netdev
This should go to netdev@vger.kernel.org instead...
On Mon, May 16, 2011 at 07:23:30AM -0700, Wey-Yi Guy wrote:
> skb->len has unsigned int, return the correct value from nla_nest_end call.
>
> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
> ---
> include/net/netlink.h | 3 ++-
> 1 files changed, 2 insertions(+), 1 deletions(-)
>
> diff --git a/include/net/netlink.h b/include/net/netlink.h
> index 8a3906a..241fc0d 100644
> --- a/include/net/netlink.h
> +++ b/include/net/netlink.h
> @@ -1015,7 +1015,8 @@ static inline struct nlattr *nla_nest_start(struct sk_buff *skb, int attrtype)
> *
> * Returns the total data length of the skb.
> */
> -static inline int nla_nest_end(struct sk_buff *skb, struct nlattr *start)
> +static inline unsigned int nla_nest_end(struct sk_buff *skb,
> + struct nlattr *start)
> {
> start->nla_len = skb_tail_pointer(skb) - (unsigned char *)start;
> return skb->len;
> --
> 1.7.0.4
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
--
John W. Linville Someday the world will need a hero, and you
linville@tuxdriver.com might be all we have. Be ready.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH 1/1] netlink: nla_nest_end return "unsigned init"
2011-05-16 17:35 ` John W. Linville
@ 2011-05-16 17:51 ` David Miller
0 siblings, 0 replies; 3+ messages in thread
From: David Miller @ 2011-05-16 17:51 UTC (permalink / raw)
To: linville; +Cc: wey-yi.w.guy, linux-wireless, ipw3945-devel, netdev
From: "John W. Linville" <linville@tuxdriver.com>
Date: Mon, 16 May 2011 13:35:48 -0400
> This should go to netdev@vger.kernel.org instead...
>
> On Mon, May 16, 2011 at 07:23:30AM -0700, Wey-Yi Guy wrote:
>> skb->len has unsigned int, return the correct value from nla_nest_end call.
>>
>> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Plus, the only users of the return value use it to feed "int"
return values of functions. F.e. net/core/neighbour.c's use
in neightbl_fill_parms().
I don't see this as being any better or worse, and we should
just leave the return value alone.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-05-16 17:52 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-05-16 14:23 [PATCH 1/1] netlink: nla_nest_end return "unsigned init" Wey-Yi Guy
2011-05-16 17:35 ` John W. Linville
2011-05-16 17:51 ` David Miller
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).