linux-kselftest.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] selftests: firmware: removing errors and warnings from checkpatch.pl
@ 2025-08-16  6:55 Ranganath V N
  0 siblings, 0 replies; only message in thread
From: Ranganath V N @ 2025-08-16  6:55 UTC (permalink / raw)
  To: shuah
  Cc: linux-kernel-mentees, skhan, linux-kselftest, linux-kernel,
	Ranganath V N

Removing the scripts/checkpatch.pl errors and warnings from the file.

Signed-off-by: Ranganath V N <vnranganath.20@gmail.com>
---
 tools/testing/selftests/firmware/fw_namespace.c | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/tools/testing/selftests/firmware/fw_namespace.c b/tools/testing/selftests/firmware/fw_namespace.c
index 04757dc7e546..5fcc3fed0036 100644
--- a/tools/testing/selftests/firmware/fw_namespace.c
+++ b/tools/testing/selftests/firmware/fw_namespace.c
@@ -1,7 +1,8 @@
 // SPDX-License-Identifier: GPL-2.0
 /* Test triggering of loading of firmware from different mount
  * namespaces. Expect firmware to be always loaded from the mount
- * namespace of PID 1. */
+ * namespace of PID 1
+ */
 #define _GNU_SOURCE
 #include <errno.h>
 #include <fcntl.h>
@@ -17,7 +18,7 @@
 #include <sys/wait.h>
 #include <unistd.h>
 
-static char *fw_path = NULL;
+static char *fw_path;
 
 static void die(char *fmt, ...)
 {
@@ -86,9 +87,8 @@ static bool test_fw_in_ns(const char *fw_name, const char *sys_path, bool block_
 			die("waited for %d got %d\n",
 				child, pid);
 		}
-		if (!WIFEXITED(status)) {
+		if (!WIFEXITED(status))
 			die("child did not terminate cleanly\n");
-		}
 		if (block_fw_in_parent_ns)
 			umount("/lib/firmware");
 		return WEXITSTATUS(status) == EXIT_SUCCESS;
@@ -116,11 +116,13 @@ int main(int argc, char **argv)
 {
 	const char *fw_name = "test-firmware.bin";
 	char *sys_path;
+
 	if (argc != 2)
 		die("usage: %s sys_path\n", argv[0]);
 
 	/* Mount tmpfs to /lib/firmware so we don't have to assume
-	   that it is writable for us.*/
+	 * that it is writable for us.
+	 */
 	if (mount("test", "/lib/firmware", "tmpfs", 0, NULL) == -1)
 		die("mounting tmpfs to /lib/firmware failed\n");
 
-- 
2.43.0


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2025-08-16  6:55 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-16  6:55 [PATCH] selftests: firmware: removing errors and warnings from checkpatch.pl Ranganath V N

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).