From patchwork Tue Jun 16 13:42:05 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sudip Mukherjee X-Patchwork-Id: 6618011 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 90F00C0020 for ; Tue, 16 Jun 2015 13:42:41 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 7D5F920761 for ; Tue, 16 Jun 2015 13:42:40 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 9992D205E2 for ; Tue, 16 Jun 2015 13:42:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756324AbbFPNme (ORCPT ); Tue, 16 Jun 2015 09:42:34 -0400 Received: from mail-pd0-f172.google.com ([209.85.192.172]:34328 "EHLO mail-pd0-f172.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752860AbbFPNmb (ORCPT ); Tue, 16 Jun 2015 09:42:31 -0400 Received: by pdbki1 with SMTP id ki1so14796605pdb.1; Tue, 16 Jun 2015 06:42:30 -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=l10fKmtX7NZJQoVt1zxvBWYVlgqFVPotK8ewy3n7gT7WQQQrGGcE6F+lFkVD8VCdl1 6nxAwFatmVAPjBOg4DI3i8lnZ4ZYT7KkD0E0zs6HZLflAFG1rCWfeECK9wMygw08k9ES zSgyblcyU6ai0sRuRXMgcwfO396+9kVBU6rIMnmP3DpKe58OiAVBaqLfhcRksom492Qb vVCmG4AOWUKb8tgq8nK064B2EmEIVuDe6W5UNxkJCTto/FEEGw7oF5QnQO5/VlFSETq5 f/+GX5J5OzST+ED7FmCagHMtOcammG9As2iZZYWzfK+SgKwocbDlyGfCUG639cQJJguK m9ow== X-Received: by 10.70.138.38 with SMTP id qn6mr691314pdb.119.1434462150414; Tue, 16 Jun 2015 06:42:30 -0700 (PDT) Received: from localhost.localdomain ([122.169.132.132]) by mx.google.com with ESMTPSA id w4sm1521423pdl.7.2015.06.16.06.42.27 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 16 Jun 2015 06:42:29 -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 2/8] staging: sm7xxfb: remove numvgamodes Date: Tue, 16 Jun 2015 19:12:05 +0530 Message-Id: <1434462131-15191-2-git-send-email-sudipm.mukherjee@gmail.com> X-Mailer: git-send-email 1.8.1.2 In-Reply-To: <1434462131-15191-1-git-send-email-sudipm.mukherjee@gmail.com> References: <1434462131-15191-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.7 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 &&