* [PATCH] fbdev: via: remove possibly unused variables
@ 2017-05-16 11:28 ` Arnd Bergmann
2017-06-14 10:19 ` Bartlomiej Zolnierkiewicz
0 siblings, 1 reply; 2+ messages in thread
From: Arnd Bergmann @ 2017-05-16 11:28 UTC (permalink / raw)
To: Florian Tobias Schandinat, Bartlomiej Zolnierkiewicz
Cc: Arnd Bergmann, linux-fbdev, linux-kernel
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>
---
drivers/video/fbdev/via/viafbdev.c | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/drivers/video/fbdev/via/viafbdev.c b/drivers/video/fbdev/via/viafbdev.c
index 510772bed4f4..89ee4d73bcff 100644
--- a/drivers/video/fbdev/via/viafbdev.c
+++ b/drivers/video/fbdev/via/viafbdev.c
@@ -1630,16 +1630,14 @@ static void viafb_init_proc(struct viafb_shared *shared)
}
static void viafb_remove_proc(struct viafb_shared *shared)
{
- struct proc_dir_entry *viafb_entry = shared->proc_entry,
- *iga1_entry = shared->iga1_proc_entry,
- *iga2_entry = shared->iga2_proc_entry;
+ struct proc_dir_entry *viafb_entry = shared->proc_entry;
if (!viafb_entry)
return;
- remove_proc_entry("output_devices", iga2_entry);
+ remove_proc_entry("output_devices", shared->iga2_proc_entry);
remove_proc_entry("iga2", viafb_entry);
- remove_proc_entry("output_devices", iga1_entry);
+ remove_proc_entry("output_devices", shared->iga1_proc_entry);
remove_proc_entry("iga1", viafb_entry);
remove_proc_entry("supported_output_devices", viafb_entry);
--
2.9.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] fbdev: via: remove possibly unused variables
2017-05-16 11:28 ` [PATCH] fbdev: via: remove possibly unused variables Arnd Bergmann
@ 2017-06-14 10:19 ` Bartlomiej Zolnierkiewicz
0 siblings, 0 replies; 2+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2017-06-14 10:19 UTC (permalink / raw)
To: Arnd Bergmann; +Cc: Florian Tobias Schandinat, linux-fbdev, linux-kernel
On Tuesday, May 16, 2017 01:28:57 PM Arnd Bergmann wrote:
> 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>
Patch queued for 4.12, thanks.
Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-06-14 10:19 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <CGME20170516112912epcas1p39fe29bd07d9f8ac978b3908992dc7cbf@epcas1p3.samsung.com>
2017-05-16 11:28 ` [PATCH] fbdev: via: remove possibly unused variables Arnd Bergmann
2017-06-14 10:19 ` Bartlomiej Zolnierkiewicz
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox