netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Patrick McHardy <kaber@trash.net>
To: Benjamin Li <ben@wenli.org>
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH] [VLAN] vlan_dev: Initialize dev pointer only when it is being used
Date: Thu, 31 Jan 2008 15:06:55 +0100	[thread overview]
Message-ID: <47A1D5FF.2020609@trash.net> (raw)
In-Reply-To: <1201762524-28403-1-git-send-email-ben@wenli.org>

Benjamin Li wrote:
> Signed-off-by: Benjamin Li <ben@wenli.org>
> ---
>  net/8021q/vlan_dev.c |    3 ++-
>  1 files changed, 2 insertions(+), 1 deletions(-)
> 
> diff --git a/net/8021q/vlan_dev.c b/net/8021q/vlan_dev.c
> index 8059fa4..2fa5d68 100644
> --- a/net/8021q/vlan_dev.c
> +++ b/net/8021q/vlan_dev.c
> @@ -49,7 +49,7 @@
>   */
>  static int vlan_dev_rebuild_header(struct sk_buff *skb)
>  {
> -	struct net_device *dev = skb->dev;
> +	struct net_device *dev;
>  	struct vlan_ethhdr *veth = (struct vlan_ethhdr *)(skb->data);
>  
>  	switch (veth->h_vlan_encapsulated_proto) {
> @@ -60,6 +60,7 @@ static int vlan_dev_rebuild_header(struct sk_buff *skb)
>  		return arp_find(veth->h_dest, skb);
>  #endif
>  	default:
> +		dev = skb->dev;
>  		pr_debug("%s: unable to resolve type %X addresses.\n",
>  			 dev->name, ntohs(veth->h_vlan_encapsulated_proto));


This seems pretty pointless to me.

      reply	other threads:[~2008-01-31 14:07 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-31  6:55 [PATCH] [VLAN] vlan_dev: Initialize dev pointer only when it is being used Benjamin Li
2008-01-31 14:06 ` Patrick McHardy [this message]

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=47A1D5FF.2020609@trash.net \
    --to=kaber@trash.net \
    --cc=ben@wenli.org \
    --cc=netdev@vger.kernel.org \
    /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).