netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Yang Hongyang <yanghy@cn.fujitsu.com>
To: Herbert Xu <herbert@gondor.apana.org.au>
Cc: yjwei@cn.fujitsu.com, netdev@vger.kernel.org, davem@davemloft.net
Subject: Re: [PATCH] ipv6: Remove some pointless conditionals before	kfree_skb()
Date: Tue, 24 Feb 2009 17:54:25 +0800	[thread overview]
Message-ID: <49A3C3D1.2040908@cn.fujitsu.com> (raw)
In-Reply-To: <20090224094738.GA21939@gondor.apana.org.au>

Herbert Xu wrote:
> Yang Hongyang <yanghy@cn.fujitsu.com> wrote:
>> I think kfree_skb() suppose that you have handled NULL pointer 
>> because it uses `unlikely` to check the pointer.
>> So I don't think these conditions are pointless...
>> 437 void kfree_skb(struct sk_buff *skb)
>> 438 {
>> 439         if (unlikely(!skb))
>> 440                 return;
> 
> These checks were specifically added so that callers didn't have
> to check for NULL.

Yes,but if the the callers checked for NULL,it's OK right?

> 
> Cheers,


-- 
Regards
Yang Hongyang

  reply	other threads:[~2009-02-24  9:52 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-24  7:45 [PATCH] ipv6: Remove some pointless conditionals before kfree_skb() Wei Yongjun
2009-02-24  9:33 ` Yang Hongyang
2009-02-24  9:47   ` Herbert Xu
2009-02-24  9:54     ` Yang Hongyang [this message]
2009-02-24  9:55       ` Herbert Xu
2009-02-25  7:38 ` David Miller

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=49A3C3D1.2040908@cn.fujitsu.com \
    --to=yanghy@cn.fujitsu.com \
    --cc=davem@davemloft.net \
    --cc=herbert@gondor.apana.org.au \
    --cc=netdev@vger.kernel.org \
    --cc=yjwei@cn.fujitsu.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 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).