From patchwork Sun Jul 6 18:57:12 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rickard Strandqvist X-Patchwork-Id: 4491451 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 C2448BEEAA for ; Sun, 6 Jul 2014 18:56:15 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id EFC0E20253 for ; Sun, 6 Jul 2014 18:56:14 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 30BB92024C for ; Sun, 6 Jul 2014 18:56:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752173AbaGFSz6 (ORCPT ); Sun, 6 Jul 2014 14:55:58 -0400 Received: from mail-we0-f175.google.com ([74.125.82.175]:33747 "EHLO mail-we0-f175.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752009AbaGFSz5 (ORCPT ); Sun, 6 Jul 2014 14:55:57 -0400 Received: by mail-we0-f175.google.com with SMTP id k48so3430571wev.20 for ; Sun, 06 Jul 2014 11:55:56 -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=Mlqs1Xy9r+AYPiwuRb/w5e9PxLv7GlZ74eCCFeKVraM=; b=bYr0s380NwQBd7r6nQmSFiccF71cfsnUgfkbbI0N5jFjhtYfOuw5M8bTvs7GlzGOw7 mffzdaX+9whtk3yu58ge1MlvDErGW6acPirMttEGjpTcLDzAOMbFidXIj+n3L2DSU7cc UVEyb+qUCIgXBtf+PaTTUESGAaazjmuWafa2W70AcHfRobQfvnXLwg+ta0DobeZaGjsx oupBURdkOVkup0URCWALhMlnZQKx0FZH59LYitKyJmNA3suwEwY44AnQJCSws1EcVhZN i6H9sWXufXozUEivLtt9ZuR42hrP+sL0AI27EBGXVDW2oZJ5hx/3Pus571NvogW7b21b gltw== X-Gm-Message-State: ALoCoQleDRGoW6zOLu9/Fx/1Cp3yXYDRzxunAqH+p1Box4BWrwOyvqcn/kVXWvBLzEQThlI8s2iN X-Received: by 10.194.92.196 with SMTP id co4mr27185311wjb.4.1404672956257; Sun, 06 Jul 2014 11:55:56 -0700 (PDT) Received: from localhost.localdomain (h-245-62.a218.priv.bahnhof.se. [85.24.245.62]) by mx.google.com with ESMTPSA id i12sm84167835wjr.32.2014.07.06.11.55.54 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 06 Jul 2014 11:55:55 -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: savage: savagefb.h: Cleaning up variable that is never used Date: Sun, 6 Jul 2014 20:57:12 +0200 Message-Id: <1404673032-20246-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/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); }