agp/nvidia: Declare value returned by readl() as unused
authorThomas Zimmermann <tzimmermann@suse.de>
Wed, 1 Dec 2021 11:46:43 +0000 (12:46 +0100)
committerThomas Zimmermann <tzimmermann@suse.de>
Fri, 14 Jan 2022 14:15:54 +0000 (15:15 +0100)
Fix the compiler warning

  drivers/char/agp/nvidia-agp.c: In function 'nvidia_tlbflush':
  drivers/char/agp/nvidia-agp.c:264:22: warning: variable 'temp' set but not used [-Wunused-but-set-variable]
    264 |         u32 wbc_reg, temp;

by marking the temp variable with __maybe_unused. The affected readl()
is only required for flushing caches, but the returned value is not of
interest.

v2:
* declare temp as __maybe_unused (Helge)

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Acked-by: Helge Deller <deller@gmx.de>
Link: https://patchwork.freedesktop.org/patch/msgid/20211201114645.15384-6-tzimmermann@suse.de
drivers/char/agp/nvidia-agp.c

index f78e756..826dbd0 100644 (file)
@@ -261,7 +261,8 @@ static int nvidia_remove_memory(struct agp_memory *mem, off_t pg_start, int type
 static void nvidia_tlbflush(struct agp_memory *mem)
 {
        unsigned long end;
-       u32 wbc_reg, temp;
+       u32 wbc_reg;
+       u32 __maybe_unused temp;
        int i;
 
        /* flush chipset */