* linux-next: net tree build warnings
@ 2009-03-26 6:37 Stephen Rothwell
2009-03-26 7:50 ` Eric Leblond
0 siblings, 1 reply; 10+ messages in thread
From: Stephen Rothwell @ 2009-03-26 6:37 UTC (permalink / raw)
To: David S. Miller
Cc: linux-next, Eric Leblond, Patrick McHardy, netdev,
netfilter-devel
[-- Attachment #1: Type: text/plain, Size: 1140 bytes --]
Hi Dave,
Today's linux-next build (x86_64 allmodconfig) produced these warnings:
net/bridge/netfilter/ebt_log.c: In function 'ebt_log_init':
net/bridge/netfilter/ebt_log.c:230: warning: passing argument 2 of 'nf_log_register' discards qualifiers from pointer target type
net/bridge/netfilter/ebt_log.c: In function 'ebt_log_fini':
net/bridge/netfilter/ebt_log.c:236: warning: passing argument 1 of 'nf_log_unregister' discards qualifiers from pointer target type
net/bridge/netfilter/ebt_ulog.c: In function 'ebt_ulog_init':
net/bridge/netfilter/ebt_ulog.c:317: warning: passing argument 2 of 'nf_log_register' discards qualifiers from pointer target type
net/bridge/netfilter/ebt_ulog.c: In function 'ebt_ulog_fini':
net/bridge/netfilter/ebt_ulog.c:327: warning: passing argument 1 of 'nf_log_unregister' discards qualifiers from pointer target type
Caused by commit ca735b3aaa945626ba65a3e51145bfe4ecd9e222 ("netfilter:
use a linked list of loggers") which removed const from the "struct
nf_logger *" arguments.
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/
[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: linux-next: net tree build warnings
2009-03-26 6:37 linux-next: net tree build warnings Stephen Rothwell
@ 2009-03-26 7:50 ` Eric Leblond
2009-03-26 7:59 ` [PATCH 1/3] netfilter: fix warning about invalid const usage Eric Leblond
` (4 more replies)
0 siblings, 5 replies; 10+ messages in thread
From: Eric Leblond @ 2009-03-26 7:50 UTC (permalink / raw)
To: Stephen Rothwell
Cc: David S. Miller, linux-next, Patrick McHardy, netdev,
netfilter-devel
[-- Attachment #1: Type: text/plain, Size: 1744 bytes --]
Hi Stephen,
Le jeudi 26 mars 2009 à 17:37 +1100, Stephen Rothwell a écrit :
> Hi Dave,
>
> Today's linux-next build (x86_64 allmodconfig) produced these warnings:
>
> net/bridge/netfilter/ebt_log.c: In function 'ebt_log_init':
> net/bridge/netfilter/ebt_log.c:230: warning: passing argument 2 of 'nf_log_register' discards qualifiers from pointer target type
> net/bridge/netfilter/ebt_log.c: In function 'ebt_log_fini':
> net/bridge/netfilter/ebt_log.c:236: warning: passing argument 1 of 'nf_log_unregister' discards qualifiers from pointer target type
> net/bridge/netfilter/ebt_ulog.c: In function 'ebt_ulog_init':
> net/bridge/netfilter/ebt_ulog.c:317: warning: passing argument 2 of 'nf_log_register' discards qualifiers from pointer target type
> net/bridge/netfilter/ebt_ulog.c: In function 'ebt_ulog_fini':
> net/bridge/netfilter/ebt_ulog.c:327: warning: passing argument 1 of 'nf_log_unregister' discards qualifiers from pointer target type
Thanks a lot for pointing this. I stupidely forgot to build this module
during my testing.
I've made the necessary modifications and a patch fixing this will
follow this mail.
Doing some testing of the ebt_ulog module, I've found some problems. One
of them was the following messages:
sys_init_module: 'ebt_ulog'->init suspiciously returned 1, it should
follow 0/-E convention
sys_init_module: loading module anyway...
Pid: 2334, comm: modprobe Not tainted 2.6.29-rc5edenwall0-00883-g199e57b
#146
Call Trace:
[<c0441b81>] ? printk+0xf/0x16
[<c02311af>] sys_init_module+0x107/0x186
[<c0202cfa>] syscall_call+0x7/0xb
A patch fixing this will also follow.
BR,
--
Eric Leblond <eric@inl.fr>
INL: http://www.inl.fr/
NuFW: http://www.nufw.org/
[-- Attachment #2: Ceci est une partie de message numériquement signée --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH 1/3] netfilter: fix warning about invalid const usage
2009-03-26 7:50 ` Eric Leblond
@ 2009-03-26 7:59 ` Eric Leblond
2009-03-26 8:03 ` David Miller
2009-03-26 7:59 ` [PATCH 2/3] netfilter: fix warning in ebt_ulog init function Eric Leblond
` (3 subsequent siblings)
4 siblings, 1 reply; 10+ messages in thread
From: Eric Leblond @ 2009-03-26 7:59 UTC (permalink / raw)
To: davem, kaber, sfr; +Cc: linux-next, netdev, netfilter-devel, Eric Leblond
This patch fixes the declaration of the logger structure in ebt_log
and ebt_ulog: I forgot to remove the const option from their declaration
in the commit ca735b3aaa945626ba65a3e51145bfe4ecd9e222 ("netfilter:
use a linked list of loggers").
Pointed-out-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Eric Leblond <eric@inl.fr>
---
net/bridge/netfilter/ebt_log.c | 2 +-
net/bridge/netfilter/ebt_ulog.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/net/bridge/netfilter/ebt_log.c b/net/bridge/netfilter/ebt_log.c
index d44cbf8..a94f3cc 100644
--- a/net/bridge/netfilter/ebt_log.c
+++ b/net/bridge/netfilter/ebt_log.c
@@ -214,7 +214,7 @@ static struct xt_target ebt_log_tg_reg __read_mostly = {
.me = THIS_MODULE,
};
-static const struct nf_logger ebt_log_logger = {
+static struct nf_logger ebt_log_logger __read_mostly = {
.name = "ebt_log",
.logfn = &ebt_log_packet,
.me = THIS_MODULE,
diff --git a/net/bridge/netfilter/ebt_ulog.c b/net/bridge/netfilter/ebt_ulog.c
index 2c6d682..80c78c5 100644
--- a/net/bridge/netfilter/ebt_ulog.c
+++ b/net/bridge/netfilter/ebt_ulog.c
@@ -279,7 +279,7 @@ static struct xt_target ebt_ulog_tg_reg __read_mostly = {
.me = THIS_MODULE,
};
-static const struct nf_logger ebt_ulog_logger = {
+static struct nf_logger ebt_ulog_logger __read_mostly = {
.name = "ulog",
.logfn = &ebt_log_packet,
.me = THIS_MODULE,
--
1.5.6.3
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH 2/3] netfilter: fix warning in ebt_ulog init function.
2009-03-26 7:50 ` Eric Leblond
2009-03-26 7:59 ` [PATCH 1/3] netfilter: fix warning about invalid const usage Eric Leblond
@ 2009-03-26 7:59 ` Eric Leblond
2009-03-26 8:04 ` David Miller
2009-03-26 7:59 ` [PATCH 3/3] netfilter: fix nf_logger name in ebt_ulog Eric Leblond
` (2 subsequent siblings)
4 siblings, 1 reply; 10+ messages in thread
From: Eric Leblond @ 2009-03-26 7:59 UTC (permalink / raw)
To: davem, kaber, sfr; +Cc: linux-next, netdev, netfilter-devel, Eric Leblond
The ebt_ulog module does not follow the fixed convention about function
return. Loading the module is triggering the following message:
sys_init_module: 'ebt_ulog'->init suspiciously returned 1, it should follow 0/-E convention
sys_init_module: loading module anyway...
Pid: 2334, comm: modprobe Not tainted 2.6.29-rc5edenwall0-00883-g199e57b #146
Call Trace:
[<c0441b81>] ? printk+0xf/0x16
[<c02311af>] sys_init_module+0x107/0x186
[<c0202cfa>] syscall_call+0x7/0xb
The following patch fixes the return treatment in ebt_ulog_init()
function.
Signed-off-by: Eric Leblond <eric@inl.fr>
---
net/bridge/netfilter/ebt_ulog.c | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/net/bridge/netfilter/ebt_ulog.c b/net/bridge/netfilter/ebt_ulog.c
index 80c78c5..ac6fa43 100644
--- a/net/bridge/netfilter/ebt_ulog.c
+++ b/net/bridge/netfilter/ebt_ulog.c
@@ -287,13 +287,13 @@ static struct nf_logger ebt_ulog_logger __read_mostly = {
static int __init ebt_ulog_init(void)
{
- bool ret = true;
+ int ret;
int i;
if (nlbufsiz >= 128*1024) {
printk(KERN_NOTICE "ebt_ulog: Netlink buffer has to be <= 128kB,"
" please try a smaller nlbufsiz parameter.\n");
- return false;
+ return -EINVAL;
}
/* initialize ulog_buffers */
@@ -308,12 +308,12 @@ static int __init ebt_ulog_init(void)
if (!ebtulognl) {
printk(KERN_WARNING KBUILD_MODNAME ": out of memory trying to "
"call netlink_kernel_create\n");
- ret = false;
- } else if (xt_register_target(&ebt_ulog_tg_reg) != 0) {
+ ret = -ENOMEM;
+ } else if ((ret = xt_register_target(&ebt_ulog_tg_reg)) != 0) {
netlink_kernel_release(ebtulognl);
}
- if (ret)
+ if (ret == 0)
nf_log_register(NFPROTO_BRIDGE, &ebt_ulog_logger);
return ret;
--
1.5.6.3
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH 3/3] netfilter: fix nf_logger name in ebt_ulog.
2009-03-26 7:50 ` Eric Leblond
2009-03-26 7:59 ` [PATCH 1/3] netfilter: fix warning about invalid const usage Eric Leblond
2009-03-26 7:59 ` [PATCH 2/3] netfilter: fix warning in ebt_ulog init function Eric Leblond
@ 2009-03-26 7:59 ` Eric Leblond
2009-03-26 8:04 ` David Miller
2009-03-26 13:17 ` linux-next: net tree build warnings Patrick McHardy
2009-03-26 22:01 ` Stephen Rothwell
4 siblings, 1 reply; 10+ messages in thread
From: Eric Leblond @ 2009-03-26 7:59 UTC (permalink / raw)
To: davem, kaber, sfr; +Cc: linux-next, netdev, netfilter-devel, Eric Leblond
This patch renames the ebt_ulog nf_logger from "ulog" to "ebt_ulog" to
be in sync with other modules naming. As this name was currently only
used for informational purpose, the renaming should be harmless.
Signed-off-by: Eric Leblond <eric@inl.fr>
---
net/bridge/netfilter/ebt_ulog.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/net/bridge/netfilter/ebt_ulog.c b/net/bridge/netfilter/ebt_ulog.c
index ac6fa43..133eeae 100644
--- a/net/bridge/netfilter/ebt_ulog.c
+++ b/net/bridge/netfilter/ebt_ulog.c
@@ -280,7 +280,7 @@ static struct xt_target ebt_ulog_tg_reg __read_mostly = {
};
static struct nf_logger ebt_ulog_logger __read_mostly = {
- .name = "ulog",
+ .name = "ebt_ulog",
.logfn = &ebt_log_packet,
.me = THIS_MODULE,
};
--
1.5.6.3
^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [PATCH 1/3] netfilter: fix warning about invalid const usage
2009-03-26 7:59 ` [PATCH 1/3] netfilter: fix warning about invalid const usage Eric Leblond
@ 2009-03-26 8:03 ` David Miller
0 siblings, 0 replies; 10+ messages in thread
From: David Miller @ 2009-03-26 8:03 UTC (permalink / raw)
To: eric; +Cc: kaber, sfr, linux-next, netdev, netfilter-devel
From: Eric Leblond <eric@inl.fr>
Date: Thu, 26 Mar 2009 08:59:54 +0100
> This patch fixes the declaration of the logger structure in ebt_log
> and ebt_ulog: I forgot to remove the const option from their declaration
> in the commit ca735b3aaa945626ba65a3e51145bfe4ecd9e222 ("netfilter:
> use a linked list of loggers").
>
> Pointed-out-by: Stephen Rothwell <sfr@canb.auug.org.au>
> Signed-off-by: Eric Leblond <eric@inl.fr>
Applied.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 2/3] netfilter: fix warning in ebt_ulog init function.
2009-03-26 7:59 ` [PATCH 2/3] netfilter: fix warning in ebt_ulog init function Eric Leblond
@ 2009-03-26 8:04 ` David Miller
0 siblings, 0 replies; 10+ messages in thread
From: David Miller @ 2009-03-26 8:04 UTC (permalink / raw)
To: eric; +Cc: kaber, sfr, linux-next, netdev, netfilter-devel
From: Eric Leblond <eric@inl.fr>
Date: Thu, 26 Mar 2009 08:59:55 +0100
> The ebt_ulog module does not follow the fixed convention about function
> return. Loading the module is triggering the following message:
>
> sys_init_module: 'ebt_ulog'->init suspiciously returned 1, it should follow 0/-E convention
> sys_init_module: loading module anyway...
> Pid: 2334, comm: modprobe Not tainted 2.6.29-rc5edenwall0-00883-g199e57b #146
> Call Trace:
> [<c0441b81>] ? printk+0xf/0x16
> [<c02311af>] sys_init_module+0x107/0x186
> [<c0202cfa>] syscall_call+0x7/0xb
>
> The following patch fixes the return treatment in ebt_ulog_init()
> function.
>
> Signed-off-by: Eric Leblond <eric@inl.fr>
Applied.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 3/3] netfilter: fix nf_logger name in ebt_ulog.
2009-03-26 7:59 ` [PATCH 3/3] netfilter: fix nf_logger name in ebt_ulog Eric Leblond
@ 2009-03-26 8:04 ` David Miller
0 siblings, 0 replies; 10+ messages in thread
From: David Miller @ 2009-03-26 8:04 UTC (permalink / raw)
To: eric; +Cc: kaber, sfr, linux-next, netdev, netfilter-devel
From: Eric Leblond <eric@inl.fr>
Date: Thu, 26 Mar 2009 08:59:56 +0100
> This patch renames the ebt_ulog nf_logger from "ulog" to "ebt_ulog" to
> be in sync with other modules naming. As this name was currently only
> used for informational purpose, the renaming should be harmless.
>
> Signed-off-by: Eric Leblond <eric@inl.fr>
Applied.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: linux-next: net tree build warnings
2009-03-26 7:50 ` Eric Leblond
` (2 preceding siblings ...)
2009-03-26 7:59 ` [PATCH 3/3] netfilter: fix nf_logger name in ebt_ulog Eric Leblond
@ 2009-03-26 13:17 ` Patrick McHardy
2009-03-26 22:01 ` Stephen Rothwell
4 siblings, 0 replies; 10+ messages in thread
From: Patrick McHardy @ 2009-03-26 13:17 UTC (permalink / raw)
To: Eric Leblond
Cc: Stephen Rothwell, David S. Miller, linux-next, netdev,
netfilter-devel
Eric Leblond wrote:
> Hi Stephen,
>
> Le jeudi 26 mars 2009 à 17:37 +1100, Stephen Rothwell a écrit :
>> Hi Dave,
>>
>> Today's linux-next build (x86_64 allmodconfig) produced these warnings:
>>
>> net/bridge/netfilter/ebt_log.c: In function 'ebt_log_init':
>> net/bridge/netfilter/ebt_log.c:230: warning: passing argument 2 of 'nf_log_register' discards qualifiers from pointer target type
>> net/bridge/netfilter/ebt_log.c: In function 'ebt_log_fini':
>> net/bridge/netfilter/ebt_log.c:236: warning: passing argument 1 of 'nf_log_unregister' discards qualifiers from pointer target type
>> net/bridge/netfilter/ebt_ulog.c: In function 'ebt_ulog_init':
>> net/bridge/netfilter/ebt_ulog.c:317: warning: passing argument 2 of 'nf_log_register' discards qualifiers from pointer target type
>> net/bridge/netfilter/ebt_ulog.c: In function 'ebt_ulog_fini':
>> net/bridge/netfilter/ebt_ulog.c:327: warning: passing argument 1 of 'nf_log_unregister' discards qualifiers from pointer target type
>
> Thanks a lot for pointing this. I stupidely forgot to build this module
> during my testing.
Same here, I seem to have accidentally disabled bridging in my test
builds, sorry.
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: linux-next: net tree build warnings
2009-03-26 7:50 ` Eric Leblond
` (3 preceding siblings ...)
2009-03-26 13:17 ` linux-next: net tree build warnings Patrick McHardy
@ 2009-03-26 22:01 ` Stephen Rothwell
4 siblings, 0 replies; 10+ messages in thread
From: Stephen Rothwell @ 2009-03-26 22:01 UTC (permalink / raw)
To: Eric Leblond
Cc: David S. Miller, linux-next, Patrick McHardy, netdev,
netfilter-devel
[-- Attachment #1: Type: text/plain, Size: 397 bytes --]
Hi Eric,
On Thu, 26 Mar 2009 08:50:19 +0100 Eric Leblond <eric@inl.fr> wrote:
>
> Thanks a lot for pointing this. I stupidely forgot to build this module
> during my testing.
>
> I've made the necessary modifications and a patch fixing this will
> follow this mail.
Thanks.
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/
[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2009-03-26 22:01 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-03-26 6:37 linux-next: net tree build warnings Stephen Rothwell
2009-03-26 7:50 ` Eric Leblond
2009-03-26 7:59 ` [PATCH 1/3] netfilter: fix warning about invalid const usage Eric Leblond
2009-03-26 8:03 ` David Miller
2009-03-26 7:59 ` [PATCH 2/3] netfilter: fix warning in ebt_ulog init function Eric Leblond
2009-03-26 8:04 ` David Miller
2009-03-26 7:59 ` [PATCH 3/3] netfilter: fix nf_logger name in ebt_ulog Eric Leblond
2009-03-26 8:04 ` David Miller
2009-03-26 13:17 ` linux-next: net tree build warnings Patrick McHardy
2009-03-26 22:01 ` Stephen Rothwell
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).