fb: fix atyfb build warning

Started by Randy Dunlap on Jun 20, 2013

Subsystems (1)

Maintainers (1)

DORMANTno replies

open the first message on its own page

Message details and related content
From: Randy Dunlap <rdunlap@infradead.org>

Fix build warning when neither of CONFIG_FB_ATY_GX or
CONFIG_FB_ATY_CT is enabled, since ARRAY_SIZE(aty_chips) is 0 in
that case.

drivers/video/aty/atyfb_base.c:437:11: warning: overflow in implicit constant conversion [-Woverflow]

Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Cc:	Paul Mackerras <redacted>
Cc:	Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc:	<redacted>
Cc:	Jean-Christophe Plagniol-Villard <redacted>
Cc:	Tomi Valkeinen <redacted>
---
 drivers/video/aty/atyfb_base.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
--- linux-next-20130619.orig/drivers/video/aty/atyfb_base.c
+++ linux-next-20130619/drivers/video/aty/atyfb_base.c
@@ -434,8 +434,8 @@ static int correct_chipset(struct atyfb_
 	const char *name;
 	int i;
 
-	for (i = ARRAY_SIZE(aty_chips) - 1; i >= 0; i--)
-		if (par->pci_id = aty_chips[i].pci_id)
+	for (i = ARRAY_SIZE(aty_chips); i > 0; i--)
+		if (par->pci_id = aty_chips[i - 1].pci_id)
 			break;
 
 	if (i < 0)
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help