All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marcin Slusarz <marcin.slusarz@gmail.com>
To: Manish Katiyar <mkatiyar@gmail.com>
Cc: 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 19:35:04 +0000	[thread overview]
Message-ID: <20081014193500.GA6502@joi> (raw)
In-Reply-To: <ea11fea30810141121w58e25b43x92d71ca800c5c96@mail.gmail.com>

On Tue, Oct 14, 2008 at 11:51:24PM +0530, Manish Katiyar wrote:
> [ I was not sure about which list is this appropriate, so putting
> kernel-janitors since this is cleanup]
Cc'ing netdev@vger

> 
> Below patch fixes the following warning during compilation.
> net/802/fc.c:85: warning: unused variable 'fch'
> 
> Signed-off-by: Manish Katiyar <mkatiyar@gmail.com>
> 
> ---
>  net/802/fc.c |    2 ++
>  1 files changed, 2 insertions(+), 0 deletions(-)
> 
> 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

Marcin

WARNING: multiple messages have this Message-ID (diff)
From: Marcin Slusarz <marcin.slusarz@gmail.com>
To: Manish Katiyar <mkatiyar@gmail.com>
Cc: 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 21:35:04 +0200	[thread overview]
Message-ID: <20081014193500.GA6502@joi> (raw)
In-Reply-To: <ea11fea30810141121w58e25b43x92d71ca800c5c96@mail.gmail.com>

On Tue, Oct 14, 2008 at 11:51:24PM +0530, Manish Katiyar wrote:
> [ I was not sure about which list is this appropriate, so putting
> kernel-janitors since this is cleanup]
Cc'ing netdev@vger

> 
> Below patch fixes the following warning during compilation.
> net/802/fc.c:85: warning: unused variable 'fch'
> 
> Signed-off-by: Manish Katiyar <mkatiyar@gmail.com>
> 
> ---
>  net/802/fc.c |    2 ++
>  1 files changed, 2 insertions(+), 0 deletions(-)
> 
> 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

Marcin

  reply	other threads:[~2008-10-14 19:35 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-14 18:33 [PATCH] : Fix compilation warnings in net/802/fc.c Manish Katiyar
2008-10-14 19:35 ` Marcin Slusarz [this message]
2008-10-14 19:35   ` Marcin Slusarz
2008-10-14 23:36   ` David Miller
2008-10-14 23:36     ` David Miller
2008-10-15  3:36     ` Manish Katiyar
2008-10-15  3:48       ` Manish Katiyar
2008-10-15  6:17       ` David Miller
2008-10-15  6:17         ` David Miller
2008-10-15  7:03         ` Manish Katiyar
2008-10-15  7:15           ` Manish Katiyar
2008-10-15  7:14           ` David Miller
2008-10-15  7:14             ` David Miller
  -- strict thread matches above, loose matches on Subject: below --
2008-10-29  8:06 [PATCH] : Fix compilation warnings in net/netlabel/netlabel_addrlist.c Manish Katiyar
2008-10-29  8:18 ` Manish Katiyar
2008-10-29 13:49 ` Paul Moore
2008-10-29 13:49   ` Paul Moore
     [not found]   ` <ea11fea30810290818p2ae6c11eo5e38baf631867fb1@mail.gmail.com>
     [not found]     ` <200810291135.25056.paul.moore@hp.com>
2008-10-29 18:27       ` Manish Katiyar
2008-10-29 18:39         ` Manish Katiyar
     [not found]         ` <200810291543.49225.paul.moore@hp.com>
2008-10-30  2:10           ` Manish Katiyar
2008-10-30  2:22             ` Manish Katiyar
2008-10-30 12:12             ` Paul Moore
2008-10-30 12:12               ` Paul Moore
2008-10-30 13:33               ` Manish Katiyar
2008-10-30 13:45                 ` Manish Katiyar
2008-10-30 13:39                 ` Paul Moore
2008-10-30 13:39                   ` Paul Moore

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=20081014193500.GA6502@joi \
    --to=marcin.slusarz@gmail.com \
    --cc=kernel-janitors@vger.kernel.org \
    --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 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.