Commit 99d5851e authored by James Hogan's avatar James Hogan Committed by David S. Miller

net: skbuff: fix compile error in skb_panic()

I get the following build error on next-20130213 due to the following
commit:

commit f05de73b ("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: default avatarJames Hogan <james.hogan@imgtec.com>
Cc: Jean Sacren <sakiwit@gmail.com>
Cc: Jiri Pirko <jiri@resnulli.us>
Cc: David S. Miller <davem@davemloft.net>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent c6d14ff1
...@@ -109,7 +109,7 @@ static const struct pipe_buf_operations sock_pipe_buf_ops = { ...@@ -109,7 +109,7 @@ static const struct pipe_buf_operations sock_pipe_buf_ops = {
* @skb: buffer * @skb: buffer
* @sz: size * @sz: size
* @addr: address * @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(). * Out-of-line support for skb_put() and skb_push().
* Called via the wrapper skb_over_panic() or skb_under_panic(). * 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 = { ...@@ -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. * __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, 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", 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, (unsigned long)skb->tail, (unsigned long)skb->end,
skb->dev ? skb->dev->name : "<NULL>"); skb->dev ? skb->dev->name : "<NULL>");
BUG(); BUG();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment