diff mbox

fbdev: matrox: hide unused 'hotplug' variable

Message ID 20170802093722.3666961-1-arnd@arndb.de
State New
Headers show

Commit Message

Arnd Bergmann Aug. 2, 2017, 9:36 a.m. UTC
The variable has become unused in modular configurations
which triggers a harmless warning:

drivers/video/fbdev/matrox/matroxfb_base.c:1583:12: error: 'hotplug' defined but not used [-Werror=unused-variable]

This moves it into an #ifdef section of the file, matching
all its references.

Fixes: 376b3ff54c9a ("fbdev: Nuke FBINFO_MODULE")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>

---
 drivers/video/fbdev/matrox/matroxfb_base.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

-- 
2.9.0

--
To unsubscribe from this list: send the line "unsubscribe linux-fbdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

Daniel Vetter Aug. 2, 2017, 10:01 a.m. UTC | #1
On Wed, Aug 02, 2017 at 11:36:47AM +0200, Arnd Bergmann wrote:
> The variable has become unused in modular configurations

> which triggers a harmless warning:

> 

> drivers/video/fbdev/matrox/matroxfb_base.c:1583:12: error: 'hotplug' defined but not used [-Werror=unused-variable]

> 

> This moves it into an #ifdef section of the file, matching

> all its references.

> 

> Fixes: 376b3ff54c9a ("fbdev: Nuke FBINFO_MODULE")

> Signed-off-by: Arnd Bergmann <arnd@arndb.de>


Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>


> ---

>  drivers/video/fbdev/matrox/matroxfb_base.c | 2 +-

>  1 file changed, 1 insertion(+), 1 deletion(-)

> 

> diff --git a/drivers/video/fbdev/matrox/matroxfb_base.c b/drivers/video/fbdev/matrox/matroxfb_base.c

> index fd1589fcdf15..00ea4e4ab95a 100644

> --- a/drivers/video/fbdev/matrox/matroxfb_base.c

> +++ b/drivers/video/fbdev/matrox/matroxfb_base.c

> @@ -1578,9 +1578,9 @@ static struct fb_videomode defaultmode = {

>  	NULL, 60, 640, 480, 39721, 40, 24, 32, 11, 96, 2,

>  	0, FB_VMODE_NONINTERLACED

>  };

> -#endif /* !MODULE */

>  

>  static int hotplug = 0;

> +#endif /* !MODULE */

>  

>  static void setDefaultOutputs(struct matrox_fb_info *minfo)

>  {

> -- 

> 2.9.0

> 


-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
--
To unsubscribe from this list: send the line "unsubscribe linux-fbdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Bartlomiej Zolnierkiewicz Aug. 7, 2017, 3:11 p.m. UTC | #2
On Wednesday, August 02, 2017 11:36:47 AM Arnd Bergmann wrote:
> The variable has become unused in modular configurations

> which triggers a harmless warning:

> 

> drivers/video/fbdev/matrox/matroxfb_base.c:1583:12: error: 'hotplug' defined but not used [-Werror=unused-variable]

> 

> This moves it into an #ifdef section of the file, matching

> all its references.

> 

> Fixes: 376b3ff54c9a ("fbdev: Nuke FBINFO_MODULE")

> Signed-off-by: Arnd Bergmann <arnd@arndb.de>


Patch queued for 4.14, thanks.

Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics

--
To unsubscribe from this list: send the line "unsubscribe linux-fbdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/video/fbdev/matrox/matroxfb_base.c b/drivers/video/fbdev/matrox/matroxfb_base.c
index fd1589fcdf15..00ea4e4ab95a 100644
--- a/drivers/video/fbdev/matrox/matroxfb_base.c
+++ b/drivers/video/fbdev/matrox/matroxfb_base.c
@@ -1578,9 +1578,9 @@  static struct fb_videomode defaultmode = {
 	NULL, 60, 640, 480, 39721, 40, 24, 32, 11, 96, 2,
 	0, FB_VMODE_NONINTERLACED
 };
-#endif /* !MODULE */
 
 static int hotplug = 0;
+#endif /* !MODULE */
 
 static void setDefaultOutputs(struct matrox_fb_info *minfo)
 {