* [PATCH 2/2] fb: fix atyfb unused data warnings
@ 2013-06-20 2:39 Randy Dunlap
2013-06-24 14:37 ` Jean-Christophe PLAGNIOL-VILLARD
0 siblings, 1 reply; 4+ messages in thread
From: Randy Dunlap @ 2013-06-20 2:39 UTC (permalink / raw)
To: LKML, Linux Fbdev development list
Cc: Andrew Morton, Paul Mackerras, Benjamin Herrenschmidt,
Jean-Christophe Plagniol-Villard, Tomi Valkeinen
From: Randy Dunlap <rdunlap@infradead.org>
Fix compiler warnings of data defined but not used. They are only used
with certain kconfig settings.
drivers/video/aty/atyfb_base.c:534:13: warning: 'ram_dram' defined but not used [-Wunused-variable]
drivers/video/aty/atyfb_base.c:535:13: warning: 'ram_resv' defined but not used [-Wunused-variable]
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: linux-fbdev@vger.kernel.org
Cc: Jean-Christophe Plagniol-Villard <plagnioj@jcrosoft.com>
Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
drivers/video/aty/atyfb_base.c | 2 ++
1 file changed, 2 insertions(+)
--- linux-next-20130619.orig/drivers/video/aty/atyfb_base.c
+++ linux-next-20130619/drivers/video/aty/atyfb_base.c
@@ -531,8 +531,10 @@ static int correct_chipset(struct atyfb_
return 0;
}
+#if defined(CONFIG_FB_ATY_GX) || defined(CONFIG_FB_ATY_CT)
static char ram_dram[] = "DRAM";
static char ram_resv[] = "RESV";
+#endif
#ifdef CONFIG_FB_ATY_GX
static char ram_vram[] = "VRAM";
#endif /* CONFIG_FB_ATY_GX */
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 2/2] fb: fix atyfb unused data warnings
2013-06-20 2:39 [PATCH 2/2] fb: fix atyfb unused data warnings Randy Dunlap
@ 2013-06-24 14:37 ` Jean-Christophe PLAGNIOL-VILLARD
2013-06-24 17:54 ` [PATCH 2/2 v2] " Randy Dunlap
0 siblings, 1 reply; 4+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2013-06-24 14:37 UTC (permalink / raw)
To: Randy Dunlap
Cc: LKML, Linux Fbdev development list, Andrew Morton,
Paul Mackerras, Benjamin Herrenschmidt, Tomi Valkeinen
On 19:39 Wed 19 Jun , Randy Dunlap wrote:
> From: Randy Dunlap <rdunlap@infradead.org>
>
> Fix compiler warnings of data defined but not used. They are only used
> with certain kconfig settings.
>
> drivers/video/aty/atyfb_base.c:534:13: warning: 'ram_dram' defined but not used [-Wunused-variable]
> drivers/video/aty/atyfb_base.c:535:13: warning: 'ram_resv' defined but not used [-Wunused-variable]
>
> Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
> Cc: Paul Mackerras <paulus@samba.org>
> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> Cc: linux-fbdev@vger.kernel.org
> Cc: Jean-Christophe Plagniol-Villard <plagnioj@jcrosoft.com>
> Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
> ---
> drivers/video/aty/atyfb_base.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> --- linux-next-20130619.orig/drivers/video/aty/atyfb_base.c
> +++ linux-next-20130619/drivers/video/aty/atyfb_base.c
> @@ -531,8 +531,10 @@ static int correct_chipset(struct atyfb_
> return 0;
> }
>
> +#if defined(CONFIG_FB_ATY_GX) || defined(CONFIG_FB_ATY_CT)
> static char ram_dram[] = "DRAM";
> static char ram_resv[] = "RESV";
use __maybe_unused macro instead of the ifdef
> +#endif
> #ifdef CONFIG_FB_ATY_GX
> static char ram_vram[] = "VRAM";
> #endif /* CONFIG_FB_ATY_GX */
> --
> 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
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 2/2 v2] fb: fix atyfb unused data warnings
2013-06-24 14:37 ` Jean-Christophe PLAGNIOL-VILLARD
@ 2013-06-24 17:54 ` Randy Dunlap
2013-06-26 12:15 ` Tomi Valkeinen
0 siblings, 1 reply; 4+ messages in thread
From: Randy Dunlap @ 2013-06-24 17:54 UTC (permalink / raw)
To: Jean-Christophe PLAGNIOL-VILLARD
Cc: LKML, Linux Fbdev development list, Andrew Morton,
Paul Mackerras, Benjamin Herrenschmidt, Tomi Valkeinen
From: Randy Dunlap <rdunlap@infradead.org>
Fix compiler warnings of data defined but not used by using the
__maybe_unused attribute. The date are only used with certain kconfig
settings.
drivers/video/aty/atyfb_base.c:534:13: warning: 'ram_dram' defined but not used [-Wunused-variable]
drivers/video/aty/atyfb_base.c:535:13: warning: 'ram_resv' defined but not used [-Wunused-variable]
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: linux-fbdev@vger.kernel.org
Cc: Jean-Christophe Plagniol-Villard <plagnioj@jcrosoft.com>
Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
drivers/video/aty/atyfb_base.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
--- lnx-310-rc7.orig/drivers/video/aty/atyfb_base.c
+++ lnx-310-rc7/drivers/video/aty/atyfb_base.c
@@ -58,6 +58,7 @@
#include <linux/slab.h>
#include <linux/vmalloc.h>
#include <linux/delay.h>
+#include <linux/compiler.h>
#include <linux/console.h>
#include <linux/fb.h>
#include <linux/init.h>
@@ -531,8 +532,8 @@ static int correct_chipset(struct atyfb_
return 0;
}
-static char ram_dram[] = "DRAM";
-static char ram_resv[] = "RESV";
+static char ram_dram[] __maybe_unused = "DRAM";
+static char ram_resv[] __maybe_unused = "RESV";
#ifdef CONFIG_FB_ATY_GX
static char ram_vram[] = "VRAM";
#endif /* CONFIG_FB_ATY_GX */
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 2/2 v2] fb: fix atyfb unused data warnings
2013-06-24 17:54 ` [PATCH 2/2 v2] " Randy Dunlap
@ 2013-06-26 12:15 ` Tomi Valkeinen
0 siblings, 0 replies; 4+ messages in thread
From: Tomi Valkeinen @ 2013-06-26 12:15 UTC (permalink / raw)
To: Randy Dunlap
Cc: Jean-Christophe PLAGNIOL-VILLARD, LKML,
Linux Fbdev development list, Andrew Morton, Paul Mackerras,
Benjamin Herrenschmidt
[-- Attachment #1: Type: text/plain, Size: 549 bytes --]
On 24/06/13 20:54, Randy Dunlap wrote:
> From: Randy Dunlap <rdunlap@infradead.org>
>
> Fix compiler warnings of data defined but not used by using the
> __maybe_unused attribute. The date are only used with certain kconfig
> settings.
>
> drivers/video/aty/atyfb_base.c:534:13: warning: 'ram_dram' defined but not used [-Wunused-variable]
> drivers/video/aty/atyfb_base.c:535:13: warning: 'ram_resv' defined but not used [-Wunused-variable]
>
I've added this and the first patch in the series to my fbdev-3.11 branch.
Tomi
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 901 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2013-06-26 12:16 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-06-20 2:39 [PATCH 2/2] fb: fix atyfb unused data warnings Randy Dunlap
2013-06-24 14:37 ` Jean-Christophe PLAGNIOL-VILLARD
2013-06-24 17:54 ` [PATCH 2/2 v2] " Randy Dunlap
2013-06-26 12:15 ` Tomi Valkeinen
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).