linux-m68k.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] zorro: fix checkpatch error by avoiding assignment in if-statement.
@ 2025-07-28  9:34 Dishank Jogi
  2025-07-28 20:42 ` Christophe JAILLET
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Dishank Jogi @ 2025-07-28  9:34 UTC (permalink / raw)
  To: geert; +Cc: linux-m68k, linux-kernel, darshanrathod475, Dishank Jogi

These changes improve code readability and bring the file
in line with the Linux kernel coding style.

No functional changes.

Signed-off-by: Dishank Jogi <jogidishank503@gmail.com>
---
 drivers/zorro/gen-devlist.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/zorro/gen-devlist.c b/drivers/zorro/gen-devlist.c
index e325c5ce995b..ff4515e02409 100644
--- a/drivers/zorro/gen-devlist.c
+++ b/drivers/zorro/gen-devlist.c
@@ -44,7 +44,8 @@ main(void)
 
 	while (fgets(line, sizeof(line)-1, stdin)) {
 		lino++;
-		if ((c = strchr(line, '\n')))
+		c = strchr(line, '\n')
+		if (c)
 			*c = 0;
 		if (!line[0] || line[0] == '#')
 			continue;
@@ -68,7 +69,8 @@ main(void)
 					fprintf(devf, "\tPRODUCT(%s,%s,\"", manuf, line+1);
 					pq(devf, c);
 					fputs("\")\n", devf);
-				} else goto err;
+				} else
+					goto err;
 				break;
 			default:
 				goto err;
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2025-07-29 15:49 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-28  9:34 [PATCH] zorro: fix checkpatch error by avoiding assignment in if-statement Dishank Jogi
2025-07-28 20:42 ` Christophe JAILLET
2025-07-29  7:08 ` Geert Uytterhoeven
2025-07-29 12:10   ` Jogi Dishank
2025-07-29 15:49     ` Geert Uytterhoeven
2025-07-29 15:31 ` kernel test robot

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