From b8dc81632ef70abe9db6046190b11b24533b1a9c Mon Sep 17 00:00:00 2001 From: Lorenzo Stoakes Date: Sun, 9 Feb 2025 06:29:25 +0000 Subject: [PATCH] mm: fixup unused variable warnings MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Unfortunately fb_defio being enabled by nommu devices seems enormously ingrained in the kernel to the point that it's not feasible to address that in this series, so we use an ifdef to workaround. However this workaround unfortunately missed some unused variables - correct this. This has been tested locally with W=1 and confirmed to resolve the issue. Link: https://lkml.kernel.org/r/d4018405-2762-4385-a816-e54cc23839ac@lucifer.local Signed-off-by: Lorenzo Stoakes Cc: David Hildenbrand Cc: Helge Deller Cc: Jaya Kumar Cc: Kajtar Zsolt Cc: Maíra Canal Cc: Matthew Wilcox Cc: Simona Vetter Cc: Thomas Zimemrmann Signed-off-by: Andrew Morton --- drivers/video/fbdev/core/fb_defio.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/video/fbdev/core/fb_defio.c b/drivers/video/fbdev/core/fb_defio.c index acf7bc7ac45f..4fc93f253e06 100644 --- a/drivers/video/fbdev/core/fb_defio.c +++ b/drivers/video/fbdev/core/fb_defio.c @@ -265,15 +265,15 @@ static void fb_deferred_io_work(struct work_struct *work) /* here we wrprotect the page's mappings, then do all deferred IO. */ mutex_lock(&fbdefio->lock); +#ifdef CONFIG_MMU list_for_each_entry(pageref, &fbdefio->pagereflist, list) { struct page *page = pageref->page; pgoff_t pgoff = pageref->offset >> PAGE_SHIFT; -#ifdef CONFIG_MMU mapping_wrprotect_range(fbdefio->mapping, pgoff, page_to_pfn(page), 1); -#endif } +#endif /* driver's callback with pagereflist */ fbdefio->deferred_io(info, &fbdefio->pagereflist); -- 2.50.1