* [PATCH] : Fix compilation warnings in net/802/fc.c
@ 2008-10-14 18:33 Manish Katiyar
2008-10-14 19:35 ` Marcin Slusarz
0 siblings, 1 reply; 27+ messages in thread
From: Manish Katiyar @ 2008-10-14 18:33 UTC (permalink / raw)
To: kernel-janitors
[ I was not sure about which list is this appropriate, so putting
kernel-janitors since this is cleanup]
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));
--
1.5.4.3
Thanks -
Manish
^ permalink raw reply related [flat|nested] 27+ messages in thread
* Re: [PATCH] : Fix compilation warnings in net/802/fc.c
2008-10-14 18:33 [PATCH] : Fix compilation warnings in net/802/fc.c Manish Katiyar
@ 2008-10-14 19:35 ` Marcin Slusarz
0 siblings, 0 replies; 27+ 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] 27+ messages in thread
* Re: [PATCH] : Fix compilation warnings in net/802/fc.c
@ 2008-10-14 19:35 ` Marcin Slusarz
0 siblings, 0 replies; 27+ 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] 27+ messages in thread
* Re: [PATCH] : Fix compilation warnings in net/802/fc.c
2008-10-14 19:35 ` Marcin Slusarz
@ 2008-10-14 23:36 ` David Miller
-1 siblings, 0 replies; 27+ 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] 27+ messages in thread
* Re: [PATCH] : Fix compilation warnings in net/802/fc.c
@ 2008-10-14 23:36 ` David Miller
0 siblings, 0 replies; 27+ 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] 27+ messages in thread
* Re: [PATCH] : Fix compilation warnings in net/802/fc.c
2008-10-14 23:36 ` David Miller
@ 2008-10-15 3:48 ` Manish Katiyar
-1 siblings, 0 replies; 27+ 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] 27+ messages in thread
* Re: [PATCH] : Fix compilation warnings in net/802/fc.c
@ 2008-10-15 3:48 ` Manish Katiyar
0 siblings, 0 replies; 27+ messages in thread
From: Manish Katiyar @ 2008-10-15 3:48 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] 27+ messages in thread
* Re: [PATCH] : Fix compilation warnings in net/802/fc.c
2008-10-15 3:48 ` Manish Katiyar
@ 2008-10-15 6:17 ` David Miller
-1 siblings, 0 replies; 27+ 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] 27+ messages in thread
* Re: [PATCH] : Fix compilation warnings in net/802/fc.c
@ 2008-10-15 6:17 ` David Miller
0 siblings, 0 replies; 27+ 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] 27+ messages in thread
* Re: [PATCH] : Fix compilation warnings in net/802/fc.c
2008-10-15 6:17 ` David Miller
@ 2008-10-15 7:15 ` Manish Katiyar
-1 siblings, 0 replies; 27+ 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] 27+ messages in thread
* Re: [PATCH] : Fix compilation warnings in net/802/fc.c
2008-10-15 7:15 ` Manish Katiyar
@ 2008-10-15 7:14 ` David Miller
-1 siblings, 0 replies; 27+ 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] 27+ messages in thread
* Re: [PATCH] : Fix compilation warnings in net/802/fc.c
@ 2008-10-15 7:14 ` David Miller
0 siblings, 0 replies; 27+ 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] 27+ messages in thread
* Re: [PATCH] : Fix compilation warnings in net/802/fc.c
@ 2008-10-15 7:15 ` Manish Katiyar
0 siblings, 0 replies; 27+ messages in thread
From: Manish Katiyar @ 2008-10-15 7:15 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] 27+ messages in thread
* [PATCH] : Fix compilation warnings in net/netlabel/netlabel_addrlist.c
2008-10-14 18:33 [PATCH] : Fix compilation warnings in net/802/fc.c Manish Katiyar
@ 2008-10-29 8:18 ` Manish Katiyar
0 siblings, 0 replies; 27+ messages in thread
From: Manish Katiyar @ 2008-10-29 8:06 UTC (permalink / raw)
To: kernel-janitors, netdev, paul.moore; +Cc: mkatiyar
Below patch fixes the following warning.
net/netlabel/netlabel_addrlist.c:335: warning: unused variable 'dir'
net/netlabel/netlabel_addrlist.c:369: warning: unused variable 'dir'
Signed-off-by: Manish Katiyar <mkatiyar@gmail.com>
---
net/netlabel/netlabel_addrlist.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/net/netlabel/netlabel_addrlist.c b/net/netlabel/netlabel_addrlist.c
index b0925a3..65fbec1 100644
--- a/net/netlabel/netlabel_addrlist.c
+++ b/net/netlabel/netlabel_addrlist.c
@@ -332,7 +332,9 @@ void netlbl_af4list_audit_addr(struct audit_buffer
*audit_buf,
__be32 addr, __be32 mask)
{
u32 mask_val = ntohl(mask);
+#ifdef CONFIG_AUDIT
char *dir = (src ? "src" : "dst");
+#endif
if (dev != NULL)
audit_log_format(audit_buf, " netif=%s", dev);
@@ -366,7 +368,9 @@ void netlbl_af6list_audit_addr(struct audit_buffer
*audit_buf,
const struct in6_addr *addr,
const struct in6_addr *mask)
{
+#ifdef CONFIG_AUDIT
char *dir = (src ? "src" : "dst");
+#endif
if (dev != NULL)
audit_log_format(audit_buf, " netif=%s", dev);
--
1.5.4.3
Thanks -
Manish
^ permalink raw reply related [flat|nested] 27+ messages in thread
* [PATCH] : Fix compilation warnings in net/netlabel/netlabel_addrlist.c
@ 2008-10-29 8:18 ` Manish Katiyar
0 siblings, 0 replies; 27+ messages in thread
From: Manish Katiyar @ 2008-10-29 8:18 UTC (permalink / raw)
To: kernel-janitors, netdev, paul.moore; +Cc: mkatiyar
Below patch fixes the following warning.
net/netlabel/netlabel_addrlist.c:335: warning: unused variable 'dir'
net/netlabel/netlabel_addrlist.c:369: warning: unused variable 'dir'
Signed-off-by: Manish Katiyar <mkatiyar@gmail.com>
---
net/netlabel/netlabel_addrlist.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/net/netlabel/netlabel_addrlist.c b/net/netlabel/netlabel_addrlist.c
index b0925a3..65fbec1 100644
--- a/net/netlabel/netlabel_addrlist.c
+++ b/net/netlabel/netlabel_addrlist.c
@@ -332,7 +332,9 @@ void netlbl_af4list_audit_addr(struct audit_buffer
*audit_buf,
__be32 addr, __be32 mask)
{
u32 mask_val = ntohl(mask);
+#ifdef CONFIG_AUDIT
char *dir = (src ? "src" : "dst");
+#endif
if (dev != NULL)
audit_log_format(audit_buf, " netif=%s", dev);
@@ -366,7 +368,9 @@ void netlbl_af6list_audit_addr(struct audit_buffer
*audit_buf,
const struct in6_addr *addr,
const struct in6_addr *mask)
{
+#ifdef CONFIG_AUDIT
char *dir = (src ? "src" : "dst");
+#endif
if (dev != NULL)
audit_log_format(audit_buf, " netif=%s", dev);
--
1.5.4.3
Thanks -
Manish
^ permalink raw reply related [flat|nested] 27+ messages in thread
* Re: [PATCH] : Fix compilation warnings in net/netlabel/netlabel_addrlist.c
2008-10-29 8:18 ` Manish Katiyar
@ 2008-10-29 13:49 ` Paul Moore
-1 siblings, 0 replies; 27+ messages in thread
From: Paul Moore @ 2008-10-29 13:49 UTC (permalink / raw)
To: Manish Katiyar; +Cc: kernel-janitors, netdev
On Wednesday 29 October 2008 4:06:09 am Manish Katiyar wrote:
> Below patch fixes the following warning.
> net/netlabel/netlabel_addrlist.c:335: warning: unused variable 'dir'
> net/netlabel/netlabel_addrlist.c:369: warning: unused variable 'dir'
>
>
> Signed-off-by: Manish Katiyar <mkatiyar@gmail.com>
Hi Manish,
Good catch, I ran compile tests with different SECURITY/NETLABEL/IPV6
options enabled/disabled but forgot about AUDIT. I appreciate your
help finding this and submitting a possible solution but I think the
better approach would be to conditionally compile out the
netlbl_af{4,6}list_audit_addr() functions similarly to what we do with
several of the NetLabel kernel API functions in include/net/netlabel.h,
see netlbl_enabled() for a simple example.
If you have the time to revise this patch that would be great, just CC
me on the posting and I'll look it over. If you don't have time that
is okay too, just let me know so I can fix it.
Thanks!
> ---
> net/netlabel/netlabel_addrlist.c | 4 ++++
> 1 files changed, 4 insertions(+), 0 deletions(-)
>
> diff --git a/net/netlabel/netlabel_addrlist.c
> b/net/netlabel/netlabel_addrlist.c index b0925a3..65fbec1 100644
> --- a/net/netlabel/netlabel_addrlist.c
> +++ b/net/netlabel/netlabel_addrlist.c
> @@ -332,7 +332,9 @@ void netlbl_af4list_audit_addr(struct
> audit_buffer *audit_buf,
> __be32 addr, __be32 mask)
> {
> u32 mask_val = ntohl(mask);
> +#ifdef CONFIG_AUDIT
> char *dir = (src ? "src" : "dst");
> +#endif
>
> if (dev != NULL)
> audit_log_format(audit_buf, " netif=%s", dev);
> @@ -366,7 +368,9 @@ void netlbl_af6list_audit_addr(struct
> audit_buffer *audit_buf,
> const struct in6_addr *addr,
> const struct in6_addr *mask)
> {
> +#ifdef CONFIG_AUDIT
> char *dir = (src ? "src" : "dst");
> +#endif
>
> if (dev != NULL)
> audit_log_format(audit_buf, " netif=%s", dev);
--
paul moore
linux @ hp
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: [PATCH] : Fix compilation warnings in net/netlabel/netlabel_addrlist.c
@ 2008-10-29 13:49 ` Paul Moore
0 siblings, 0 replies; 27+ messages in thread
From: Paul Moore @ 2008-10-29 13:49 UTC (permalink / raw)
To: Manish Katiyar; +Cc: kernel-janitors, netdev
On Wednesday 29 October 2008 4:06:09 am Manish Katiyar wrote:
> Below patch fixes the following warning.
> net/netlabel/netlabel_addrlist.c:335: warning: unused variable 'dir'
> net/netlabel/netlabel_addrlist.c:369: warning: unused variable 'dir'
>
>
> Signed-off-by: Manish Katiyar <mkatiyar@gmail.com>
Hi Manish,
Good catch, I ran compile tests with different SECURITY/NETLABEL/IPV6
options enabled/disabled but forgot about AUDIT. I appreciate your
help finding this and submitting a possible solution but I think the
better approach would be to conditionally compile out the
netlbl_af{4,6}list_audit_addr() functions similarly to what we do with
several of the NetLabel kernel API functions in include/net/netlabel.h,
see netlbl_enabled() for a simple example.
If you have the time to revise this patch that would be great, just CC
me on the posting and I'll look it over. If you don't have time that
is okay too, just let me know so I can fix it.
Thanks!
> ---
> net/netlabel/netlabel_addrlist.c | 4 ++++
> 1 files changed, 4 insertions(+), 0 deletions(-)
>
> diff --git a/net/netlabel/netlabel_addrlist.c
> b/net/netlabel/netlabel_addrlist.c index b0925a3..65fbec1 100644
> --- a/net/netlabel/netlabel_addrlist.c
> +++ b/net/netlabel/netlabel_addrlist.c
> @@ -332,7 +332,9 @@ void netlbl_af4list_audit_addr(struct
> audit_buffer *audit_buf,
> __be32 addr, __be32 mask)
> {
> u32 mask_val = ntohl(mask);
> +#ifdef CONFIG_AUDIT
> char *dir = (src ? "src" : "dst");
> +#endif
>
> if (dev != NULL)
> audit_log_format(audit_buf, " netif=%s", dev);
> @@ -366,7 +368,9 @@ void netlbl_af6list_audit_addr(struct
> audit_buffer *audit_buf,
> const struct in6_addr *addr,
> const struct in6_addr *mask)
> {
> +#ifdef CONFIG_AUDIT
> char *dir = (src ? "src" : "dst");
> +#endif
>
> if (dev != NULL)
> audit_log_format(audit_buf, " netif=%s", dev);
--
paul moore
linux @ hp
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: [PATCH] : Fix compilation warnings in net/netlabel/netlabel_addrlist.c
[not found] ` <200810291135.25056.paul.moore@hp.com>
@ 2008-10-29 18:39 ` Manish Katiyar
0 siblings, 0 replies; 27+ messages in thread
From: Manish Katiyar @ 2008-10-29 18:27 UTC (permalink / raw)
To: Paul Moore, netdev, kernel-janitors; +Cc: mkatiyar
On Wed, Oct 29, 2008 at 9:05 PM, Paul Moore <paul.moore@hp.com> wrote:
> On Wednesday 29 October 2008 11:18:36 am you wrote:
>> On Wed, Oct 29, 2008 at 7:19 PM, Paul Moore <paul.moore@hp.com> wrote:
>> > On Wednesday 29 October 2008 4:06:09 am Manish Katiyar wrote:
>> >> Below patch fixes the following warning.
>> >> net/netlabel/netlabel_addrlist.c:335: warning: unused variable
>> >> 'dir' net/netlabel/netlabel_addrlist.c:369: warning: unused
>> >> variable 'dir'
>> >>
>> >>
>> >> Signed-off-by: Manish Katiyar <mkatiyar@gmail.com>
>> >
>> > Hi Manish,
>> >
>> > Good catch, I ran compile tests with different
>> > SECURITY/NETLABEL/IPV6 options enabled/disabled but forgot about
>> > AUDIT. I appreciate your help finding this and submitting a
>> > possible solution but I think the better approach would be to
>> > conditionally compile out the
>> > netlbl_af{4,6}list_audit_addr() functions similarly to what we do
>> > with several of the NetLabel kernel API functions in
>> > include/net/netlabel.h, see netlbl_enabled() for a simple example.
>>
>> Hi Paul,
>>
>> Thanks a lot. I didn't understand your suggestion, but this is also
>> the first time I am looking in net directory :-).
>
> There is a first time for everything :)
>
>> Even if you compile
>> netlbl_af{4,6}list_audit_add conditionally based on CONFIG_IPV6 and
>> others, you still need to have CONFIG_AUDIT for audit_log_format().
>> Isn't it ??
>
> Yes, but the idea is to conditionally compile the
> netlbl_af{4,6}list_audit_add() functions based on CONFIG_AUDIT. Below
> is a simple example using myfunc():
>
> In the source file you define the function:
>
> void myfunc(int myarg)
> {
> /* bunch of audit stuff */
> }
>
> In the header file you have a conditional prototype declaration:
>
> #ifdef CONFIG_AUDIT
> void myfunc(int myarg);
> #else
> static inline void myfunc(int myarg)
> {
> return;
> }
> #endif
>
> This way the code compiles correctly regardless of if CONFIG_AUDIT is
> defined and has the benefit of not including unnecessary code in the
> kernel binary.
Hi Paul,
Does this look better ?? Appreciate your help. Patch compile tested.
Enable netlabel auditing functions only when CONFIG_AUDIT is set
Signed-off-by: Manish Katiyar <mkatiyar@gmail.com>
---
net/netlabel/netlabel_addrlist.c | 2 ++
net/netlabel/netlabel_addrlist.h | 20 ++++++++++++++++++++
2 files changed, 22 insertions(+), 0 deletions(-)
diff --git a/net/netlabel/netlabel_addrlist.c b/net/netlabel/netlabel_addrlist.c
index b0925a3..830afef 100644
--- a/net/netlabel/netlabel_addrlist.c
+++ b/net/netlabel/netlabel_addrlist.c
@@ -311,6 +311,7 @@ struct netlbl_af6list *netlbl_af6list_remove(const
struct in6_addr *addr,
}
#endif /* IPv6 */
+#ifdef CONFIG_AUDIT
/*
* Audit Helper Functions
*/
@@ -386,3 +387,4 @@ void netlbl_af6list_audit_addr(struct audit_buffer
*audit_buf,
}
}
#endif /* IPv6 */
+#endif /* CONFIG_AUDIT */
diff --git a/net/netlabel/netlabel_addrlist.h b/net/netlabel/netlabel_addrlist.h
index 0242bea..7fa730a 100644
--- a/net/netlabel/netlabel_addrlist.h
+++ b/net/netlabel/netlabel_addrlist.h
@@ -120,9 +120,18 @@ struct netlbl_af4list *netlbl_af4list_search(__be32 addr,
struct netlbl_af4list *netlbl_af4list_search_exact(__be32 addr,
__be32 mask,
struct list_head *head);
+
+#ifdef CONFIG_AUDIT
void netlbl_af4list_audit_addr(struct audit_buffer *audit_buf,
int src, const char *dev,
__be32 addr, __be32 mask);
+#else
+static inline void netlbl_af4list_audit_addr(struct audit_buffer *audit_buf,
+ int src, const char *dev,
+ __be32 addr, __be32 mask) {
+ return;
+}
+#endif
#if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE)
@@ -179,11 +188,22 @@ struct netlbl_af6list
*netlbl_af6list_search(const struct in6_addr *addr,
struct netlbl_af6list *netlbl_af6list_search_exact(const struct in6_addr *addr,
const struct in6_addr *mask,
struct list_head *head);
+
+#ifdef CONFIG_AUDIT
void netlbl_af6list_audit_addr(struct audit_buffer *audit_buf,
int src,
const char *dev,
const struct in6_addr *addr,
const struct in6_addr *mask);
+#else
+static inline void netlbl_af6list_audit_addr(struct audit_buffer *audit_buf,
+ int src,
+ const char *dev,
+ const struct in6_addr *addr,
+ const struct in6_addr *mask) {
+ return;
+}
+#endif
#endif /* IPV6 */
#endif
--
1.5.4.3
Thanks -
Manish
>
>> > If you have the time to revise this patch that would be great, just
>> > CC me on the posting and I'll look it over.
>>
>> Since this is not my area of expertise, I would rather not like to
>> introduce more bugs in kernel. But yes I can try my best to learn and
>> try to fix it if you are willing to lend a helping hand (which might
>> be iterative and irritating for you due to my stupid questions).
>
> I'm more than happy to help but all I ask is that we keep the discussion
> on the mailing lists so that others could benefit from the discussion.
> However, if this isn't something you are comfortable with just let me
> know.
>
> --
> paul moore
> linux @ hp
>
^ permalink raw reply related [flat|nested] 27+ messages in thread
* Re: [PATCH] : Fix compilation warnings in net/netlabel/netlabel_addrlist.c
@ 2008-10-29 18:39 ` Manish Katiyar
0 siblings, 0 replies; 27+ messages in thread
From: Manish Katiyar @ 2008-10-29 18:39 UTC (permalink / raw)
To: Paul Moore, netdev, kernel-janitors; +Cc: mkatiyar
On Wed, Oct 29, 2008 at 9:05 PM, Paul Moore <paul.moore@hp.com> wrote:
> On Wednesday 29 October 2008 11:18:36 am you wrote:
>> On Wed, Oct 29, 2008 at 7:19 PM, Paul Moore <paul.moore@hp.com> wrote:
>> > On Wednesday 29 October 2008 4:06:09 am Manish Katiyar wrote:
>> >> Below patch fixes the following warning.
>> >> net/netlabel/netlabel_addrlist.c:335: warning: unused variable
>> >> 'dir' net/netlabel/netlabel_addrlist.c:369: warning: unused
>> >> variable 'dir'
>> >>
>> >>
>> >> Signed-off-by: Manish Katiyar <mkatiyar@gmail.com>
>> >
>> > Hi Manish,
>> >
>> > Good catch, I ran compile tests with different
>> > SECURITY/NETLABEL/IPV6 options enabled/disabled but forgot about
>> > AUDIT. I appreciate your help finding this and submitting a
>> > possible solution but I think the better approach would be to
>> > conditionally compile out the
>> > netlbl_af{4,6}list_audit_addr() functions similarly to what we do
>> > with several of the NetLabel kernel API functions in
>> > include/net/netlabel.h, see netlbl_enabled() for a simple example.
>>
>> Hi Paul,
>>
>> Thanks a lot. I didn't understand your suggestion, but this is also
>> the first time I am looking in net directory :-).
>
> There is a first time for everything :)
>
>> Even if you compile
>> netlbl_af{4,6}list_audit_add conditionally based on CONFIG_IPV6 and
>> others, you still need to have CONFIG_AUDIT for audit_log_format().
>> Isn't it ??
>
> Yes, but the idea is to conditionally compile the
> netlbl_af{4,6}list_audit_add() functions based on CONFIG_AUDIT. Below
> is a simple example using myfunc():
>
> In the source file you define the function:
>
> void myfunc(int myarg)
> {
> /* bunch of audit stuff */
> }
>
> In the header file you have a conditional prototype declaration:
>
> #ifdef CONFIG_AUDIT
> void myfunc(int myarg);
> #else
> static inline void myfunc(int myarg)
> {
> return;
> }
> #endif
>
> This way the code compiles correctly regardless of if CONFIG_AUDIT is
> defined and has the benefit of not including unnecessary code in the
> kernel binary.
Hi Paul,
Does this look better ?? Appreciate your help. Patch compile tested.
Enable netlabel auditing functions only when CONFIG_AUDIT is set
Signed-off-by: Manish Katiyar <mkatiyar@gmail.com>
---
net/netlabel/netlabel_addrlist.c | 2 ++
net/netlabel/netlabel_addrlist.h | 20 ++++++++++++++++++++
2 files changed, 22 insertions(+), 0 deletions(-)
diff --git a/net/netlabel/netlabel_addrlist.c b/net/netlabel/netlabel_addrlist.c
index b0925a3..830afef 100644
--- a/net/netlabel/netlabel_addrlist.c
+++ b/net/netlabel/netlabel_addrlist.c
@@ -311,6 +311,7 @@ struct netlbl_af6list *netlbl_af6list_remove(const
struct in6_addr *addr,
}
#endif /* IPv6 */
+#ifdef CONFIG_AUDIT
/*
* Audit Helper Functions
*/
@@ -386,3 +387,4 @@ void netlbl_af6list_audit_addr(struct audit_buffer
*audit_buf,
}
}
#endif /* IPv6 */
+#endif /* CONFIG_AUDIT */
diff --git a/net/netlabel/netlabel_addrlist.h b/net/netlabel/netlabel_addrlist.h
index 0242bea..7fa730a 100644
--- a/net/netlabel/netlabel_addrlist.h
+++ b/net/netlabel/netlabel_addrlist.h
@@ -120,9 +120,18 @@ struct netlbl_af4list *netlbl_af4list_search(__be32 addr,
struct netlbl_af4list *netlbl_af4list_search_exact(__be32 addr,
__be32 mask,
struct list_head *head);
+
+#ifdef CONFIG_AUDIT
void netlbl_af4list_audit_addr(struct audit_buffer *audit_buf,
int src, const char *dev,
__be32 addr, __be32 mask);
+#else
+static inline void netlbl_af4list_audit_addr(struct audit_buffer *audit_buf,
+ int src, const char *dev,
+ __be32 addr, __be32 mask) {
+ return;
+}
+#endif
#if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE)
@@ -179,11 +188,22 @@ struct netlbl_af6list
*netlbl_af6list_search(const struct in6_addr *addr,
struct netlbl_af6list *netlbl_af6list_search_exact(const struct in6_addr *addr,
const struct in6_addr *mask,
struct list_head *head);
+
+#ifdef CONFIG_AUDIT
void netlbl_af6list_audit_addr(struct audit_buffer *audit_buf,
int src,
const char *dev,
const struct in6_addr *addr,
const struct in6_addr *mask);
+#else
+static inline void netlbl_af6list_audit_addr(struct audit_buffer *audit_buf,
+ int src,
+ const char *dev,
+ const struct in6_addr *addr,
+ const struct in6_addr *mask) {
+ return;
+}
+#endif
#endif /* IPV6 */
#endif
--
1.5.4.3
Thanks -
Manish
>
>> > If you have the time to revise this patch that would be great, just
>> > CC me on the posting and I'll look it over.
>>
>> Since this is not my area of expertise, I would rather not like to
>> introduce more bugs in kernel. But yes I can try my best to learn and
>> try to fix it if you are willing to lend a helping hand (which might
>> be iterative and irritating for you due to my stupid questions).
>
> I'm more than happy to help but all I ask is that we keep the discussion
> on the mailing lists so that others could benefit from the discussion.
> However, if this isn't something you are comfortable with just let me
> know.
>
> --
> paul moore
> linux @ hp
>
^ permalink raw reply related [flat|nested] 27+ messages in thread
* Re: [PATCH] : Fix compilation warnings in net/netlabel/netlabel_addrlist.c
[not found] ` <200810291543.49225.paul.moore@hp.com>
@ 2008-10-30 2:22 ` Manish Katiyar
0 siblings, 0 replies; 27+ messages in thread
From: Manish Katiyar @ 2008-10-30 2:10 UTC (permalink / raw)
To: Paul Moore, netdev, kernel-janitors
On Thu, Oct 30, 2008 at 1:13 AM, Paul Moore <paul.moore@hp.com> wrote:
> On Wednesday 29 October 2008 2:27:44 pm you wrote:
>> Hi Paul,
>>
>> Does this look better ?? Appreciate your help. Patch compile tested.
>>
>> Enable netlabel auditing functions only when CONFIG_AUDIT is set
>>
>> Signed-off-by: Manish Katiyar <mkatiyar@gmail.com>
>
> Much better, just some style nits noted below that need to be
> addressed ...
Hi Paul,
Updated patch below as per your comments.
Enable netlabel auditing functions only when CONFIG_AUDIT is set
Signed-off-by: Manish Katiyar <mkatiyar@gmail.com>
---
net/netlabel/netlabel_addrlist.c | 2 ++
net/netlabel/netlabel_addrlist.h | 22 ++++++++++++++++++++++
2 files changed, 24 insertions(+), 0 deletions(-)
diff --git a/net/netlabel/netlabel_addrlist.c b/net/netlabel/netlabel_addrlist.c
index b0925a3..3fe73c2 100644
--- a/net/netlabel/netlabel_addrlist.c
+++ b/net/netlabel/netlabel_addrlist.c
@@ -327,6 +327,7 @@ struct netlbl_af6list *netlbl_af6list_remove(const
struct in6_addr *addr,
* Write the IPv4 address and address mask, if necessary, to @audit_buf.
*
*/
+#ifdef CONFIG_AUDIT
void netlbl_af4list_audit_addr(struct audit_buffer *audit_buf,
int src, const char *dev,
__be32 addr, __be32 mask)
@@ -386,3 +387,4 @@ void netlbl_af6list_audit_addr(struct audit_buffer
*audit_buf,
}
}
#endif /* IPv6 */
+#endif /* CONFIG_AUDIT */
diff --git a/net/netlabel/netlabel_addrlist.h b/net/netlabel/netlabel_addrlist.h
index 0242bea..3212965 100644
--- a/net/netlabel/netlabel_addrlist.h
+++ b/net/netlabel/netlabel_addrlist.h
@@ -120,9 +120,19 @@ struct netlbl_af4list *netlbl_af4list_search(__be32 addr,
struct netlbl_af4list *netlbl_af4list_search_exact(__be32 addr,
__be32 mask,
struct list_head *head);
+
+#ifdef CONFIG_AUDIT
void netlbl_af4list_audit_addr(struct audit_buffer *audit_buf,
int src, const char *dev,
__be32 addr, __be32 mask);
+#else
+static inline void netlbl_af4list_audit_addr(struct audit_buffer *audit_buf,
+ int src, const char *dev,
+ __be32 addr, __be32 mask)
+{
+ return;
+}
+#endif
#if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE)
@@ -179,11 +189,23 @@ struct netlbl_af6list
*netlbl_af6list_search(const struct in6_addr *addr,
struct netlbl_af6list *netlbl_af6list_search_exact(const struct in6_addr *addr,
const struct in6_addr *mask,
struct list_head *head);
+
+#ifdef CONFIG_AUDIT
void netlbl_af6list_audit_addr(struct audit_buffer *audit_buf,
int src,
const char *dev,
const struct in6_addr *addr,
const struct in6_addr *mask);
+#else
+static inline void netlbl_af6list_audit_addr(struct audit_buffer *audit_buf,
+ int src,
+ const char *dev,
+ const struct in6_addr *addr,
+ const struct in6_addr *mask)
+{
+ return;
+}
+#endif
#endif /* IPV6 */
#endif
--
1.5.4.3
Thanks -
Manish
>
>> ---
>> net/netlabel/netlabel_addrlist.c | 2 ++
>> net/netlabel/netlabel_addrlist.h | 20 ++++++++++++++++++++
>> 2 files changed, 22 insertions(+), 0 deletions(-)
>>
>> diff --git a/net/netlabel/netlabel_addrlist.c
>> b/net/netlabel/netlabel_addrlist.c index b0925a3..830afef 100644
>> --- a/net/netlabel/netlabel_addrlist.c
>> +++ b/net/netlabel/netlabel_addrlist.c
>> @@ -311,6 +311,7 @@ struct netlbl_af6list
>> *netlbl_af6list_remove(const struct in6_addr *addr,
>> }
>> #endif /* IPv6 */
>>
>> +#ifdef CONFIG_AUDIT
>> /*
>> * Audit Helper Functions
>> */
>
> Why don't you move the #ifdef down here past the comment. Not a big
> deal but you need to respin the patch to fix another problem so why not
> fix this up too.
>
>> @@ -386,3 +387,4 @@ void netlbl_af6list_audit_addr(struct
>> audit_buffer *audit_buf,
>> }
>> }
>> #endif /* IPv6 */
>> +#endif /* CONFIG_AUDIT */
>> diff --git a/net/netlabel/netlabel_addrlist.h
>> b/net/netlabel/netlabel_addrlist.h index 0242bea..7fa730a 100644
>> --- a/net/netlabel/netlabel_addrlist.h
>> +++ b/net/netlabel/netlabel_addrlist.h
>> @@ -120,9 +120,18 @@ struct netlbl_af4list
>> *netlbl_af4list_search(__be32 addr, struct netlbl_af4list
>> *netlbl_af4list_search_exact(__be32 addr, __be32 mask,
>> struct list_head *head);
>> +
>> +#ifdef CONFIG_AUDIT
>> void netlbl_af4list_audit_addr(struct audit_buffer *audit_buf,
>> int src, const char *dev,
>> __be32 addr, __be32 mask);
>> +#else
>> +static inline void netlbl_af4list_audit_addr(struct audit_buffer
>> *audit_buf, + int src, const char *dev,
>> + __be32 addr, __be32 mask) {
>> + return;
>> +}
>> +#endif
>
> The curly braces for the function body need to be on a line of their
> own. See the two example below:
>
> void bad_style_func(void) {
> return;
> }
>
> void good_style_func(void)
> {
> return;
> }
>
>> #if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE)
>>
>> @@ -179,11 +188,22 @@ struct netlbl_af6list
>> *netlbl_af6list_search(const struct in6_addr *addr,
>> struct netlbl_af6list *netlbl_af6list_search_exact(const struct
>> in6_addr *addr, const struct in6_addr *mask,
>> struct list_head *head);
>> +
>> +#ifdef CONFIG_AUDIT
>> void netlbl_af6list_audit_addr(struct audit_buffer *audit_buf,
>> int src,
>> const char *dev,
>> const struct in6_addr *addr,
>> const struct in6_addr *mask);
>> +#else
>> +static inline void netlbl_af6list_audit_addr(struct audit_buffer
>> *audit_buf, + int src,
>> + const char *dev,
>> + const struct in6_addr *addr,
>> + const struct in6_addr *mask) {
>> + return;
>> +}
>> +#endif
>
> Same curly brace problem.
>
> --
> paul moore
> linux @ hp
>
^ permalink raw reply related [flat|nested] 27+ messages in thread
* Re: [PATCH] : Fix compilation warnings in net/netlabel/netlabel_addrlist.c
@ 2008-10-30 2:22 ` Manish Katiyar
0 siblings, 0 replies; 27+ messages in thread
From: Manish Katiyar @ 2008-10-30 2:22 UTC (permalink / raw)
To: Paul Moore, netdev, kernel-janitors
On Thu, Oct 30, 2008 at 1:13 AM, Paul Moore <paul.moore@hp.com> wrote:
> On Wednesday 29 October 2008 2:27:44 pm you wrote:
>> Hi Paul,
>>
>> Does this look better ?? Appreciate your help. Patch compile tested.
>>
>> Enable netlabel auditing functions only when CONFIG_AUDIT is set
>>
>> Signed-off-by: Manish Katiyar <mkatiyar@gmail.com>
>
> Much better, just some style nits noted below that need to be
> addressed ...
Hi Paul,
Updated patch below as per your comments.
Enable netlabel auditing functions only when CONFIG_AUDIT is set
Signed-off-by: Manish Katiyar <mkatiyar@gmail.com>
---
net/netlabel/netlabel_addrlist.c | 2 ++
net/netlabel/netlabel_addrlist.h | 22 ++++++++++++++++++++++
2 files changed, 24 insertions(+), 0 deletions(-)
diff --git a/net/netlabel/netlabel_addrlist.c b/net/netlabel/netlabel_addrlist.c
index b0925a3..3fe73c2 100644
--- a/net/netlabel/netlabel_addrlist.c
+++ b/net/netlabel/netlabel_addrlist.c
@@ -327,6 +327,7 @@ struct netlbl_af6list *netlbl_af6list_remove(const
struct in6_addr *addr,
* Write the IPv4 address and address mask, if necessary, to @audit_buf.
*
*/
+#ifdef CONFIG_AUDIT
void netlbl_af4list_audit_addr(struct audit_buffer *audit_buf,
int src, const char *dev,
__be32 addr, __be32 mask)
@@ -386,3 +387,4 @@ void netlbl_af6list_audit_addr(struct audit_buffer
*audit_buf,
}
}
#endif /* IPv6 */
+#endif /* CONFIG_AUDIT */
diff --git a/net/netlabel/netlabel_addrlist.h b/net/netlabel/netlabel_addrlist.h
index 0242bea..3212965 100644
--- a/net/netlabel/netlabel_addrlist.h
+++ b/net/netlabel/netlabel_addrlist.h
@@ -120,9 +120,19 @@ struct netlbl_af4list *netlbl_af4list_search(__be32 addr,
struct netlbl_af4list *netlbl_af4list_search_exact(__be32 addr,
__be32 mask,
struct list_head *head);
+
+#ifdef CONFIG_AUDIT
void netlbl_af4list_audit_addr(struct audit_buffer *audit_buf,
int src, const char *dev,
__be32 addr, __be32 mask);
+#else
+static inline void netlbl_af4list_audit_addr(struct audit_buffer *audit_buf,
+ int src, const char *dev,
+ __be32 addr, __be32 mask)
+{
+ return;
+}
+#endif
#if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE)
@@ -179,11 +189,23 @@ struct netlbl_af6list
*netlbl_af6list_search(const struct in6_addr *addr,
struct netlbl_af6list *netlbl_af6list_search_exact(const struct in6_addr *addr,
const struct in6_addr *mask,
struct list_head *head);
+
+#ifdef CONFIG_AUDIT
void netlbl_af6list_audit_addr(struct audit_buffer *audit_buf,
int src,
const char *dev,
const struct in6_addr *addr,
const struct in6_addr *mask);
+#else
+static inline void netlbl_af6list_audit_addr(struct audit_buffer *audit_buf,
+ int src,
+ const char *dev,
+ const struct in6_addr *addr,
+ const struct in6_addr *mask)
+{
+ return;
+}
+#endif
#endif /* IPV6 */
#endif
--
1.5.4.3
Thanks -
Manish
>
>> ---
>> net/netlabel/netlabel_addrlist.c | 2 ++
>> net/netlabel/netlabel_addrlist.h | 20 ++++++++++++++++++++
>> 2 files changed, 22 insertions(+), 0 deletions(-)
>>
>> diff --git a/net/netlabel/netlabel_addrlist.c
>> b/net/netlabel/netlabel_addrlist.c index b0925a3..830afef 100644
>> --- a/net/netlabel/netlabel_addrlist.c
>> +++ b/net/netlabel/netlabel_addrlist.c
>> @@ -311,6 +311,7 @@ struct netlbl_af6list
>> *netlbl_af6list_remove(const struct in6_addr *addr,
>> }
>> #endif /* IPv6 */
>>
>> +#ifdef CONFIG_AUDIT
>> /*
>> * Audit Helper Functions
>> */
>
> Why don't you move the #ifdef down here past the comment. Not a big
> deal but you need to respin the patch to fix another problem so why not
> fix this up too.
>
>> @@ -386,3 +387,4 @@ void netlbl_af6list_audit_addr(struct
>> audit_buffer *audit_buf,
>> }
>> }
>> #endif /* IPv6 */
>> +#endif /* CONFIG_AUDIT */
>> diff --git a/net/netlabel/netlabel_addrlist.h
>> b/net/netlabel/netlabel_addrlist.h index 0242bea..7fa730a 100644
>> --- a/net/netlabel/netlabel_addrlist.h
>> +++ b/net/netlabel/netlabel_addrlist.h
>> @@ -120,9 +120,18 @@ struct netlbl_af4list
>> *netlbl_af4list_search(__be32 addr, struct netlbl_af4list
>> *netlbl_af4list_search_exact(__be32 addr, __be32 mask,
>> struct list_head *head);
>> +
>> +#ifdef CONFIG_AUDIT
>> void netlbl_af4list_audit_addr(struct audit_buffer *audit_buf,
>> int src, const char *dev,
>> __be32 addr, __be32 mask);
>> +#else
>> +static inline void netlbl_af4list_audit_addr(struct audit_buffer
>> *audit_buf, + int src, const char *dev,
>> + __be32 addr, __be32 mask) {
>> + return;
>> +}
>> +#endif
>
> The curly braces for the function body need to be on a line of their
> own. See the two example below:
>
> void bad_style_func(void) {
> return;
> }
>
> void good_style_func(void)
> {
> return;
> }
>
>> #if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE)
>>
>> @@ -179,11 +188,22 @@ struct netlbl_af6list
>> *netlbl_af6list_search(const struct in6_addr *addr,
>> struct netlbl_af6list *netlbl_af6list_search_exact(const struct
>> in6_addr *addr, const struct in6_addr *mask,
>> struct list_head *head);
>> +
>> +#ifdef CONFIG_AUDIT
>> void netlbl_af6list_audit_addr(struct audit_buffer *audit_buf,
>> int src,
>> const char *dev,
>> const struct in6_addr *addr,
>> const struct in6_addr *mask);
>> +#else
>> +static inline void netlbl_af6list_audit_addr(struct audit_buffer
>> *audit_buf, + int src,
>> + const char *dev,
>> + const struct in6_addr *addr,
>> + const struct in6_addr *mask) {
>> + return;
>> +}
>> +#endif
>
> Same curly brace problem.
>
> --
> paul moore
> linux @ hp
>
^ permalink raw reply related [flat|nested] 27+ messages in thread
* Re: [PATCH] : Fix compilation warnings in net/netlabel/netlabel_addrlist.c
2008-10-30 2:22 ` Manish Katiyar
@ 2008-10-30 12:12 ` Paul Moore
-1 siblings, 0 replies; 27+ messages in thread
From: Paul Moore @ 2008-10-30 12:12 UTC (permalink / raw)
To: Manish Katiyar; +Cc: netdev, kernel-janitors
On Wednesday 29 October 2008 10:10:36 pm Manish Katiyar wrote:
> On Thu, Oct 30, 2008 at 1:13 AM, Paul Moore <paul.moore@hp.com> wrote:
> > On Wednesday 29 October 2008 2:27:44 pm you wrote:
> >> Hi Paul,
> >>
> >> Does this look better ?? Appreciate your help. Patch compile
> >> tested.
> >>
> >> Enable netlabel auditing functions only when CONFIG_AUDIT is set
> >>
> >> Signed-off-by: Manish Katiyar <mkatiyar@gmail.com>
> >
> > Much better, just some style nits noted below that need to be
> > addressed ...
>
> Hi Paul,
>
> Updated patch below as per your comments.
>
> Enable netlabel auditing functions only when CONFIG_AUDIT is set
>
> Signed-off-by: Manish Katiyar <mkatiyar@gmail.com>
Thanks for sticking with this, I appreciate it. There is still one
small style nit (see below) but it is really my fault for not being
more specific. Unless you object I'll go ahead and fix it up when I
apply the patch.
I'll send a git pull request out to netdev later today, including your
patch, as there are two other labeled networking patches that need to
make the next 2.6.28-rcX release.
> ---
> net/netlabel/netlabel_addrlist.c | 2 ++
> net/netlabel/netlabel_addrlist.h | 22 ++++++++++++++++++++++
> 2 files changed, 24 insertions(+), 0 deletions(-)
>
> diff --git a/net/netlabel/netlabel_addrlist.c
> b/net/netlabel/netlabel_addrlist.c index b0925a3..3fe73c2 100644
> --- a/net/netlabel/netlabel_addrlist.c
> +++ b/net/netlabel/netlabel_addrlist.c
> @@ -327,6 +327,7 @@ struct netlbl_af6list
> *netlbl_af6list_remove(const struct in6_addr *addr,
> * Write the IPv4 address and address mask, if necessary, to
> @audit_buf. *
> */
> +#ifdef CONFIG_AUDIT
> void netlbl_af4list_audit_addr(struct audit_buffer *audit_buf,
> int src, const char *dev,
> __be32 addr, __be32 mask)
When I said to move the #ifdef below the comment, I meant below
the "Audit Helper Functions" comment but before the function's kdoc
comment header.
--
paul moore
linux @ hp
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: [PATCH] : Fix compilation warnings in net/netlabel/netlabel_addrlist.c
@ 2008-10-30 12:12 ` Paul Moore
0 siblings, 0 replies; 27+ messages in thread
From: Paul Moore @ 2008-10-30 12:12 UTC (permalink / raw)
To: Manish Katiyar; +Cc: netdev, kernel-janitors
On Wednesday 29 October 2008 10:10:36 pm Manish Katiyar wrote:
> On Thu, Oct 30, 2008 at 1:13 AM, Paul Moore <paul.moore@hp.com> wrote:
> > On Wednesday 29 October 2008 2:27:44 pm you wrote:
> >> Hi Paul,
> >>
> >> Does this look better ?? Appreciate your help. Patch compile
> >> tested.
> >>
> >> Enable netlabel auditing functions only when CONFIG_AUDIT is set
> >>
> >> Signed-off-by: Manish Katiyar <mkatiyar@gmail.com>
> >
> > Much better, just some style nits noted below that need to be
> > addressed ...
>
> Hi Paul,
>
> Updated patch below as per your comments.
>
> Enable netlabel auditing functions only when CONFIG_AUDIT is set
>
> Signed-off-by: Manish Katiyar <mkatiyar@gmail.com>
Thanks for sticking with this, I appreciate it. There is still one
small style nit (see below) but it is really my fault for not being
more specific. Unless you object I'll go ahead and fix it up when I
apply the patch.
I'll send a git pull request out to netdev later today, including your
patch, as there are two other labeled networking patches that need to
make the next 2.6.28-rcX release.
> ---
> net/netlabel/netlabel_addrlist.c | 2 ++
> net/netlabel/netlabel_addrlist.h | 22 ++++++++++++++++++++++
> 2 files changed, 24 insertions(+), 0 deletions(-)
>
> diff --git a/net/netlabel/netlabel_addrlist.c
> b/net/netlabel/netlabel_addrlist.c index b0925a3..3fe73c2 100644
> --- a/net/netlabel/netlabel_addrlist.c
> +++ b/net/netlabel/netlabel_addrlist.c
> @@ -327,6 +327,7 @@ struct netlbl_af6list
> *netlbl_af6list_remove(const struct in6_addr *addr,
> * Write the IPv4 address and address mask, if necessary, to
> @audit_buf. *
> */
> +#ifdef CONFIG_AUDIT
> void netlbl_af4list_audit_addr(struct audit_buffer *audit_buf,
> int src, const char *dev,
> __be32 addr, __be32 mask)
When I said to move the #ifdef below the comment, I meant below
the "Audit Helper Functions" comment but before the function's kdoc
comment header.
--
paul moore
linux @ hp
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: [PATCH] : Fix compilation warnings in net/netlabel/netlabel_addrlist.c
2008-10-30 12:12 ` Paul Moore
@ 2008-10-30 13:45 ` Manish Katiyar
-1 siblings, 0 replies; 27+ messages in thread
From: Manish Katiyar @ 2008-10-30 13:33 UTC (permalink / raw)
To: Paul Moore; +Cc: netdev, kernel-janitors
On Thu, Oct 30, 2008 at 5:42 PM, Paul Moore <paul.moore@hp.com> wrote:
> On Wednesday 29 October 2008 10:10:36 pm Manish Katiyar wrote:
>> On Thu, Oct 30, 2008 at 1:13 AM, Paul Moore <paul.moore@hp.com> wrote:
>> > On Wednesday 29 October 2008 2:27:44 pm you wrote:
>> >> Hi Paul,
>> >>
>> >> Does this look better ?? Appreciate your help. Patch compile
>> >> tested.
>> >>
>> >> Enable netlabel auditing functions only when CONFIG_AUDIT is set
>> >>
>> >> Signed-off-by: Manish Katiyar <mkatiyar@gmail.com>
>> >
>> > Much better, just some style nits noted below that need to be
>> > addressed ...
>>
>> Hi Paul,
>>
>> Updated patch below as per your comments.
>>
>> Enable netlabel auditing functions only when CONFIG_AUDIT is set
>>
>> Signed-off-by: Manish Katiyar <mkatiyar@gmail.com>
>
> Thanks for sticking with this, I appreciate it. There is still one
> small style nit (see below) but it is really my fault for not being
> more specific. Unless you object I'll go ahead and fix it up when I
> apply the patch.
>
> I'll send a git pull request out to netdev later today, including your
> patch, as there are two other labeled networking patches that need to
> make the next 2.6.28-rcX release.
>
>> ---
>> net/netlabel/netlabel_addrlist.c | 2 ++
>> net/netlabel/netlabel_addrlist.h | 22 ++++++++++++++++++++++
>> 2 files changed, 24 insertions(+), 0 deletions(-)
>>
>> diff --git a/net/netlabel/netlabel_addrlist.c
>> b/net/netlabel/netlabel_addrlist.c index b0925a3..3fe73c2 100644
>> --- a/net/netlabel/netlabel_addrlist.c
>> +++ b/net/netlabel/netlabel_addrlist.c
>> @@ -327,6 +327,7 @@ struct netlbl_af6list
>> *netlbl_af6list_remove(const struct in6_addr *addr,
>> * Write the IPv4 address and address mask, if necessary, to
>> @audit_buf. *
>> */
>> +#ifdef CONFIG_AUDIT
>> void netlbl_af4list_audit_addr(struct audit_buffer *audit_buf,
>> int src, const char *dev,
>> __be32 addr, __be32 mask)
>
> When I said to move the #ifdef below the comment, I meant below
> the "Audit Helper Functions" comment but before the function's kdoc
> comment header.
Hi Paul,
Below is the updated patch.
Enable netlabel auditing functions only when CONFIG_AUDIT is set
Signed-off-by: Manish Katiyar <mkatiyar@gmail.com>
---
net/netlabel/netlabel_addrlist.c | 2 ++
net/netlabel/netlabel_addrlist.h | 22 ++++++++++++++++++++++
2 files changed, 24 insertions(+), 0 deletions(-)
diff --git a/net/netlabel/netlabel_addrlist.c b/net/netlabel/netlabel_addrlist.c
index b0925a3..249f6b9 100644
--- a/net/netlabel/netlabel_addrlist.c
+++ b/net/netlabel/netlabel_addrlist.c
@@ -315,6 +315,7 @@ struct netlbl_af6list *netlbl_af6list_remove(const
struct in6_addr *addr,
* Audit Helper Functions
*/
+#ifdef CONFIG_AUDIT
/**
* netlbl_af4list_audit_addr - Audit an IPv4 address
* @audit_buf: audit buffer
@@ -386,3 +387,4 @@ void netlbl_af6list_audit_addr(struct audit_buffer
*audit_buf,
}
}
#endif /* IPv6 */
+#endif /* CONFIG_AUDIT */
diff --git a/net/netlabel/netlabel_addrlist.h b/net/netlabel/netlabel_addrlist.h
index 0242bea..3212965 100644
--- a/net/netlabel/netlabel_addrlist.h
+++ b/net/netlabel/netlabel_addrlist.h
@@ -120,9 +120,19 @@ struct netlbl_af4list *netlbl_af4list_search(__be32 addr,
struct netlbl_af4list *netlbl_af4list_search_exact(__be32 addr,
__be32 mask,
struct list_head *head);
+
+#ifdef CONFIG_AUDIT
void netlbl_af4list_audit_addr(struct audit_buffer *audit_buf,
int src, const char *dev,
__be32 addr, __be32 mask);
+#else
+static inline void netlbl_af4list_audit_addr(struct audit_buffer *audit_buf,
+ int src, const char *dev,
+ __be32 addr, __be32 mask)
+{
+ return;
+}
+#endif
#if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE)
@@ -179,11 +189,23 @@ struct netlbl_af6list
*netlbl_af6list_search(const struct in6_addr *addr,
struct netlbl_af6list *netlbl_af6list_search_exact(const struct in6_addr *addr,
const struct in6_addr *mask,
struct list_head *head);
+
+#ifdef CONFIG_AUDIT
void netlbl_af6list_audit_addr(struct audit_buffer *audit_buf,
int src,
const char *dev,
const struct in6_addr *addr,
const struct in6_addr *mask);
+#else
+static inline void netlbl_af6list_audit_addr(struct audit_buffer *audit_buf,
+ int src,
+ const char *dev,
+ const struct in6_addr *addr,
+ const struct in6_addr *mask)
+{
+ return;
+}
+#endif
#endif /* IPV6 */
#endif
--
1.5.4.3
Thanks -
Manish
>
> --
> paul moore
> linux @ hp
>
^ permalink raw reply related [flat|nested] 27+ messages in thread
* Re: [PATCH] : Fix compilation warnings in net/netlabel/netlabel_addrlist.c
2008-10-30 13:45 ` Manish Katiyar
@ 2008-10-30 13:39 ` Paul Moore
-1 siblings, 0 replies; 27+ messages in thread
From: Paul Moore @ 2008-10-30 13:39 UTC (permalink / raw)
To: Manish Katiyar; +Cc: netdev, kernel-janitors
On Thursday 30 October 2008 9:33:55 am Manish Katiyar wrote:
> Hi Paul,
>
> Below is the updated patch.
>
> Enable netlabel auditing functions only when CONFIG_AUDIT is set
>
> Signed-off-by: Manish Katiyar <mkatiyar@gmail.com>
Thanks a lot, I'll apply this and send a pull request later today.
> ---
> net/netlabel/netlabel_addrlist.c | 2 ++
> net/netlabel/netlabel_addrlist.h | 22 ++++++++++++++++++++++
> 2 files changed, 24 insertions(+), 0 deletions(-)
>
> diff --git a/net/netlabel/netlabel_addrlist.c
> b/net/netlabel/netlabel_addrlist.c index b0925a3..249f6b9 100644
> --- a/net/netlabel/netlabel_addrlist.c
> +++ b/net/netlabel/netlabel_addrlist.c
> @@ -315,6 +315,7 @@ struct netlbl_af6list
> *netlbl_af6list_remove(const struct in6_addr *addr,
> * Audit Helper Functions
> */
>
> +#ifdef CONFIG_AUDIT
> /**
> * netlbl_af4list_audit_addr - Audit an IPv4 address
> * @audit_buf: audit buffer
> @@ -386,3 +387,4 @@ void netlbl_af6list_audit_addr(struct
> audit_buffer *audit_buf,
> }
> }
> #endif /* IPv6 */
> +#endif /* CONFIG_AUDIT */
> diff --git a/net/netlabel/netlabel_addrlist.h
> b/net/netlabel/netlabel_addrlist.h index 0242bea..3212965 100644
> --- a/net/netlabel/netlabel_addrlist.h
> +++ b/net/netlabel/netlabel_addrlist.h
> @@ -120,9 +120,19 @@ struct netlbl_af4list
> *netlbl_af4list_search(__be32 addr, struct netlbl_af4list
> *netlbl_af4list_search_exact(__be32 addr, __be32 mask,
> struct list_head *head);
> +
> +#ifdef CONFIG_AUDIT
> void netlbl_af4list_audit_addr(struct audit_buffer *audit_buf,
> int src, const char *dev,
> __be32 addr, __be32 mask);
> +#else
> +static inline void netlbl_af4list_audit_addr(struct audit_buffer
> *audit_buf, + int src, const char *dev,
> + __be32 addr, __be32 mask)
> +{
> + return;
> +}
> +#endif
>
> #if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE)
>
> @@ -179,11 +189,23 @@ struct netlbl_af6list
> *netlbl_af6list_search(const struct in6_addr *addr,
> struct netlbl_af6list *netlbl_af6list_search_exact(const struct
> in6_addr *addr, const struct in6_addr *mask,
> struct list_head *head);
> +
> +#ifdef CONFIG_AUDIT
> void netlbl_af6list_audit_addr(struct audit_buffer *audit_buf,
> int src,
> const char *dev,
> const struct in6_addr *addr,
> const struct in6_addr *mask);
> +#else
> +static inline void netlbl_af6list_audit_addr(struct audit_buffer
> *audit_buf, + int src,
> + const char *dev,
> + const struct in6_addr *addr,
> + const struct in6_addr *mask)
> +{
> + return;
> +}
> +#endif
> #endif /* IPV6 */
>
> #endif
--
paul moore
linux @ hp
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: [PATCH] : Fix compilation warnings in net/netlabel/netlabel_addrlist.c
@ 2008-10-30 13:39 ` Paul Moore
0 siblings, 0 replies; 27+ messages in thread
From: Paul Moore @ 2008-10-30 13:39 UTC (permalink / raw)
To: Manish Katiyar; +Cc: netdev, kernel-janitors
On Thursday 30 October 2008 9:33:55 am Manish Katiyar wrote:
> Hi Paul,
>
> Below is the updated patch.
>
> Enable netlabel auditing functions only when CONFIG_AUDIT is set
>
> Signed-off-by: Manish Katiyar <mkatiyar@gmail.com>
Thanks a lot, I'll apply this and send a pull request later today.
> ---
> net/netlabel/netlabel_addrlist.c | 2 ++
> net/netlabel/netlabel_addrlist.h | 22 ++++++++++++++++++++++
> 2 files changed, 24 insertions(+), 0 deletions(-)
>
> diff --git a/net/netlabel/netlabel_addrlist.c
> b/net/netlabel/netlabel_addrlist.c index b0925a3..249f6b9 100644
> --- a/net/netlabel/netlabel_addrlist.c
> +++ b/net/netlabel/netlabel_addrlist.c
> @@ -315,6 +315,7 @@ struct netlbl_af6list
> *netlbl_af6list_remove(const struct in6_addr *addr,
> * Audit Helper Functions
> */
>
> +#ifdef CONFIG_AUDIT
> /**
> * netlbl_af4list_audit_addr - Audit an IPv4 address
> * @audit_buf: audit buffer
> @@ -386,3 +387,4 @@ void netlbl_af6list_audit_addr(struct
> audit_buffer *audit_buf,
> }
> }
> #endif /* IPv6 */
> +#endif /* CONFIG_AUDIT */
> diff --git a/net/netlabel/netlabel_addrlist.h
> b/net/netlabel/netlabel_addrlist.h index 0242bea..3212965 100644
> --- a/net/netlabel/netlabel_addrlist.h
> +++ b/net/netlabel/netlabel_addrlist.h
> @@ -120,9 +120,19 @@ struct netlbl_af4list
> *netlbl_af4list_search(__be32 addr, struct netlbl_af4list
> *netlbl_af4list_search_exact(__be32 addr, __be32 mask,
> struct list_head *head);
> +
> +#ifdef CONFIG_AUDIT
> void netlbl_af4list_audit_addr(struct audit_buffer *audit_buf,
> int src, const char *dev,
> __be32 addr, __be32 mask);
> +#else
> +static inline void netlbl_af4list_audit_addr(struct audit_buffer
> *audit_buf, + int src, const char *dev,
> + __be32 addr, __be32 mask)
> +{
> + return;
> +}
> +#endif
>
> #if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE)
>
> @@ -179,11 +189,23 @@ struct netlbl_af6list
> *netlbl_af6list_search(const struct in6_addr *addr,
> struct netlbl_af6list *netlbl_af6list_search_exact(const struct
> in6_addr *addr, const struct in6_addr *mask,
> struct list_head *head);
> +
> +#ifdef CONFIG_AUDIT
> void netlbl_af6list_audit_addr(struct audit_buffer *audit_buf,
> int src,
> const char *dev,
> const struct in6_addr *addr,
> const struct in6_addr *mask);
> +#else
> +static inline void netlbl_af6list_audit_addr(struct audit_buffer
> *audit_buf, + int src,
> + const char *dev,
> + const struct in6_addr *addr,
> + const struct in6_addr *mask)
> +{
> + return;
> +}
> +#endif
> #endif /* IPV6 */
>
> #endif
--
paul moore
linux @ hp
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: [PATCH] : Fix compilation warnings in net/netlabel/netlabel_addrlist.c
@ 2008-10-30 13:45 ` Manish Katiyar
0 siblings, 0 replies; 27+ messages in thread
From: Manish Katiyar @ 2008-10-30 13:45 UTC (permalink / raw)
To: Paul Moore; +Cc: netdev, kernel-janitors
On Thu, Oct 30, 2008 at 5:42 PM, Paul Moore <paul.moore@hp.com> wrote:
> On Wednesday 29 October 2008 10:10:36 pm Manish Katiyar wrote:
>> On Thu, Oct 30, 2008 at 1:13 AM, Paul Moore <paul.moore@hp.com> wrote:
>> > On Wednesday 29 October 2008 2:27:44 pm you wrote:
>> >> Hi Paul,
>> >>
>> >> Does this look better ?? Appreciate your help. Patch compile
>> >> tested.
>> >>
>> >> Enable netlabel auditing functions only when CONFIG_AUDIT is set
>> >>
>> >> Signed-off-by: Manish Katiyar <mkatiyar@gmail.com>
>> >
>> > Much better, just some style nits noted below that need to be
>> > addressed ...
>>
>> Hi Paul,
>>
>> Updated patch below as per your comments.
>>
>> Enable netlabel auditing functions only when CONFIG_AUDIT is set
>>
>> Signed-off-by: Manish Katiyar <mkatiyar@gmail.com>
>
> Thanks for sticking with this, I appreciate it. There is still one
> small style nit (see below) but it is really my fault for not being
> more specific. Unless you object I'll go ahead and fix it up when I
> apply the patch.
>
> I'll send a git pull request out to netdev later today, including your
> patch, as there are two other labeled networking patches that need to
> make the next 2.6.28-rcX release.
>
>> ---
>> net/netlabel/netlabel_addrlist.c | 2 ++
>> net/netlabel/netlabel_addrlist.h | 22 ++++++++++++++++++++++
>> 2 files changed, 24 insertions(+), 0 deletions(-)
>>
>> diff --git a/net/netlabel/netlabel_addrlist.c
>> b/net/netlabel/netlabel_addrlist.c index b0925a3..3fe73c2 100644
>> --- a/net/netlabel/netlabel_addrlist.c
>> +++ b/net/netlabel/netlabel_addrlist.c
>> @@ -327,6 +327,7 @@ struct netlbl_af6list
>> *netlbl_af6list_remove(const struct in6_addr *addr,
>> * Write the IPv4 address and address mask, if necessary, to
>> @audit_buf. *
>> */
>> +#ifdef CONFIG_AUDIT
>> void netlbl_af4list_audit_addr(struct audit_buffer *audit_buf,
>> int src, const char *dev,
>> __be32 addr, __be32 mask)
>
> When I said to move the #ifdef below the comment, I meant below
> the "Audit Helper Functions" comment but before the function's kdoc
> comment header.
Hi Paul,
Below is the updated patch.
Enable netlabel auditing functions only when CONFIG_AUDIT is set
Signed-off-by: Manish Katiyar <mkatiyar@gmail.com>
---
net/netlabel/netlabel_addrlist.c | 2 ++
net/netlabel/netlabel_addrlist.h | 22 ++++++++++++++++++++++
2 files changed, 24 insertions(+), 0 deletions(-)
diff --git a/net/netlabel/netlabel_addrlist.c b/net/netlabel/netlabel_addrlist.c
index b0925a3..249f6b9 100644
--- a/net/netlabel/netlabel_addrlist.c
+++ b/net/netlabel/netlabel_addrlist.c
@@ -315,6 +315,7 @@ struct netlbl_af6list *netlbl_af6list_remove(const
struct in6_addr *addr,
* Audit Helper Functions
*/
+#ifdef CONFIG_AUDIT
/**
* netlbl_af4list_audit_addr - Audit an IPv4 address
* @audit_buf: audit buffer
@@ -386,3 +387,4 @@ void netlbl_af6list_audit_addr(struct audit_buffer
*audit_buf,
}
}
#endif /* IPv6 */
+#endif /* CONFIG_AUDIT */
diff --git a/net/netlabel/netlabel_addrlist.h b/net/netlabel/netlabel_addrlist.h
index 0242bea..3212965 100644
--- a/net/netlabel/netlabel_addrlist.h
+++ b/net/netlabel/netlabel_addrlist.h
@@ -120,9 +120,19 @@ struct netlbl_af4list *netlbl_af4list_search(__be32 addr,
struct netlbl_af4list *netlbl_af4list_search_exact(__be32 addr,
__be32 mask,
struct list_head *head);
+
+#ifdef CONFIG_AUDIT
void netlbl_af4list_audit_addr(struct audit_buffer *audit_buf,
int src, const char *dev,
__be32 addr, __be32 mask);
+#else
+static inline void netlbl_af4list_audit_addr(struct audit_buffer *audit_buf,
+ int src, const char *dev,
+ __be32 addr, __be32 mask)
+{
+ return;
+}
+#endif
#if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE)
@@ -179,11 +189,23 @@ struct netlbl_af6list
*netlbl_af6list_search(const struct in6_addr *addr,
struct netlbl_af6list *netlbl_af6list_search_exact(const struct in6_addr *addr,
const struct in6_addr *mask,
struct list_head *head);
+
+#ifdef CONFIG_AUDIT
void netlbl_af6list_audit_addr(struct audit_buffer *audit_buf,
int src,
const char *dev,
const struct in6_addr *addr,
const struct in6_addr *mask);
+#else
+static inline void netlbl_af6list_audit_addr(struct audit_buffer *audit_buf,
+ int src,
+ const char *dev,
+ const struct in6_addr *addr,
+ const struct in6_addr *mask)
+{
+ return;
+}
+#endif
#endif /* IPV6 */
#endif
--
1.5.4.3
Thanks -
Manish
>
> --
> paul moore
> linux @ hp
>
^ permalink raw reply related [flat|nested] 27+ messages in thread
end of thread, other threads:[~2008-10-30 13:45 UTC | newest]
Thread overview: 27+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
-- strict thread matches above, loose matches on Subject: below --
2008-10-14 18:33 [PATCH] : Fix compilation warnings in net/802/fc.c Manish Katiyar
2008-10-14 19:35 ` Marcin Slusarz
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
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.