From patchwork Thu Jun 20 02:38:13 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Randy Dunlap X-Patchwork-Id: 2752701 Return-Path: X-Original-To: patchwork-linux-fbdev@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 254BD9F8E1 for ; Thu, 20 Jun 2013 02:38:49 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 49D18202DD for ; Thu, 20 Jun 2013 02:38:48 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 5BA41202CA for ; Thu, 20 Jun 2013 02:38:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965049Ab3FTCid (ORCPT ); Wed, 19 Jun 2013 22:38:33 -0400 Received: from merlin.infradead.org ([205.233.59.134]:57138 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965025Ab3FTCic (ORCPT ); Wed, 19 Jun 2013 22:38:32 -0400 Received: from static-50-53-38-135.bvtn.or.frontiernet.net ([50.53.38.135] helo=dragon.site) by merlin.infradead.org with esmtpsa (Exim 4.80.1 #2 (Red Hat Linux)) id 1UpUlZ-0001ry-Fc; Thu, 20 Jun 2013 02:38:29 +0000 Message-ID: <51C26B15.3090800@infradead.org> Date: Wed, 19 Jun 2013 19:38:13 -0700 From: Randy Dunlap User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130510 Thunderbird/17.0.6 MIME-Version: 1.0 To: LKML , Linux Fbdev development list CC: Andrew Morton , Paul Mackerras , Benjamin Herrenschmidt , Jean-Christophe Plagniol-Villard , Tomi Valkeinen Subject: [PATCH 1/2] fb: fix atyfb build warning Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org X-Spam-Status: No, score=-8.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Randy Dunlap 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 --- drivers/video/aty/atyfb_base.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 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 --- 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)