On 04/02/2013 03:21 PM, Alexander Smirnov wrote:
>
>
>
> 2013/4/2 Alan Ott <a...@signal11.us <mailto:a...@signal11.us>>
>
> dev_queue_xmit() can return positive error codes, so check for
> nonzero.
>
> Signed-off-by: Alan Ott <a...@signal11.us <mailto:a...@signal11.us>>
> ---
> net/ieee802154/6lowpan.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/net/ieee802154/6lowpan.c b/net/ieee802154/6lowpan.c
> index e1b4580..a68c792 100644
> --- a/net/ieee802154/6lowpan.c
> +++ b/net/ieee802154/6lowpan.c
> @@ -1139,7 +1139,7 @@ static netdev_tx_t lowpan_xmit(struct
> sk_buff *skb, struct net_device *dev)
> error:
> dev_kfree_skb(skb);
> out:
> - if (err < 0)
> + if (err)
>
> lets say ok....
>
> pr_debug("ERROR: xmit failed\n");
>
> return (err < 0 ? NETDEV_TX_BUSY : NETDEV_TX_OK);
>
> but here you still checks for negative error only, why?
That's fixed in the next patch (6/6). Maybe 5/6 and 6/6 should be
squashed? It's the same fundamental problem, but with different
implications (as described in the commit messages). 5/6 is about the
error (debug) message being not shown all the times it needs to be, and
6/6 is about returning the correct error code to the higher layer[1].
Alan.
[1] I'm never sure, given "make a patch do one thing only," where to
draw the line between having fewer patches which are larger, and having
more smaller patches which are easier to understand.
------------------------------------------------------------------------------
Minimize network downtime and maximize team effectiveness.
Reduce network management and security costs.Learn how to hire
the most talented Cisco Certified professionals. Visit the
Employer Resources Portal
http://www.cisco.com/web/learning/employer_resources/index.html
_______________________________________________
Linux-zigbee-devel mailing list
Linux-zigbee-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-zigbee-devel