netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH -next] tipc: fix sparse non static symbol warnings
@ 2014-07-20  5:14 weiyj_lk
  2014-07-21  2:36 ` Ying Xue
  2014-07-21  5:19 ` David Miller
  0 siblings, 2 replies; 3+ messages in thread
From: weiyj_lk @ 2014-07-20  5:14 UTC (permalink / raw)
  To: Jon Maloy, Allan Stephens, David S. Miller
  Cc: Wei Yongjun, netdev, tipc-discussion

From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>

Fixes the following sparse warnings:

net/tipc/socket.c:545:5: warning:
 symbol 'tipc_sk_proto_rcv' was not declared. Should it be static?
net/tipc/socket.c:2015:5: warning:
 symbol 'tipc_ioctl' was not declared. Should it be static?

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
---
 net/tipc/socket.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/net/tipc/socket.c b/net/tipc/socket.c
index de01622..42c3599 100644
--- a/net/tipc/socket.c
+++ b/net/tipc/socket.c
@@ -542,7 +542,8 @@ static unsigned int tipc_poll(struct file *file, struct socket *sock,
  * Returns 0 (TIPC_OK) if message was consumed, 1 (TIPC_FWD_MSG) if
  * (CONN_PROBE_REPLY) message should be forwarded.
  */
-int tipc_sk_proto_rcv(struct tipc_sock *tsk, u32 *dnode, struct sk_buff *buf)
+static int tipc_sk_proto_rcv(struct tipc_sock *tsk, u32 *dnode,
+			     struct sk_buff *buf)
 {
 	struct tipc_msg *msg = buf_msg(buf);
 	struct tipc_port *port = &tsk->port;
@@ -2012,7 +2013,7 @@ static int tipc_getsockopt(struct socket *sock, int lvl, int opt,
 	return put_user(sizeof(value), ol);
 }
 
-int tipc_ioctl(struct socket *sk, unsigned int cmd, unsigned long arg)
+static int tipc_ioctl(struct socket *sk, unsigned int cmd, unsigned long arg)
 {
 	struct tipc_sioc_ln_req lnr;
 	void __user *argp = (void __user *)arg;

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

* Re: [PATCH -next] tipc: fix sparse non static symbol warnings
  2014-07-20  5:14 [PATCH -next] tipc: fix sparse non static symbol warnings weiyj_lk
@ 2014-07-21  2:36 ` Ying Xue
  2014-07-21  5:19 ` David Miller
  1 sibling, 0 replies; 3+ messages in thread
From: Ying Xue @ 2014-07-21  2:36 UTC (permalink / raw)
  To: weiyj_lk, Jon Maloy, Allan Stephens, David S. Miller
  Cc: Wei Yongjun, netdev, tipc-discussion

On 07/20/2014 01:14 PM, weiyj_lk@163.com wrote:
> From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
> 
> Fixes the following sparse warnings:
> 
> net/tipc/socket.c:545:5: warning:
>  symbol 'tipc_sk_proto_rcv' was not declared. Should it be static?
> net/tipc/socket.c:2015:5: warning:
>  symbol 'tipc_ioctl' was not declared. Should it be static?
> 

Acked-by: Ying Xue <ying.xue@windriver.com>

> Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
> ---
>  net/tipc/socket.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/net/tipc/socket.c b/net/tipc/socket.c
> index de01622..42c3599 100644
> --- a/net/tipc/socket.c
> +++ b/net/tipc/socket.c
> @@ -542,7 +542,8 @@ static unsigned int tipc_poll(struct file *file, struct socket *sock,
>   * Returns 0 (TIPC_OK) if message was consumed, 1 (TIPC_FWD_MSG) if
>   * (CONN_PROBE_REPLY) message should be forwarded.
>   */
> -int tipc_sk_proto_rcv(struct tipc_sock *tsk, u32 *dnode, struct sk_buff *buf)
> +static int tipc_sk_proto_rcv(struct tipc_sock *tsk, u32 *dnode,
> +			     struct sk_buff *buf)
>  {
>  	struct tipc_msg *msg = buf_msg(buf);
>  	struct tipc_port *port = &tsk->port;
> @@ -2012,7 +2013,7 @@ static int tipc_getsockopt(struct socket *sock, int lvl, int opt,
>  	return put_user(sizeof(value), ol);
>  }
>  
> -int tipc_ioctl(struct socket *sk, unsigned int cmd, unsigned long arg)
> +static int tipc_ioctl(struct socket *sk, unsigned int cmd, unsigned long arg)
>  {
>  	struct tipc_sioc_ln_req lnr;
>  	void __user *argp = (void __user *)arg;
> 
> --
> To unsubscribe from this list: send the line "unsubscribe netdev" 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] 3+ messages in thread

* Re: [PATCH -next] tipc: fix sparse non static symbol warnings
  2014-07-20  5:14 [PATCH -next] tipc: fix sparse non static symbol warnings weiyj_lk
  2014-07-21  2:36 ` Ying Xue
@ 2014-07-21  5:19 ` David Miller
  1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2014-07-21  5:19 UTC (permalink / raw)
  To: weiyj_lk; +Cc: jon.maloy, allan.stephens, yongjun_wei, netdev, tipc-discussion

From: weiyj_lk@163.com
Date: Sun, 20 Jul 2014 13:14:28 +0800

> From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
> 
> Fixes the following sparse warnings:
> 
> net/tipc/socket.c:545:5: warning:
>  symbol 'tipc_sk_proto_rcv' was not declared. Should it be static?
> net/tipc/socket.c:2015:5: warning:
>  symbol 'tipc_ioctl' was not declared. Should it be static?
> 
> Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>

Applied, thank you.

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

end of thread, other threads:[~2014-07-21  5:19 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-07-20  5:14 [PATCH -next] tipc: fix sparse non static symbol warnings weiyj_lk
2014-07-21  2:36 ` Ying Xue
2014-07-21  5:19 ` David Miller

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).