* [PATCH] init: Define rotate conditionally on ! CONFIG_390
@ 2023-04-28 21:44 Tom Rix
0 siblings, 0 replies; only message in thread
From: Tom Rix @ 2023-04-28 21:44 UTC (permalink / raw)
Cc: linux-kernel, Tom Rix
For s390, gcc with W=1 reports
init/do_mounts_rd.c:192:24: error: variable
'rotate' set but not used [-Werror=unused-but-set-variable]
192 | unsigned short rotate = 0;
| ^~~~~~
rotate is not used for s390 so should be conditionally defined.
Signed-off-by: Tom Rix <trix@redhat.com>
---
init/do_mounts_rd.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/init/do_mounts_rd.c b/init/do_mounts_rd.c
index ac021ae6e6fa..cbc4c496cb5f 100644
--- a/init/do_mounts_rd.c
+++ b/init/do_mounts_rd.c
@@ -189,9 +189,9 @@ int __init rd_load_image(char *from)
unsigned long rd_blocks, devblocks;
int nblocks, i;
char *buf = NULL;
- unsigned short rotate = 0;
decompress_fn decompressor = NULL;
#if !defined(CONFIG_S390)
+ unsigned short rotate = 0;
char rotator[4] = { '|' , '/' , '-' , '\\' };
#endif
@@ -249,7 +249,9 @@ int __init rd_load_image(char *from)
for (i = 0; i < nblocks; i++) {
if (i && (i % devblocks == 0)) {
pr_cont("done disk #1.\n");
+#if !defined(CONFIG_S390)
rotate = 0;
+#endif
fput(in_file);
break;
}
--
2.27.0
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2023-04-28 21:45 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-04-28 21:44 [PATCH] init: Define rotate conditionally on ! CONFIG_390 Tom Rix
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).