All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] econet: remove compiler warnings
@ 2011-01-26 10:04 Eric Dumazet
  2011-01-26 13:19 ` Phil Blundell
  0 siblings, 1 reply; 3+ messages in thread
From: Eric Dumazet @ 2011-01-26 10:04 UTC (permalink / raw)
  To: David Miller; +Cc: netdev

net/econet/af_econet.c: In function ‘econet_sendmsg’:
net/econet/af_econet.c:494: warning: label ‘error’ defined but not used
net/econet/af_econet.c:268: warning: unused variable ‘sk’

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
---
 net/econet/af_econet.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/net/econet/af_econet.c b/net/econet/af_econet.c
index 15dcc1a..0c28263 100644
--- a/net/econet/af_econet.c
+++ b/net/econet/af_econet.c
@@ -265,13 +265,13 @@ static void ec_tx_done(struct sk_buff *skb, int result)
 static int econet_sendmsg(struct kiocb *iocb, struct socket *sock,
 			  struct msghdr *msg, size_t len)
 {
-	struct sock *sk = sock->sk;
 	struct sockaddr_ec *saddr=(struct sockaddr_ec *)msg->msg_name;
 	struct net_device *dev;
 	struct ec_addr addr;
 	int err;
 	unsigned char port, cb;
 #if defined(CONFIG_ECONET_AUNUDP) || defined(CONFIG_ECONET_NATIVE)
+	struct sock *sk = sock->sk;
 	struct sk_buff *skb;
 	struct ec_cb *eb;
 #endif
@@ -488,10 +488,10 @@ static int econet_sendmsg(struct kiocb *iocb, struct socket *sock,
 
 error_free_buf:
 	vfree(userbuf);
+error:
 #else
 	err = -EPROTOTYPE;
 #endif
-	error:
 	mutex_unlock(&econet_mutex);
 
 	return err;



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] econet: remove compiler warnings
  2011-01-26 10:04 [PATCH] econet: remove compiler warnings Eric Dumazet
@ 2011-01-26 13:19 ` Phil Blundell
  2011-01-27 22:24   ` David Miller
  0 siblings, 1 reply; 3+ messages in thread
From: Phil Blundell @ 2011-01-26 13:19 UTC (permalink / raw)
  To: Eric Dumazet; +Cc: David Miller, netdev

On Wed, Jan 26, 2011 at 11:04:18AM +0100, Eric Dumazet wrote:
> net/econet/af_econet.c: In function ‘econet_sendmsg’:
> net/econet/af_econet.c:494: warning: label ‘error’ defined but not used
> net/econet/af_econet.c:268: warning: unused variable ‘sk’
> 
> Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>

Thanks, looks sensible.

Acked-by: Phil Blundell <philb@gnu.org>

p.


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] econet: remove compiler warnings
  2011-01-26 13:19 ` Phil Blundell
@ 2011-01-27 22:24   ` David Miller
  0 siblings, 0 replies; 3+ messages in thread
From: David Miller @ 2011-01-27 22:24 UTC (permalink / raw)
  To: philb; +Cc: eric.dumazet, netdev

From: Phil Blundell <philb@gnu.org>
Date: Wed, 26 Jan 2011 14:19:59 +0100

> On Wed, Jan 26, 2011 at 11:04:18AM +0100, Eric Dumazet wrote:
>> net/econet/af_econet.c: In function ‘econet_sendmsg’:
>> net/econet/af_econet.c:494: warning: label ‘error’ defined but not used
>> net/econet/af_econet.c:268: warning: unused variable ‘sk’
>> 
>> Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
> 
> Thanks, looks sensible.
> 
> Acked-by: Phil Blundell <philb@gnu.org>

Applied, thanks everyone.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-01-27 22:23 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-01-26 10:04 [PATCH] econet: remove compiler warnings Eric Dumazet
2011-01-26 13:19 ` Phil Blundell
2011-01-27 22:24   ` 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.