Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1535846 > unrolled thread

[net-next][PATCH 02/18] RDS: mark few internal functions static to make sparse build happy

Started bySantosh Shilimkar <santosh.shilimkar@oracle.com>
First post2016-12-05 08:10 +0100
Last post2016-12-06 02:20 +0100
Articles 3 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [net-next][PATCH 02/18] RDS: mark few internal functions static to make sparse build happy Santosh Shilimkar <santosh.shilimkar@oracle.com> - 2016-12-05 08:10 +0100
    Re: [net-next][PATCH 02/18] RDS: mark few internal functions static  to make sparse build happy Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> - 2016-12-05 10:50 +0100
      Re: [net-next][PATCH 02/18] RDS: mark few internal functions static  to make sparse build happy Santosh Shilimkar <santosh.shilimkar@oracle.com> - 2016-12-06 02:20 +0100

#1535846 — [net-next][PATCH 02/18] RDS: mark few internal functions static to make sparse build happy

FromSantosh Shilimkar <santosh.shilimkar@oracle.com>
Date2016-12-05 08:10 +0100
Subject[net-next][PATCH 02/18] RDS: mark few internal functions static to make sparse build happy
Message-ID<sKVzr-1nl-7@gated-at.bofh.it>
Fixes below warnings:
warning: symbol 'rds_send_probe' was not declared. Should it be static?
warning: symbol 'rds_send_ping' was not declared. Should it be static?
warning: symbol 'rds_tcp_accept_one_path' was not declared. Should it be static?
warning: symbol 'rds_walk_conn_path_info' was not declared. Should it be static?

Signed-off-by: Santosh Shilimkar <santosh.shilimkar@oracle.com>
---
 net/rds/connection.c | 2 +-
 net/rds/send.c       | 4 ++--
 net/rds/tcp_listen.c | 1 +
 3 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/net/rds/connection.c b/net/rds/connection.c
index fe9d31c..26533b2 100644
--- a/net/rds/connection.c
+++ b/net/rds/connection.c
@@ -545,7 +545,7 @@ void rds_for_each_conn_info(struct socket *sock, unsigned int len,
 }
 EXPORT_SYMBOL_GPL(rds_for_each_conn_info);
 
-void rds_walk_conn_path_info(struct socket *sock, unsigned int len,
+static void rds_walk_conn_path_info(struct socket *sock, unsigned int len,
 			     struct rds_info_iterator *iter,
 			     struct rds_info_lengths *lens,
 			     int (*visitor)(struct rds_conn_path *, void *),
diff --git a/net/rds/send.c b/net/rds/send.c
index 77c8c6e..bb13c56 100644
--- a/net/rds/send.c
+++ b/net/rds/send.c
@@ -1169,7 +1169,7 @@ int rds_sendmsg(struct socket *sock, struct msghdr *msg, size_t payload_len)
  * or
  *   RDS_FLAG_HB_PONG|RDS_FLAG_ACK_REQUIRED
  */
-int
+static int
 rds_send_probe(struct rds_conn_path *cp, __be16 sport,
 	       __be16 dport, u8 h_flags)
 {
@@ -1238,7 +1238,7 @@ int rds_sendmsg(struct socket *sock, struct msghdr *msg, size_t payload_len)
 	return rds_send_probe(cp, 0, dport, 0);
 }
 
-void
+static void
 rds_send_ping(struct rds_connection *conn)
 {
 	unsigned long flags;
diff --git a/net/rds/tcp_listen.c b/net/rds/tcp_listen.c
index f74bab3..67d0929 100644
--- a/net/rds/tcp_listen.c
+++ b/net/rds/tcp_listen.c
@@ -79,6 +79,7 @@ int rds_tcp_keepalive(struct socket *sock)
  * smaller ip address, we recycle conns in RDS_CONN_ERROR on the passive side
  * by moving them to CONNECTING in this function.
  */
+static
 struct rds_tcp_connection *rds_tcp_accept_one_path(struct rds_connection *conn)
 {
 	int i;
-- 
1.9.1

[toc] | [next] | [standalone]


#1535945 — Re: [net-next][PATCH 02/18] RDS: mark few internal functions static to make sparse build happy

FromSergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Date2016-12-05 10:50 +0100
SubjectRe: [net-next][PATCH 02/18] RDS: mark few internal functions static to make sparse build happy
Message-ID<sKY4h-2Pg-17@gated-at.bofh.it>
In reply to#1535846
Hello!

On 12/5/2016 9:57 AM, Santosh Shilimkar wrote:

> Fixes below warnings:
> warning: symbol 'rds_send_probe' was not declared. Should it be static?
> warning: symbol 'rds_send_ping' was not declared. Should it be static?
> warning: symbol 'rds_tcp_accept_one_path' was not declared. Should it be static?
> warning: symbol 'rds_walk_conn_path_info' was not declared. Should it be static?
>
> Signed-off-by: Santosh Shilimkar <santosh.shilimkar@oracle.com>
> ---
>  net/rds/connection.c | 2 +-
>  net/rds/send.c       | 4 ++--
>  net/rds/tcp_listen.c | 1 +
>  3 files changed, 4 insertions(+), 3 deletions(-)
>
> diff --git a/net/rds/connection.c b/net/rds/connection.c
> index fe9d31c..26533b2 100644
> --- a/net/rds/connection.c
> +++ b/net/rds/connection.c
> @@ -545,7 +545,7 @@ void rds_for_each_conn_info(struct socket *sock, unsigned int len,
>  }
>  EXPORT_SYMBOL_GPL(rds_for_each_conn_info);
>
> -void rds_walk_conn_path_info(struct socket *sock, unsigned int len,
> +static void rds_walk_conn_path_info(struct socket *sock, unsigned int len,
>  			     struct rds_info_iterator *iter,
>  			     struct rds_info_lengths *lens,
>  			     int (*visitor)(struct rds_conn_path *, void *),

    You now need to realign the continuation lines.

> diff --git a/net/rds/send.c b/net/rds/send.c
> index 77c8c6e..bb13c56 100644
> --- a/net/rds/send.c
> +++ b/net/rds/send.c
[...]

MBR, Sergei

[toc] | [prev] | [next] | [standalone]


#1536584 — Re: [net-next][PATCH 02/18] RDS: mark few internal functions static to make sparse build happy

FromSantosh Shilimkar <santosh.shilimkar@oracle.com>
Date2016-12-06 02:20 +0100
SubjectRe: [net-next][PATCH 02/18] RDS: mark few internal functions static to make sparse build happy
Message-ID<sLcAh-3FT-5@gated-at.bofh.it>
In reply to#1535945
On 12/5/2016 1:45 AM, Sergei Shtylyov wrote:
> Hello!
>
> On 12/5/2016 9:57 AM, Santosh Shilimkar wrote:
>
[...]

>> -void rds_walk_conn_path_info(struct socket *sock, unsigned int len,
>> +static void rds_walk_conn_path_info(struct socket *sock, unsigned int
>> len,
>>                   struct rds_info_iterator *iter,
>>                   struct rds_info_lengths *lens,
>>                   int (*visitor)(struct rds_conn_path *, void *),
>
>    You now need to realign the continuation lines.
>
Right. Will fix that. Thanks !!

Regards,
Santosh

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web