summaryrefslogtreecommitdiffstats
path: root/drivers/char/agp
diff options
context:
space:
mode:
authorThomas Zimmermann <tzimmermann@suse.de>2021-12-01 12:46:43 +0100
committerThomas Zimmermann <tzimmermann@suse.de>2022-01-14 15:15:54 +0100
commitc4f7f3117e80fd12f898f24630f146316c809189 (patch)
treeac7f066a3cdaa62aea699511a13c2bb6f176da42 /drivers/char/agp
parentba7e3fd19a6731747da4d213566e4239b28d3a7d (diff)
downloadlinux-c4f7f3117e80fd12f898f24630f146316c809189.tar.bz2
agp/nvidia: Declare value returned by readl() as unused
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
Diffstat (limited to 'drivers/char/agp')
-rw-r--r--drivers/char/agp/nvidia-agp.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/char/agp/nvidia-agp.c b/drivers/char/agp/nvidia-agp.c
index f78e756157db..826dbd06f6bb 100644
--- a/drivers/char/agp/nvidia-agp.c
+++ b/drivers/char/agp/nvidia-agp.c
@@ -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 */