From ac0b5591321330d65001f15f8672ac12b612d7a9 Mon Sep 17 00:00:00 2001 From: Geert Uytterhoeven Date: Wed, 13 Sep 2023 16:08:06 +0200 Subject: m68k: amiga: pcmcia: Replace set but not used variable by READ_ONCE() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Acked-by: Arnd Bergmann Link: https://lore.kernel.org/r/1436fa6b329c2212aaf020055afbb97e64b6f039.1694613528.git.geert@linux-m68k.org --- arch/m68k/amiga/pcmcia.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'arch/m68k/amiga') diff --git a/arch/m68k/amiga/pcmcia.c b/arch/m68k/amiga/pcmcia.c index 7106f0c3639b..63cce6b590df 100644 --- 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); -- cgit v1.2.3