From patchwork Wed Jun 17 11:24:41 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sudip Mukherjee X-Patchwork-Id: 6624131 Return-Path: X-Original-To: patchwork-linux-fbdev@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 139E2C0020 for ; Wed, 17 Jun 2015 11:25:37 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 44CD9208D0 for ; Wed, 17 Jun 2015 11:25:36 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 1E5AF208DF for ; Wed, 17 Jun 2015 11:25:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751684AbbFQLZc (ORCPT ); Wed, 17 Jun 2015 07:25:32 -0400 Received: from mail-pd0-f174.google.com ([209.85.192.174]:36654 "EHLO mail-pd0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753653AbbFQLZ1 (ORCPT ); Wed, 17 Jun 2015 07:25:27 -0400 Received: by pdjm12 with SMTP id m12so37622387pdj.3; Wed, 17 Jun 2015 04:25:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=TsJvFYucvHVV3sAtrwaGl7wOeSaYt2+JoIV3SRy3XVQ=; b=xyxJNe3uh/RYPu3EeKgpalN2kCjnyaohsFFvvyRngX1iWJdfkdfFpH0jQEOlPF5Wix /XE5KANq+fnyfQSRaBY90B0YZlKghBFIQUtQabGHAt88xoZQN0n/0yGWcGmg0nP7wcKi Rj9bXsZ5pYk+RJ7djtnLcYFlYukkll9dfVKthuPRw03u4EVk05rJWe65HS/SkDXpEYJF IPjKnt1aTl9sroxD/hQmRjRI8C2mzSKFCsENLRkXLkCcrhAhRqCSqpMjgWxtxxWb3FAd oXsM7FVcW7BrDkHWFYG7we43FHLnpTwU6uzI9jSYoShQM9MGS2sM73NP1hP1MxQ95BCY 53TQ== X-Received: by 10.68.244.197 with SMTP id xi5mr3224304pbc.45.1434540326519; Wed, 17 Jun 2015 04:25:26 -0700 (PDT) Received: from localhost.localdomain ([122.169.132.132]) by mx.google.com with ESMTPSA id zx1sm4367679pbb.73.2015.06.17.04.25.23 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 17 Jun 2015 04:25:25 -0700 (PDT) From: Sudip Mukherjee To: Greg Kroah-Hartman Cc: linux-fbdev@vger.kernel.org, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org, Joe Perches , Sudip Mukherjee Subject: [PATCH v2 2/9] staging: sm7xxfb: remove numvgamodes Date: Wed, 17 Jun 2015 16:54:41 +0530 Message-Id: <1434540288-8289-3-git-send-email-sudipm.mukherjee@gmail.com> X-Mailer: git-send-email 1.8.1.2 In-Reply-To: <1434540288-8289-1-git-send-email-sudipm.mukherjee@gmail.com> References: <1434540288-8289-1-git-send-email-sudipm.mukherjee@gmail.com> Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org X-Spam-Status: No, score=-6.6 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_WEB, RP_MATCHES_RCVD, T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=ham 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 numvgamodes was only used in one place, so remove the #define and use its defined value. Signed-off-by: Sudip Mukherjee --- drivers/staging/sm7xxfb/sm7xx.h | 2 -- drivers/staging/sm7xxfb/sm7xxfb.c | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/staging/sm7xxfb/sm7xx.h b/drivers/staging/sm7xxfb/sm7xx.h index c5d6253..4dabda4 100644 --- a/drivers/staging/sm7xxfb/sm7xx.h +++ b/drivers/staging/sm7xxfb/sm7xx.h @@ -775,5 +775,3 @@ static struct ModeInit vgamode[] = { }, }, }; - -#define numvgamodes ARRAY_SIZE(vgamode) diff --git a/drivers/staging/sm7xxfb/sm7xxfb.c b/drivers/staging/sm7xxfb/sm7xxfb.c index 4d9b69d..5667fbf 100644 --- a/drivers/staging/sm7xxfb/sm7xxfb.c +++ b/drivers/staging/sm7xxfb/sm7xxfb.c @@ -477,7 +477,7 @@ static void sm7xx_set_timing(struct smtcfb_info *sfb) "sfb->width=%d sfb->height=%d sfb->fb->var.bits_per_pixel=%d sfb->hz=%d\n", sfb->width, sfb->height, sfb->fb->var.bits_per_pixel, sfb->hz); - for (j = 0; j < numvgamodes; j++) { + for (j = 0; j < ARRAY_SIZE(vgamode); j++) { if (vgamode[j].mmsizex == sfb->width && vgamode[j].mmsizey == sfb->height && vgamode[j].bpp == sfb->fb->var.bits_per_pixel &&