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
next parent reply other threads:[~2008-10-14 19:37 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 ` Marcin Slusarz [this message]
2008-10-14 23:36 ` [PATCH] : Fix compilation warnings in net/802/fc.c David Miller
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=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 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).