netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: marcin.slusarz@gmail.com
Cc: mkatiyar@gmail.com, kernel-janitors@vger.kernel.org,
	netdev@vger.kernel.org
Subject: Re: [PATCH] : Fix compilation warnings in net/802/fc.c
Date: Tue, 14 Oct 2008 16:36:20 -0700 (PDT)	[thread overview]
Message-ID: <20081014.163620.23535849.davem@davemloft.net> (raw)
In-Reply-To: <20081014193500.GA6502@joi>

From: Marcin Slusarz <marcin.slusarz@gmail.com>
Date: Tue, 14 Oct 2008 21:35:04 +0200

> On Tue, Oct 14, 2008 at 11:51:24PM +0530, Manish Katiyar wrote:
> > diff --git a/net/802/fc.c b/net/802/fc.c
> > index cb3475e..7463109 100644
> > --- a/net/802/fc.c
> > +++ b/net/802/fc.c
> > @@ -82,7 +82,9 @@ static int fc_header(struct sk_buff *skb, struct
> > net_device *dev,
> > 
> >  static int fc_rebuild_header(struct sk_buff *skb)
> >  {
> > +#ifdef CONFIG_INET
> >  	struct fch_hdr *fch=(struct fch_hdr *)skb->data;
> > +#endif
> >  	struct fcllc *fcllc=(struct fcllc *)(skb->data+sizeof(struct fch_hdr));
> >  	if(fcllc->ethertype != htons(ETH_P_IP)) {
> >  		printk("fc_rebuild_header: Don't know how to resolve type %04X
> > addresses ?\n", ntohs(fcllc->ethertype));
> > -- 
> 
> When !CONFIG_INET this function always returns 0 (and does not anything useful)
> so it probably can be written as:
> 
> #ifdef CONFIG_INET
> static int fc_rebuild_header(struct sk_buff *skb)
> {
> ...
> }
> #else
> static int fc_rebuild_header(struct sk_buff *skb)
> {
> 	return 0;
> }
> #endif

Yep, agreed.  Could someone respin the patch like this?

Thanks.

  reply	other threads:[~2008-10-14 23:36 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <ea11fea30810141121w58e25b43x92d71ca800c5c96@mail.gmail.com>
2008-10-14 19:35 ` [PATCH] : Fix compilation warnings in net/802/fc.c Marcin Slusarz
2008-10-14 23:36   ` David Miller [this message]
2008-10-15  3:36     ` Manish Katiyar
2008-10-15  6:17       ` David Miller
2008-10-15  7:03         ` Manish Katiyar
2008-10-15  7:14           ` 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=20081014.163620.23535849.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=marcin.slusarz@gmail.com \
    --cc=mkatiyar@gmail.com \
    --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).