[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1384803431.17916.31.camel@jlt4.sipsolutions.net>
Date: Mon, 18 Nov 2013 20:37:11 +0100
From: Johannes Berg <johannes@...solutions.net>
To: Govindarajulu Varadarajan <govindarajulu90@...il.com>
Cc: David Miller <davem@...emloft.net>, gregkh@...uxfoundation.org,
linux-usb@...r.kernel.org, linux-kernel@...r.kernel.org,
schwidefsky@...ibm.com, linville@...driver.com,
linux-wireless@...r.kernel.org, netdev@...r.kernel.org,
IvDoorn@...il.com, sbhatewara@...are.com, samuel@...tiz.org,
chas@....nrl.navy.mil, roland@...nel.org, isdn@...ux-pingi.de,
jcliburn@...il.com,
"Christian Benvenuti (benve)" <benve@...co.com>,
"Sujith Sankar (ssujith)" <ssujith@...co.com>,
jeffrey.t.kirsher@...el.com, jesse.brandeburg@...el.com,
shahed.shaikh@...gic.com, joe@...ches.com, apw@...onical.com
Subject: Re: [PATCH net-next 02/13] driver: net: remove unnecessary skb NULL
check before calling dev_kfree_skb_irq
Please don't top-post. You're making a lot of obvious mistakes, to the
likely effect that soon enough people won't even read your email.
> Did you have a chance to look at this? Let me know how you want me to
> fix this.
By not "fixing" anything?
> >> Is is quite unlikely thats skb is NULL. So it comes down to one extra
> >> if-branching statement or one extra assignment. I would prefer extra
> >> assignment to branching statement. In my opinion extra assignment is
> >> very little price we pay.
> >>
> >> //govind
> >
> > Another way to solve the double NULL check is to define a new function
> > something like this
> >
> > dev_kfree_skb_NULL(struct sk_buff **skb)
> > {
> > if(*skb) {
> > free_skb(*skb);
> > *skb=NULL;
> > }
> > }
> >
> > and use this if you want to free a skb and make it NULL.
> > Is this approach better?
That's just ugly imho. Why do you want to "clean up" something that
doesn't need changing?
Anyway, just saying.
johannes
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists