* [PATCH -next 1/1] net: skbuff: fix compile error in skb_panic()
@ 2013-02-13 11:20 James Hogan
2013-02-13 12:41 ` Sedat Dilek
2013-02-13 19:43 ` Jean Sacren
0 siblings, 2 replies; 4+ messages in thread
From: James Hogan @ 2013-02-13 11:20 UTC (permalink / raw)
To: Jean Sacren, David S. Miller
Cc: linux-kernel, linux-next, James Hogan, Jiri Pirko
I get the following build error on next-20130213 due to the following
commit:
commit f05de73bf82fbbc00265c06d12efb7273f7dc54a ("skbuff: create
skb_panic() function and its wrappers").
It adds an argument called panic to a function that uses the BUG() macro
which tries to call panic, but the argument masks the panic() function
declaration, resulting in the following error (gcc 4.2.4):
net/core/skbuff.c In function 'skb_panic':
net/core/skbuff.c +126 : error: called object 'panic' is not a function
This is fixed by renaming the argument to msg.
Signed-off-by: James Hogan <james.hogan@imgtec.com>
Cc: Jean Sacren <sakiwit@gmail.com>
Cc: Jiri Pirko <jiri@resnulli.us>
Cc: David S. Miller <davem@davemloft.net>
---
Feel free to rename panic to something else or squash this into the
offending commit.
net/core/skbuff.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/net/core/skbuff.c b/net/core/skbuff.c
index 8731c39..21a22cc 100644
--- a/net/core/skbuff.c
+++ b/net/core/skbuff.c
@@ -109,7 +109,7 @@ static const struct pipe_buf_operations sock_pipe_buf_ops = {
* @skb: buffer
* @sz: size
* @addr: address
- * @panic: skb_over_panic or skb_under_panic
+ * @msg: skb_over_panic or skb_under_panic
*
* Out-of-line support for skb_put() and skb_push().
* Called via the wrapper skb_over_panic() or skb_under_panic().
@@ -117,10 +117,10 @@ static const struct pipe_buf_operations sock_pipe_buf_ops = {
* __builtin_return_address is not used because it is not always reliable.
*/
static void skb_panic(struct sk_buff *skb, unsigned int sz, void *addr,
- const char panic[])
+ const char msg[])
{
pr_emerg("%s: text:%p len:%d put:%d head:%p data:%p tail:%#lx end:%#lx dev:%s\n",
- panic, addr, skb->len, sz, skb->head, skb->data,
+ msg, addr, skb->len, sz, skb->head, skb->data,
(unsigned long)skb->tail, (unsigned long)skb->end,
skb->dev ? skb->dev->name : "<NULL>");
BUG();
--
1.8.1.2
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH -next 1/1] net: skbuff: fix compile error in skb_panic()
2013-02-13 11:20 [PATCH -next 1/1] net: skbuff: fix compile error in skb_panic() James Hogan
@ 2013-02-13 12:41 ` Sedat Dilek
2013-02-13 16:52 ` David Miller
2013-02-13 19:43 ` Jean Sacren
1 sibling, 1 reply; 4+ messages in thread
From: Sedat Dilek @ 2013-02-13 12:41 UTC (permalink / raw)
To: James Hogan
Cc: Jean Sacren, David S. Miller, linux-kernel, linux-next,
Jiri Pirko, netdev
On Wed, Feb 13, 2013 at 12:20 PM, James Hogan <james.hogan@imgtec.com> wrote:
> I get the following build error on next-20130213 due to the following
> commit:
>
> commit f05de73bf82fbbc00265c06d12efb7273f7dc54a ("skbuff: create
> skb_panic() function and its wrappers").
>
> It adds an argument called panic to a function that uses the BUG() macro
> which tries to call panic, but the argument masks the panic() function
> declaration, resulting in the following error (gcc 4.2.4):
>
> net/core/skbuff.c In function 'skb_panic':
> net/core/skbuff.c +126 : error: called object 'panic' is not a function
>
[ CC linux-netdev ]
Hmm, with gcc-4.6.3 on Ubuntu/precise I don't see this... compiler-specific?
$ grep skbuff build-log_3.8.0-rc7-next20130213-2-iniza-small.txt
CC net/core/skbuff.o
- Sedat -
> This is fixed by renaming the argument to msg.
>
> Signed-off-by: James Hogan <james.hogan@imgtec.com>
> Cc: Jean Sacren <sakiwit@gmail.com>
> Cc: Jiri Pirko <jiri@resnulli.us>
> Cc: David S. Miller <davem@davemloft.net>
> ---
>
> Feel free to rename panic to something else or squash this into the
> offending commit.
>
> net/core/skbuff.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/net/core/skbuff.c b/net/core/skbuff.c
> index 8731c39..21a22cc 100644
> --- a/net/core/skbuff.c
> +++ b/net/core/skbuff.c
> @@ -109,7 +109,7 @@ static const struct pipe_buf_operations sock_pipe_buf_ops = {
> * @skb: buffer
> * @sz: size
> * @addr: address
> - * @panic: skb_over_panic or skb_under_panic
> + * @msg: skb_over_panic or skb_under_panic
> *
> * Out-of-line support for skb_put() and skb_push().
> * Called via the wrapper skb_over_panic() or skb_under_panic().
> @@ -117,10 +117,10 @@ static const struct pipe_buf_operations sock_pipe_buf_ops = {
> * __builtin_return_address is not used because it is not always reliable.
> */
> static void skb_panic(struct sk_buff *skb, unsigned int sz, void *addr,
> - const char panic[])
> + const char msg[])
> {
> pr_emerg("%s: text:%p len:%d put:%d head:%p data:%p tail:%#lx end:%#lx dev:%s\n",
> - panic, addr, skb->len, sz, skb->head, skb->data,
> + msg, addr, skb->len, sz, skb->head, skb->data,
> (unsigned long)skb->tail, (unsigned long)skb->end,
> skb->dev ? skb->dev->name : "<NULL>");
> BUG();
> --
> 1.8.1.2
>
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-next" 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] 4+ messages in thread
* Re: [PATCH -next 1/1] net: skbuff: fix compile error in skb_panic()
2013-02-13 12:41 ` Sedat Dilek
@ 2013-02-13 16:52 ` David Miller
0 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2013-02-13 16:52 UTC (permalink / raw)
To: sedat.dilek; +Cc: james.hogan, sakiwit, linux-kernel, linux-next, jiri, netdev
From: Sedat Dilek <sedat.dilek@gmail.com>
Date: Wed, 13 Feb 2013 13:41:21 +0100
> On Wed, Feb 13, 2013 at 12:20 PM, James Hogan <james.hogan@imgtec.com> wrote:
>> I get the following build error on next-20130213 due to the following
>> commit:
>>
>> commit f05de73bf82fbbc00265c06d12efb7273f7dc54a ("skbuff: create
>> skb_panic() function and its wrappers").
>>
>> It adds an argument called panic to a function that uses the BUG() macro
>> which tries to call panic, but the argument masks the panic() function
>> declaration, resulting in the following error (gcc 4.2.4):
>>
>> net/core/skbuff.c In function 'skb_panic':
>> net/core/skbuff.c +126 : error: called object 'panic' is not a function
>>
>
> [ CC linux-netdev ]
>
> Hmm, with gcc-4.6.3 on Ubuntu/precise I don't see this... compiler-specific?
Kconfig option specific.
Applied, thanks James.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH -next 1/1] net: skbuff: fix compile error in skb_panic()
2013-02-13 11:20 [PATCH -next 1/1] net: skbuff: fix compile error in skb_panic() James Hogan
2013-02-13 12:41 ` Sedat Dilek
@ 2013-02-13 19:43 ` Jean Sacren
1 sibling, 0 replies; 4+ messages in thread
From: Jean Sacren @ 2013-02-13 19:43 UTC (permalink / raw)
To: James Hogan; +Cc: David S. Miller, linux-kernel, linux-next, Jiri Pirko
From: James Hogan <james.hogan@imgtec.com>
Date: Wed, 13 Feb 2013 11:20:27 +0000
>
> I get the following build error on next-20130213 due to the following
> commit:
>
> commit f05de73bf82fbbc00265c06d12efb7273f7dc54a ("skbuff: create
> skb_panic() function and its wrappers").
>
> It adds an argument called panic to a function that uses the BUG() macro
> which tries to call panic, but the argument masks the panic() function
> declaration, resulting in the following error (gcc 4.2.4):
>
> net/core/skbuff.c In function 'skb_panic':
> net/core/skbuff.c +126 : error: called object 'panic' is not a function
>
> This is fixed by renaming the argument to msg.
>
> Signed-off-by: James Hogan <james.hogan@imgtec.com>
Thanks, James.
I'm sorry I introduced this bug. Shame on me.
--
Jean Sacren
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2013-02-13 19:43 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-02-13 11:20 [PATCH -next 1/1] net: skbuff: fix compile error in skb_panic() James Hogan
2013-02-13 12:41 ` Sedat Dilek
2013-02-13 16:52 ` David Miller
2013-02-13 19:43 ` Jean Sacren
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).