Patchwork [net-next,1/2] net: sctp: minor: make jsctp_sf_eat_sack static

login
register
mail settings
Submitter Daniel Borkmann
Date Feb. 13, 2013, 11:03 a.m.
Message ID <7eef4b701794c1bb78819bc6e6c45bf99b49801d.1360752304.git.dborkman@redhat.com>
Download mbox | patch
Permalink /patch/220120/
State Accepted
Delegated to: David Miller
Headers show

Comments

Daniel Borkmann - Feb. 13, 2013, 11:03 a.m.
The function jsctp_sf_eat_sack can be made static, no need to extend
its visibility.

Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
---
 net/sctp/probe.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
David Miller - Feb. 13, 2013, 7:04 p.m.
From: Daniel Borkmann <dborkman@redhat.com>
Date: Wed, 13 Feb 2013 12:03:49 +0100

> The function jsctp_sf_eat_sack can be made static, no need to extend
> its visibility.
> 
> Signed-off-by: Daniel Borkmann <dborkman@redhat.com>

It's exported for the jprobe lookup by ->symbol_name

Did you test this?
--
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
David Miller - Feb. 13, 2013, 7:06 p.m.
From: David Miller <davem@davemloft.net>
Date: Wed, 13 Feb 2013 14:04:36 -0500 (EST)

> From: Daniel Borkmann <dborkman@redhat.com>
> Date: Wed, 13 Feb 2013 12:03:49 +0100
> 
>> The function jsctp_sf_eat_sack can be made static, no need to extend
>> its visibility.
>> 
>> Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
> 
> It's exported for the jprobe lookup by ->symbol_name
> 
> Did you test this?

Never mind, I mis-read this, the symbol name is for the routine being
shadowed by the jprobe, which is exported.

These two patches look fine and I'll apply them, thanks Daniel.
--
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
Daniel Borkmann - Feb. 13, 2013, 7:14 p.m.
On 02/13/2013 08:06 PM, David Miller wrote:
> From: David Miller <davem@davemloft.net>
> Date: Wed, 13 Feb 2013 14:04:36 -0500 (EST)
>
>> From: Daniel Borkmann <dborkman@redhat.com>
>> Date: Wed, 13 Feb 2013 12:03:49 +0100
>>
>>> The function jsctp_sf_eat_sack can be made static, no need to extend
>>> its visibility.
>>>
>>> Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
>>
>> It's exported for the jprobe lookup by ->symbol_name
>>
>> Did you test this?
>
> Never mind, I mis-read this, the symbol name is for the routine being
> shadowed by the jprobe, which is exported.
>
> These two patches look fine and I'll apply them, thanks Daniel.

Thanks Dave, yes, I did a test doing cat on /proc/net/sctpprobe
while running a simple SCTP client / server.
--
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
Neil Horman - Feb. 13, 2013, 9:02 p.m.
On Wed, Feb 13, 2013 at 12:03:49PM +0100, Daniel Borkmann wrote:
> The function jsctp_sf_eat_sack can be made static, no need to extend
> its visibility.
> 
> Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
> ---
>  net/sctp/probe.c | 12 ++++++------
>  1 file changed, 6 insertions(+), 6 deletions(-)
> 
> diff --git a/net/sctp/probe.c b/net/sctp/probe.c
> index 5f7518d..4eaaaf6 100644
> --- a/net/sctp/probe.c
> +++ b/net/sctp/probe.c
> @@ -122,12 +122,12 @@ static const struct file_operations sctpprobe_fops = {
>  	.llseek = noop_llseek,
>  };
>  
> -sctp_disposition_t jsctp_sf_eat_sack(struct net *net,
> -				     const struct sctp_endpoint *ep,
> -				     const struct sctp_association *asoc,
> -				     const sctp_subtype_t type,
> -				     void *arg,
> -				     sctp_cmd_seq_t *commands)
> +static sctp_disposition_t jsctp_sf_eat_sack(struct net *net,
> +					    const struct sctp_endpoint *ep,
> +					    const struct sctp_association *asoc,
> +					    const sctp_subtype_t type,
> +					    void *arg,
> +					    sctp_cmd_seq_t *commands)
>  {
>  	struct sctp_transport *sp;
>  	static __u32 lcwnd = 0;
> -- 
> 1.7.11.7
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-sctp" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 
Acked-by: Neil Horman <nhorman@tuxdriver.com>

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

Patch

diff --git a/net/sctp/probe.c b/net/sctp/probe.c
index 5f7518d..4eaaaf6 100644
--- a/net/sctp/probe.c
+++ b/net/sctp/probe.c
@@ -122,12 +122,12 @@  static const struct file_operations sctpprobe_fops = {
 	.llseek = noop_llseek,
 };
 
-sctp_disposition_t jsctp_sf_eat_sack(struct net *net,
-				     const struct sctp_endpoint *ep,
-				     const struct sctp_association *asoc,
-				     const sctp_subtype_t type,
-				     void *arg,
-				     sctp_cmd_seq_t *commands)
+static sctp_disposition_t jsctp_sf_eat_sack(struct net *net,
+					    const struct sctp_endpoint *ep,
+					    const struct sctp_association *asoc,
+					    const sctp_subtype_t type,
+					    void *arg,
+					    sctp_cmd_seq_t *commands)
 {
 	struct sctp_transport *sp;
 	static __u32 lcwnd = 0;