From patchwork Sun Jul 6 18:47:38 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rickard Strandqvist X-Patchwork-Id: 4491271 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 F3DF79F26C for ; Sun, 6 Jul 2014 18:46:38 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 256F02022A for ; Sun, 6 Jul 2014 18:46:38 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 4C40720225 for ; Sun, 6 Jul 2014 18:46:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752144AbaGFSqX (ORCPT ); Sun, 6 Jul 2014 14:46:23 -0400 Received: from mail-wi0-f176.google.com ([209.85.212.176]:56767 "EHLO mail-wi0-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752085AbaGFSqX (ORCPT ); Sun, 6 Jul 2014 14:46:23 -0400 Received: by mail-wi0-f176.google.com with SMTP id n3so14857305wiv.3 for ; Sun, 06 Jul 2014 11:46:21 -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=3Ky6DnitoNVMkhvAhu3sdMQX9mX4vopkghF13/YS0NU=; b=GpkYB1KlI1yzcDBceO8nexSwAKxc/+d352+OmxzAF9KLMzgcnxdkmrfzhqKH59+eT5 QkPisJo7r5uZM0MauyIn+J9fyoNwfzx3g44LfYauo000LvP6CQxSNuv9EtVj0/kwFIdt c4MBs+cjwcC2BYEOk14gy0nfNj8uGyFSoVsc70ha8lvT63cMGuUKQhfsYljs0JTleDfC G3cFH0OzMfCv9j2EiDfvd5MNEMLTTf5l0J9Tz9lSSVYB/U5GbNvw/S1GUf7yEHm6ttSd M44IjVA7TSkSXtF60RNnCornsORkopsLioPFLthzn4NcaK5WZP0C2OdmpUI4ZAszurU5 A8iA== X-Gm-Message-State: ALoCoQkFvfU63gAlskd3JA1IOg41oCs8h2pTMLGvLL+AP95yBVYsNwzyW4wn8CWHrk7Cb3tUa4z3 X-Received: by 10.180.88.194 with SMTP id bi2mr31017620wib.71.1404672381767; Sun, 06 Jul 2014 11:46:21 -0700 (PDT) Received: from localhost.localdomain (h-245-62.a218.priv.bahnhof.se. [85.24.245.62]) by mx.google.com with ESMTPSA id eo4sm105858608wid.4.2014.07.06.11.46.20 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 06 Jul 2014 11:46:20 -0700 (PDT) From: Rickard Strandqvist To: Jean-Christophe Plagniol-Villard , Tomi Valkeinen Cc: Rickard Strandqvist , Jingoo Han , Laurent Pinchart , Rob Clark , 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: Sun, 6 Jul 2014 20:47:38 +0200 Message-Id: <1404672458-19484-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=-7.6 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 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