From patchwork Sat Jul 5 12:46:31 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rickard Strandqvist X-Patchwork-Id: 4488181 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 E6E80BEEAA for ; Sat, 5 Jul 2014 12:45:18 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id D857520265 for ; Sat, 5 Jul 2014 12:45:17 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 1B4CB2021F for ; Sat, 5 Jul 2014 12:45:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755163AbaGEMpQ (ORCPT ); Sat, 5 Jul 2014 08:45:16 -0400 Received: from mail-we0-f177.google.com ([74.125.82.177]:55694 "EHLO mail-we0-f177.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754186AbaGEMpP (ORCPT ); Sat, 5 Jul 2014 08:45:15 -0400 Received: by mail-we0-f177.google.com with SMTP id u56so2563967wes.36 for ; Sat, 05 Jul 2014 05:45:14 -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=mdl8QoQFrxjulkTMfahMyInlgRXnFToRKt1yQSLJtBc=; b=ZKtBBFxN+4AIMdRe2BRKAya5cQ7X7ymG0LyZqBbd4BUvoDo/WXrqDm8QjQZ/nYYorM hkBL3bBUHS3EJ53iFwMQRCJ3nx09NHZGIQORQFbxFDwFI6iVvy5mIBA1D3uj+qj3VKwN lD7vijpo3gMxab39StFP2DE8ciKeWR2/pyJHMoZqvSOJoYgx5Ok+U1YqoyXeDDC6ioH8 NsaMcMn5YaCX2VRmG1bAxWsYUwx1b+qlPpjNdbJ2JzECNFyD3mvL3qMDvSfg2nZS2dw2 S6oapcJF+6JubXC7rm7pf063K3pW5cAx6GfvqSS3/t+PV7ucn/y4RGMu4MLAsjljqRTW qylg== X-Gm-Message-State: ALoCoQkSSTvZFVCdvRpXFj1DeDSCXS7gVlFEATlnBw5yyMExoFm2FWbYYiJTPrvSi9alnnkgyXg3 X-Received: by 10.194.1.164 with SMTP id 4mr18755155wjn.17.1404564314167; Sat, 05 Jul 2014 05:45:14 -0700 (PDT) Received: from localhost.localdomain (h-245-62.a218.priv.bahnhof.se. [85.24.245.62]) by mx.google.com with ESMTPSA id m3sm75536739wjr.49.2014.07.05.05.45.12 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 05 Jul 2014 05:45:13 -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: savage: savagefb.h: Cleaning up variable that is never used Date: Sat, 5 Jul 2014 14:46:31 +0200 Message-Id: <1404564391-21548-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/savage/savagefb.h | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/drivers/video/fbdev/savage/savagefb.h b/drivers/video/fbdev/savage/savagefb.h index dcaab90..8ff4ab1 100644 --- a/drivers/video/fbdev/savage/savagefb.h +++ b/drivers/video/fbdev/savage/savagefb.h @@ -351,32 +351,26 @@ static inline void VGAwSEQ(u8 index, u8 val, struct savagefb_par *par) static inline void VGAenablePalette(struct savagefb_par *par) { - u8 tmp; - - tmp = vga_in8(0x3da, par); + vga_in8(0x3da, par); vga_out8(0x3c0, 0x00, par); par->paletteEnabled = 1; } static inline void VGAdisablePalette(struct savagefb_par *par) { - u8 tmp; - - tmp = vga_in8(0x3da, par); + vga_in8(0x3da, par); vga_out8(0x3c0, 0x20, par); par->paletteEnabled = 0; } static inline void VGAwATTR(u8 index, u8 value, struct savagefb_par *par) { - u8 tmp; - if (par->paletteEnabled) index &= ~0x20; else index |= 0x20; - tmp = vga_in8(0x3da, par); + vga_in8(0x3da, par); vga_out8(0x3c0, index, par); vga_out8 (0x3c0, value, par); }