Skip to contentSkip to conversation

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

PATCH Superseded Lepton Wu 3 participants 4 messages Jan 9, 2019 – Jan 16, 2019

Subsystems (3)
lore
Share & tools
lore

Lepton Wu

author
#0 lore raw

PATCH 1/1 Fix ERROR:do not initialise statics to 0 in af_vsock.c

Found by scripts/checkpatch.pl

---
 net/vmw_vsock/af_vsock.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
net/vmw_vsock/af_vsock.c +1 -1
index 43a1dec08825..a60df252d3cc 100644
@@ -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)
Signature · 1 line
2.20.1.97.g81188d93c3-goog
Reviewed-by on v1 1/1
#1 lore raw
Quoted 2 lines · Lepton Wu

Found by scripts/checkpatch.pl
---

Please include your Signed-off-by.

net/vmw_vsock/af_vsock.c static void vsock_pending_work(struct work_struct *work) · line 508

Quoted 13 lines
 net/vmw_vsock/af_vsock.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
net/vmw_vsock/af_vsock.c +1 -1
index 43a1dec08825..a60df252d3cc 100644
@@ -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;
author
#2 lore raw

PATCH v2 1/1 Fix ERROR:do not initialise statics to 0 in af_vsock.c

Found by scripts/checkpatch.pl

---
 net/vmw_vsock/af_vsock.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
net/vmw_vsock/af_vsock.c +1 -1
index 43a1dec08825..a60df252d3cc 100644
@@ -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)
Signature · 1 line
2.20.1.97.g81188d93c3-goog
maintainer
#3 lore raw
In reply to Lepton Wu

From: Lepton Wu <[email protected]>
Date: Wed, 9 Jan 2019 15:45:41 -0800

Quoted 1 line

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.