Patchwork Fix ERROR:do not initialise statics to 0 in af_vsock.c

login
register
mail settings
Submitter Tao Wu
Date Jan. 9, 2019, 11:45 p.m.
Message ID <20190109234541.22715-1-ytht.net@gmail.com>
Download mbox | patch
Permalink /patch/696223/
State New
Headers show

Comments

Tao Wu - Jan. 9, 2019, 11:45 p.m.
Found by scripts/checkpatch.pl
---
 net/vmw_vsock/af_vsock.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Stefan Hajnoczi - Jan. 10, 2019, 9:59 a.m.
On Wed, Jan 09, 2019 at 03:45:41PM -0800, Lepton Wu wrote:
> Found by scripts/checkpatch.pl
> ---

Please include your Signed-off-by.

>  net/vmw_vsock/af_vsock.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/net/vmw_vsock/af_vsock.c b/net/vmw_vsock/af_vsock.c
> index 43a1dec08825..a60df252d3cc 100644
> --- a/net/vmw_vsock/af_vsock.c
> +++ b/net/vmw_vsock/af_vsock.c
> @@ -505,7 +505,7 @@ static void vsock_pending_work(struct work_struct *work)
>  static int __vsock_bind_stream(struct vsock_sock *vsk,
>  			       struct sockaddr_vm *addr)
>  {
> -	static u32 port = 0;
> +	static u32 port;

Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
David Miller - Jan. 16, 2019, 4:39 a.m.
From: Lepton Wu <ytht.net@gmail.com>
Date: Wed,  9 Jan 2019 15:45:41 -0800

> Found by scripts/checkpatch.pl

I applied this and pushed out but didn't catch in time that you didn't provide
a properly Signed-off-by:  Please do that next time.

Patch

diff --git a/net/vmw_vsock/af_vsock.c b/net/vmw_vsock/af_vsock.c
index 43a1dec08825..a60df252d3cc 100644
--- a/net/vmw_vsock/af_vsock.c
+++ b/net/vmw_vsock/af_vsock.c
@@ -505,7 +505,7 @@  static void vsock_pending_work(struct work_struct *work)
 static int __vsock_bind_stream(struct vsock_sock *vsk,
 			       struct sockaddr_vm *addr)
 {
-	static u32 port = 0;
+	static u32 port;
 	struct sockaddr_vm new_addr;
 
 	if (!port)