projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
45dacf0
)
m68k: amiga: pcmcia: Replace set but not used variable by READ_ONCE()
author
Geert Uytterhoeven
<geert@linux-m68k.org>
Wed, 13 Sep 2023 14:08:06 +0000
(16:08 +0200)
committer
Geert Uytterhoeven
<geert@linux-m68k.org>
Fri, 6 Oct 2023 08:03:02 +0000
(10:03 +0200)
When building with W=1:
arch/m68k/amiga/pcmcia.c: In function ‘pcmcia_reset’:
arch/m68k/amiga/pcmcia.c:29:23: warning: variable ‘b’ set but not used [-Wunused-but-set-variable]
29 | unsigned char b;
| ^
Fix this by using READ_ONCE(), and removing the variable.
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Link:
https://lore.kernel.org/r/1436fa6b329c2212aaf020055afbb97e64b6f039.1694613528.git.geert@linux-m68k.org
arch/m68k/amiga/pcmcia.c
patch
|
blob
|
history
diff --git
a/arch/m68k/amiga/pcmcia.c
b/arch/m68k/amiga/pcmcia.c
index 7106f0c3639bc105ca18fc2cfb777717be7727e5..63cce6b590df4dcba46248a7e1c700af19c6bc05 100644
(file)
--- a/
arch/m68k/amiga/pcmcia.c
+++ b/
arch/m68k/amiga/pcmcia.c
@@
-26,11
+26,10
@@
static unsigned char cfg_byte = GAYLE_CFG_0V|GAYLE_CFG_150NS;
void pcmcia_reset(void)
{
unsigned long reset_start_time = jiffies;
- unsigned char b;
gayle_reset = 0x00;
while (time_before(jiffies, reset_start_time + 1*HZ/100));
-
b = gayle_reset
;
+
READ_ONCE(gayle_reset)
;
}
EXPORT_SYMBOL(pcmcia_reset);