Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

video: fbdev: via: remove possibly unused variables

When CONFIG_PROC_FS is disabled, we get warnings about unused variables
as remove_proc_entry() evaluates to an empty macro.

drivers/video/fbdev/via/viafbdev.c: In function 'viafb_remove_proc':
drivers/video/fbdev/via/viafbdev.c:1635:4: error: unused variable 'iga2_entry' [-Werror=unused-variable]
drivers/video/fbdev/via/viafbdev.c:1634:4: error: unused variable 'iga1_entry' [-Werror=unused-variable]

These are easy to avoid by using the pointer from the structure.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>

authored by

Arnd Bergmann and committed by
Bartlomiej Zolnierkiewicz
484c7bbf 12351855

+3 -5
+3 -5
drivers/video/fbdev/via/viafbdev.c
··· 1630 1630 } 1631 1631 static void viafb_remove_proc(struct viafb_shared *shared) 1632 1632 { 1633 - struct proc_dir_entry *viafb_entry = shared->proc_entry, 1634 - *iga1_entry = shared->iga1_proc_entry, 1635 - *iga2_entry = shared->iga2_proc_entry; 1633 + struct proc_dir_entry *viafb_entry = shared->proc_entry; 1636 1634 1637 1635 if (!viafb_entry) 1638 1636 return; 1639 1637 1640 - remove_proc_entry("output_devices", iga2_entry); 1638 + remove_proc_entry("output_devices", shared->iga2_proc_entry); 1641 1639 remove_proc_entry("iga2", viafb_entry); 1642 - remove_proc_entry("output_devices", iga1_entry); 1640 + remove_proc_entry("output_devices", shared->iga1_proc_entry); 1643 1641 remove_proc_entry("iga1", viafb_entry); 1644 1642 remove_proc_entry("supported_output_devices", viafb_entry); 1645 1643