linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] fbdev: matrox: hide unused 'hotplug' variable
@ 2017-08-02  9:36 ` Arnd Bergmann
  2017-08-02 10:01   ` Daniel Vetter
  2017-08-07 15:11   ` Bartlomiej Zolnierkiewicz
  0 siblings, 2 replies; 5+ messages in thread
From: Arnd Bergmann @ 2017-08-02  9:36 UTC (permalink / raw)
  To: Bartlomiej Zolnierkiewicz, Daniel Vetter
  Cc: Arnd Bergmann, Dan Carpenter, Sean Paul, Arvind Yadav,
	linux-fbdev, linux-kernel

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(-)

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

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] fbdev: matrox: hide unused 'hotplug' variable
  2017-08-02  9:36 ` [PATCH] fbdev: matrox: hide unused 'hotplug' variable Arnd Bergmann
@ 2017-08-02 10:01   ` Daniel Vetter
  2017-08-02 11:14     ` Arvind Yadav
  2017-08-07 15:11   ` Bartlomiej Zolnierkiewicz
  1 sibling, 1 reply; 5+ messages in thread
From: Daniel Vetter @ 2017-08-02 10:01 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Bartlomiej Zolnierkiewicz, Daniel Vetter, Dan Carpenter,
	Sean Paul, Arvind Yadav, linux-fbdev, linux-kernel

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] fbdev: matrox: hide unused 'hotplug' variable
  2017-08-02 10:01   ` Daniel Vetter
@ 2017-08-02 11:14     ` Arvind Yadav
  2017-08-02 11:45       ` Arnd Bergmann
  0 siblings, 1 reply; 5+ messages in thread
From: Arvind Yadav @ 2017-08-02 11:14 UTC (permalink / raw)
  To: Arnd Bergmann, Bartlomiej Zolnierkiewicz, Dan Carpenter,
	Sean Paul, linux-fbdev, linux-kernel

Hi Arnd,

With is change we can get below error. If MODULE is define.

drivers/video/fbdev/matrox/matroxfb_base.c: In function ‘initMatrox2’:
drivers/video/fbdev/matrox/matroxfb_base.c:1799:23: error: ‘hotplug’ 
undeclared (first use in this function)
   minfo->fbcon.flags = hotplug ? FBINFO_FLAG_MODULE : FBINFO_FLAG_DEFAULT;

Please check this.

~arvind


On Wednesday 02 August 2017 03:31 PM, Daniel Vetter wrote:
> 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
>>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] fbdev: matrox: hide unused 'hotplug' variable
  2017-08-02 11:14     ` Arvind Yadav
@ 2017-08-02 11:45       ` Arnd Bergmann
  0 siblings, 0 replies; 5+ messages in thread
From: Arnd Bergmann @ 2017-08-02 11:45 UTC (permalink / raw)
  To: Arvind Yadav
  Cc: Bartlomiej Zolnierkiewicz, Dan Carpenter, Sean Paul, linux-fbdev,
	Linux Kernel Mailing List

On Wed, Aug 2, 2017 at 1:14 PM, Arvind Yadav <arvind.yadav.cs@gmail.com> wrote:
> Hi Arnd,
>
> With is change we can get below error. If MODULE is define.
>
> drivers/video/fbdev/matrox/matroxfb_base.c: In function ‘initMatrox2’:
> drivers/video/fbdev/matrox/matroxfb_base.c:1799:23: error: ‘hotplug’
> undeclared (first use in this function)
>   minfo->fbcon.flags = hotplug ? FBINFO_FLAG_MODULE : FBINFO_FLAG_DEFAULT;
>
> Please check this.

I think you are looking at an older tree, the patch only applies to today's
fbdev/fbdev-for-next branch, containing commit 376b3ff54c9a ("fbdev: Nuke
FBINFO_MODULE"), which was applied last night.

       Arnd

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] fbdev: matrox: hide unused 'hotplug' variable
  2017-08-02  9:36 ` [PATCH] fbdev: matrox: hide unused 'hotplug' variable Arnd Bergmann
  2017-08-02 10:01   ` Daniel Vetter
@ 2017-08-07 15:11   ` Bartlomiej Zolnierkiewicz
  1 sibling, 0 replies; 5+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2017-08-07 15:11 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Daniel Vetter, Dan Carpenter, Sean Paul, Arvind Yadav,
	linux-fbdev, linux-kernel

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2017-08-07 15:11 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <CGME20170802093751epcas3p4c7955b185ba3a2e39c230da58de3e9e0@epcas3p4.samsung.com>
2017-08-02  9:36 ` [PATCH] fbdev: matrox: hide unused 'hotplug' variable Arnd Bergmann
2017-08-02 10:01   ` Daniel Vetter
2017-08-02 11:14     ` Arvind Yadav
2017-08-02 11:45       ` Arnd Bergmann
2017-08-07 15:11   ` Bartlomiej Zolnierkiewicz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).