From: Randy Dunlap Date: Thu, 20 Jun 2013 02:38:13 +0000 (-0700) Subject: fb: fix atyfb build warning X-Git-Tag: upstream/snapshot3+hdmi~4755^2~1^2~10 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6e36308a6fb87d104452855610398446aafb0ea6;p=platform%2Fadaptation%2Frenesas_rcar%2Frenesas_kernel.git fb: fix atyfb build warning 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 Cc: Paul Mackerras Cc: Benjamin Herrenschmidt Cc: linux-fbdev@vger.kernel.org Cc: Jean-Christophe Plagniol-Villard Cc: Tomi Valkeinen Signed-off-by: Tomi Valkeinen --- diff --git a/drivers/video/aty/atyfb_base.c b/drivers/video/aty/atyfb_base.c index 4f27fdc..813b7d7 100644 --- a/drivers/video/aty/atyfb_base.c +++ b/drivers/video/aty/atyfb_base.c @@ -434,8 +434,8 @@ static int correct_chipset(struct atyfb_par *par) 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)