Skip to contentSkip to conversation

selftests/ipc: remove unneeded semicolon

PATCH In review Yang Li 2 participants 2 messages Feb 8, 2021 Kselftest

lore
Share & tools
lore

Yang Li

author
#0 lore raw

PATCH 1/1 selftests/ipc: remove unneeded semicolon

Eliminate the following coccicheck warning:
./tools/testing/selftests/ipc/msgque.c:72:3-4: Unneeded semicolon ./tools/testing/selftests/ipc/msgque.c:183:2-3: Unneeded semicolon ./tools/testing/selftests/ipc/msgque.c:191:2-3: Unneeded semicolon

---
 tools/testing/selftests/ipc/msgque.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
tools/testing/selftests/ipc/msgque.c +3 -3
index 5ec4d9e..656c43c 100644
@@ -69,7 +69,7 @@ int restore_queue(struct msgque_data *msgque)
 			printf("msgsnd failed (%m)\n");
 			ret = -errno;
 			goto destroy;
-		};
+		}
 	}
 	return 0;
 
@@ -180,7 +180,7 @@ int fill_msgque(struct msgque_data *msgque)
 				IPC_NOWAIT) != 0) {
 		printf("First message send failed (%m)\n");
 		return -errno;
-	};
+	}
 
 	msgbuf.mtype = ANOTHER_MSG_TYPE;
 	memcpy(msgbuf.mtext, ANOTHER_TEST_STRING, sizeof(ANOTHER_TEST_STRING));
@@ -188,7 +188,7 @@ int fill_msgque(struct msgque_data *msgque)
 				IPC_NOWAIT) != 0) {
 		printf("Second message send failed (%m)\n");
 		return -errno;
-	};
+	}
 	return 0;
 }
 
Signature · 1 line
1.8.3.1
maintainer
#1 lore raw
Quoted 34 lines · Yang Li

Eliminate the following coccicheck warning:
./tools/testing/selftests/ipc/msgque.c:72:3-4: Unneeded semicolon ./tools/testing/selftests/ipc/msgque.c:183:2-3: Unneeded semicolon ./tools/testing/selftests/ipc/msgque.c:191:2-3: Unneeded semicolon

---
  tools/testing/selftests/ipc/msgque.c | 6 +++---
  1 file changed, 3 insertions(+), 3 deletions(-)
tools/testing/selftests/ipc/msgque.c +2 -2
index 5ec4d9e..656c43c 100644
@@ -69,7 +69,7 @@ int restore_queue(struct msgque_data *msgque)
  			printf("msgsnd failed (%m)\n");
  			ret = -errno;
  			goto destroy;
-		};
+		}
  	}
  	return 0;
 
@@ -180,7 +180,7 @@ int fill_msgque(struct msgque_data *msgque)
  				IPC_NOWAIT) != 0) {
  		printf("First message send failed (%m)\n");
  		return -errno;
-	};
+	}
 
  	msgbuf.mtype = ANOTHER_MSG_TYPE;
  	memcpy(msgbuf.mtext, ANOTHER_TEST_STRING, sizeof(ANOTHER_TEST_STRING));

tools/testing/selftests/ipc/msgque.c int fill_msgque(struct msgque_data *msgque) · line 194

Quoted 8 lines
tools/testing/selftests/ipc/msgque.c +1 -1
@@ -188,7 +188,7 @@ int fill_msgque(struct msgque_data *msgque)
  				IPC_NOWAIT) != 0) {
  		printf("Second message send failed (%m)\n");
  		return -errno;
-	};
+	}
  	return 0;
  }
 

Thank you. Now applied to linux-kselftest next for 5.12-rc1

thanks,
-- Shuah