From: Johannes Berg <johannes@sipsolutions.net>
To: Govindarajulu Varadarajan <govindarajulu90@gmail.com>
Cc: David Miller <davem@davemloft.net>,
gregkh@linuxfoundation.org, linux-usb@vger.kernel.org,
linux-kernel@vger.kernel.org, schwidefsky@de.ibm.com,
linville@tuxdriver.com, linux-wireless@vger.kernel.org,
netdev@vger.kernel.org, IvDoorn@gmail.com, sbhatewara@vmware.com,
samuel@sortiz.org, chas@cmf.nrl.navy.mil, roland@kernel.org,
isdn@linux-pingi.de, jcliburn@gmail.com,
"Christian Benvenuti (benve)" <benve@cisco.com>,
"Sujith Sankar (ssujith)" <ssujith@cisco.com>,
jeffrey.t.kirsher@intel.com, jesse.brandeburg@intel.com,
shahed.shaikh@qlogic.com, joe@perches.com, apw@canonical.com
Subject: Re: [PATCH net-next 02/13] driver: net: remove unnecessary skb NULL check before calling dev_kfree_skb_irq
Date: Mon, 18 Nov 2013 20:37:11 +0100 [thread overview]
Message-ID: <1384803431.17916.31.camel@jlt4.sipsolutions.net> (raw)
In-Reply-To: <alpine.LNX.2.03.1311190055150.10646@gmail.com> (sfid-20131118_202645_273732_9DB2CF91)
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
next prev parent reply other threads:[~2013-11-18 19:37 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-02 13:47 [PATCH net-next 00/13] Protect dev_kfree_skb_irq from NULL and remove unnecessary NULL checks Govindarajulu Varadarajan
2013-11-02 13:47 ` [PATCH net-next 01/13] net: Check skb for NULL in dev_kfree_skb_irq Govindarajulu Varadarajan
2013-11-02 13:47 ` [PATCH net-next 02/13] driver: net: remove unnecessary skb NULL check before calling dev_kfree_skb_irq Govindarajulu Varadarajan
2013-11-04 20:12 ` David Miller
2013-11-11 10:31 ` Govindarajulu Varadarajan
2013-11-11 10:31 ` Govindarajulu Varadarajan
2013-11-18 19:26 ` Govindarajulu Varadarajan
2013-11-18 19:37 ` Johannes Berg [this message]
2013-11-18 20:17 ` David Miller
2013-11-02 13:47 ` [PATCH net-next 03/13] driver: atm: " Govindarajulu Varadarajan
2013-11-02 13:47 ` [PATCH net-next 04/13] driver: staging: " Govindarajulu Varadarajan
2013-11-02 13:47 ` [PATCH net-next 05/13] driver: usb/gadget: " Govindarajulu Varadarajan
2013-11-02 13:47 ` [PATCH net-next 06/13] driver: net: remove unnecessary NULL check before dev_kfree_skb_any Govindarajulu Varadarajan
2013-11-02 13:47 ` [PATCH net-next 07/13] driver: staging: " Govindarajulu Varadarajan
2013-11-02 13:47 ` [PATCH net-next 08/13] driver: isdn: " Govindarajulu Varadarajan
2013-11-02 13:47 ` [PATCH net-next 09/13] driver: s390: " Govindarajulu Varadarajan
2013-11-02 13:47 ` [PATCH net-next 10/13] driver: infiniband: " Govindarajulu Varadarajan
2013-11-02 13:47 ` [PATCH net-next 11/13] driver: usb: " Govindarajulu Varadarajan
2013-11-02 13:47 ` [PATCH net-next 12/13] driver: net: fix space before '(' and remove extra variable Govindarajulu Varadarajan
2013-11-02 13:47 ` [PATCH net-next 13/13] scripts/checkpatch.pl: Add dev_kfree_skb*(NULL) check to checkpatch Govindarajulu Varadarajan
2013-11-04 0:37 ` Joe Perches
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1384803431.17916.31.camel@jlt4.sipsolutions.net \
--to=johannes@sipsolutions.net \
--cc=IvDoorn@gmail.com \
--cc=apw@canonical.com \
--cc=benve@cisco.com \
--cc=chas@cmf.nrl.navy.mil \
--cc=davem@davemloft.net \
--cc=govindarajulu90@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=isdn@linux-pingi.de \
--cc=jcliburn@gmail.com \
--cc=jeffrey.t.kirsher@intel.com \
--cc=jesse.brandeburg@intel.com \
--cc=joe@perches.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
--cc=netdev@vger.kernel.org \
--cc=roland@kernel.org \
--cc=samuel@sortiz.org \
--cc=sbhatewara@vmware.com \
--cc=schwidefsky@de.ibm.com \
--cc=shahed.shaikh@qlogic.com \
--cc=ssujith@cisco.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.