* Re: [PATCH] : Fix compilation warnings in net/802/fc.c
[not found] <ea11fea30810141121w58e25b43x92d71ca800c5c96@mail.gmail.com>
@ 2008-10-14 19:35 ` Marcin Slusarz
2008-10-14 23:36 ` David Miller
0 siblings, 1 reply; 6+ messages in thread
From: Marcin Slusarz @ 2008-10-14 19:35 UTC (permalink / raw)
To: Manish Katiyar; +Cc: kernel-janitors, netdev
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
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] : Fix compilation warnings in net/802/fc.c
2008-10-14 19:35 ` [PATCH] : Fix compilation warnings in net/802/fc.c Marcin Slusarz
@ 2008-10-14 23:36 ` David Miller
2008-10-15 3:36 ` Manish Katiyar
0 siblings, 1 reply; 6+ messages in thread
From: David Miller @ 2008-10-14 23:36 UTC (permalink / raw)
To: marcin.slusarz; +Cc: mkatiyar, kernel-janitors, netdev
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.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] : Fix compilation warnings in net/802/fc.c
2008-10-14 23:36 ` David Miller
@ 2008-10-15 3:36 ` Manish Katiyar
2008-10-15 6:17 ` David Miller
0 siblings, 1 reply; 6+ messages in thread
From: Manish Katiyar @ 2008-10-15 3:36 UTC (permalink / raw)
To: David Miller; +Cc: marcin.slusarz, kernel-janitors, netdev
On Wed, Oct 15, 2008 at 5:06 AM, David Miller <davem@davemloft.net> wrote:
> 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?
Updated the below patch as per suggestions.
Signed-off-by: Manish Katiyar <mkatiyar@gmail.com>
---
net/802/fc.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/net/802/fc.c b/net/802/fc.c
index cb3475e..34cf1ee 100644
--- a/net/802/fc.c
+++ b/net/802/fc.c
@@ -82,13 +82,13 @@ 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;
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));
return 0;
}
-#ifdef CONFIG_INET
return arp_find(fch->daddr, skb);
#else
return 0;
--
1.5.4.3
Thanks -
Manish
>
> Thanks.
>
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] : Fix compilation warnings in net/802/fc.c
2008-10-15 3:36 ` Manish Katiyar
@ 2008-10-15 6:17 ` David Miller
2008-10-15 7:03 ` Manish Katiyar
0 siblings, 1 reply; 6+ messages in thread
From: David Miller @ 2008-10-15 6:17 UTC (permalink / raw)
To: mkatiyar; +Cc: marcin.slusarz, kernel-janitors, netdev
From: "Manish Katiyar" <mkatiyar@gmail.com>
Date: Wed, 15 Oct 2008 09:06:12 +0530
> Updated the below patch as per suggestions.
>
> Signed-off-by: Manish Katiyar <mkatiyar@gmail.com>
>
Your email client corrupted the patch, changing tabs into
spaces and breaking up long lines. This makes the patch
not usable.
Please fix this up and resubmit, thanks.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] : Fix compilation warnings in net/802/fc.c
2008-10-15 6:17 ` David Miller
@ 2008-10-15 7:03 ` Manish Katiyar
2008-10-15 7:14 ` David Miller
0 siblings, 1 reply; 6+ messages in thread
From: Manish Katiyar @ 2008-10-15 7:03 UTC (permalink / raw)
To: David Miller; +Cc: marcin.slusarz, kernel-janitors, netdev
[-- Attachment #1: Type: text/plain, Size: 637 bytes --]
On Wed, Oct 15, 2008 at 11:47 AM, David Miller <davem@davemloft.net> wrote:
> From: "Manish Katiyar" <mkatiyar@gmail.com>
> Date: Wed, 15 Oct 2008 09:06:12 +0530
>
>> Updated the below patch as per suggestions.
>>
>> Signed-off-by: Manish Katiyar <mkatiyar@gmail.com>
>>
>
> Your email client corrupted the patch, changing tabs into
> spaces and breaking up long lines. This makes the patch
> not usable.
I had already set the mail client to avoid such issues :-(. Attached
the patch with the mail. Will that help ? or do I need to send again
in the mail body itself ?
Thanks -
Manish
>
> Please fix this up and resubmit, thanks.
>
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0015-Fix-compilation-warnings.patch --]
[-- Type: text/x-diff; name=0015-Fix-compilation-warnings.patch, Size: 978 bytes --]
From b235705c33a2c34c6d3bb225d05f94e0838fa057 Mon Sep 17 00:00:00 2001
From: Manish Katiyar <mkatiyar@gmail.com>
Date: Wed, 15 Oct 2008 09:06:11 +0530
Subject: [PATCH] Fix compilation warnings
Signed-off-by: Manish Katiyar <mkatiyar@gmail.com>
---
net/802/fc.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/net/802/fc.c b/net/802/fc.c
index cb3475e..34cf1ee 100644
--- a/net/802/fc.c
+++ b/net/802/fc.c
@@ -82,13 +82,13 @@ 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;
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));
return 0;
}
-#ifdef CONFIG_INET
return arp_find(fch->daddr, skb);
#else
return 0;
--
1.5.4.3
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] : Fix compilation warnings in net/802/fc.c
2008-10-15 7:03 ` Manish Katiyar
@ 2008-10-15 7:14 ` David Miller
0 siblings, 0 replies; 6+ messages in thread
From: David Miller @ 2008-10-15 7:14 UTC (permalink / raw)
To: mkatiyar; +Cc: marcin.slusarz, kernel-janitors, netdev
From: "Manish Katiyar" <mkatiyar@gmail.com>
Date: Wed, 15 Oct 2008 12:33:03 +0530
> On Wed, Oct 15, 2008 at 11:47 AM, David Miller <davem@davemloft.net> wrote:
> > From: "Manish Katiyar" <mkatiyar@gmail.com>
> > Date: Wed, 15 Oct 2008 09:06:12 +0530
> >
> >> Updated the below patch as per suggestions.
> >>
> >> Signed-off-by: Manish Katiyar <mkatiyar@gmail.com>
> >>
> >
> > Your email client corrupted the patch, changing tabs into
> > spaces and breaking up long lines. This makes the patch
> > not usable.
>
> I had already set the mail client to avoid such issues :-(. Attached
> the patch with the mail. Will that help ? or do I need to send again
> in the mail body itself ?
This works, patch applied, thanks.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2008-10-15 7:14 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[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
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
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).