From patchwork Sat Jul 5 12:36:44 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rickard Strandqvist X-Patchwork-Id: 4488001 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.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id A46C2BEEAA for ; Sat, 5 Jul 2014 12:35:31 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id D77EC20357 for ; Sat, 5 Jul 2014 12:35:30 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 0BC01202A1 for ; Sat, 5 Jul 2014 12:35:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756607AbaGEMf3 (ORCPT ); Sat, 5 Jul 2014 08:35:29 -0400 Received: from mail-we0-f178.google.com ([74.125.82.178]:57101 "EHLO mail-we0-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755466AbaGEMf2 (ORCPT ); Sat, 5 Jul 2014 08:35:28 -0400 Received: by mail-we0-f178.google.com with SMTP id x48so2569626wes.9 for ; Sat, 05 Jul 2014 05:35:27 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=lBXAHspDqwHFi9xgaGHjfT80Qo1VIbxO97EvFtNisnE=; b=O1GSVllPzDD13BLPtuT1bOSio41M4/HXVPVY+8iy4A4zzYyxiiSErEKwNkWyAGdBq/ SulTFGF9JPZ+T0Mi3YwTOa6XD22cd0TjkUjJ64P6e3M5u9TARt/UUsmGetnzXigSbyXa W4DNrnoMBO5tNYe1qbMlK9SW4xwPyQ/m8s2fJdF67f6fKmDL2yHwVUedeZuJ271QCXQ1 JSbUs+DUldSvSBuSG7j64Mfr4kcwXkRDl+PT55fYNP/X0pG7zceY9KYrQGh0TBT53Jc6 HvxpoSvd6LzmUJSaX5pxGcI5Amyo74fFxSJwWOfyqkJMJQlukrng0nj3Sr/7PMcFdtNg NQ5g== X-Gm-Message-State: ALoCoQnkbgvKpE7Nx5U1f2VZXJXZBu0aIp+GC1w2y1rm+k5rJ/fI9aCXiTtn4UuHbmbuiM4VnByM X-Received: by 10.194.89.138 with SMTP id bo10mr18942980wjb.22.1404563727887; Sat, 05 Jul 2014 05:35:27 -0700 (PDT) Received: from localhost.localdomain (h-245-62.a218.priv.bahnhof.se. [85.24.245.62]) by mx.google.com with ESMTPSA id gq4sm56861429wib.8.2014.07.05.05.35.26 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 05 Jul 2014 05:35:27 -0700 (PDT) From: Rickard Strandqvist To: Jean-Christophe Plagniol-Villard , Tomi Valkeinen Cc: Rickard Strandqvist , Rickard Strandqvist , Jingoo Han , Laurent Pinchart , Rob Clark , Daniel Vetter , linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] video: fbdev: nvidia: nv_setup.c: Cleaning up variable that is never used Date: Sat, 5 Jul 2014 14:36:44 +0200 Message-Id: <1404563804-20770-1-git-send-email-rickard_strandqvist@spectrumdigital.se> X-Mailer: git-send-email 1.7.10.4 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.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, 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 From: Rickard Strandqvist Variable ar assigned a value that is never used. I have also removed all the code that thereby serves no purpose. This was found using a static code analysis program called cppcheck Signed-off-by: Rickard Strandqvist --- drivers/video/fbdev/nvidia/nv_setup.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/video/fbdev/nvidia/nv_setup.c b/drivers/video/fbdev/nvidia/nv_setup.c index 2f2e162..37cdde6 100644 --- a/drivers/video/fbdev/nvidia/nv_setup.c +++ b/drivers/video/fbdev/nvidia/nv_setup.c @@ -89,9 +89,7 @@ u8 NVReadSeq(struct nvidia_par *par, u8 index) } void NVWriteAttr(struct nvidia_par *par, u8 index, u8 value) { - volatile u8 tmp; - - tmp = VGA_RD08(par->PCIO, par->IOBase + 0x0a); + VGA_RD08(par->PCIO, par->IOBase + 0x0a); if (par->paletteEnabled) index &= ~0x20; else @@ -101,9 +99,7 @@ void NVWriteAttr(struct nvidia_par *par, u8 index, u8 value) } u8 NVReadAttr(struct nvidia_par *par, u8 index) { - volatile u8 tmp; - - tmp = VGA_RD08(par->PCIO, par->IOBase + 0x0a); + VGA_RD08(par->PCIO, par->IOBase + 0x0a); if (par->paletteEnabled) index &= ~0x20; else