From patchwork Tue Jan 6 13:12:10 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sudip Mukherjee X-Patchwork-Id: 5573561 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.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 276AB9F443 for ; Tue, 6 Jan 2015 13:12:29 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 599BA20220 for ; Tue, 6 Jan 2015 13:12:28 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 7E3612021B for ; Tue, 6 Jan 2015 13:12:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753344AbbAFNM0 (ORCPT ); Tue, 6 Jan 2015 08:12:26 -0500 Received: from mail-pa0-f43.google.com ([209.85.220.43]:61805 "EHLO mail-pa0-f43.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753226AbbAFNM0 (ORCPT ); Tue, 6 Jan 2015 08:12:26 -0500 Received: by mail-pa0-f43.google.com with SMTP id kx10so31003779pab.2; Tue, 06 Jan 2015 05:12:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=3bB2SDKmCj8R+Pa2cXSLtsdcJeOcnFIiJTO3BnqO1BY=; b=O+E/Bfw/JPGV1ho9YKD5kLUiop3lFv/GTT8XlEotgi8HenQL6aftEtomJgqObbrpti BEGSwkdOoe97FSxk1suQ/f2qoWeAdPkMDVaR8M+IxecLXZarMPAquIX37uONMQwF+rDl UWtpLbJotw6yZAvJBf6KxO1uyiomME/+Iww084CJSEZqbhPIlcRv+yQAW/vwNE2ayhd5 1cAGvvm5fe9sxS76IKd/3hyw+xeHXVsYItXffXAGkRYhuw0akvAKptWMPWKunknUf1DO UpwZNgEuyNP8T84ZiCIpfVYewLwBCwthN3QuHdpZnNtdJzV7psBOfypdpgnvvcQBWcG3 L4vQ== X-Received: by 10.70.137.238 with SMTP id ql14mr157447486pdb.94.1420549945580; Tue, 06 Jan 2015 05:12:25 -0800 (PST) Received: from localhost.localdomain ([122.169.180.146]) by mx.google.com with ESMTPSA id og12sm57047447pdb.43.2015.01.06.05.12.22 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 06 Jan 2015 05:12:24 -0800 (PST) From: Sudip Mukherjee To: Antonino Daplas , Jean-Christophe Plagniol-Villard , Tomi Valkeinen Cc: Sudip Mukherjee , linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] fbdev: savage: remove unused variable Date: Tue, 6 Jan 2015 18:42:10 +0530 Message-Id: <1420549930-16607-1-git-send-email-sudipm.mukherjee@gmail.com> X-Mailer: git-send-email 1.8.1.2 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.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID, T_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 vga_in8() was storing the return value in tmp, but that return value was never used again. so it should be safe to remove those variables. Signed-off-by: Sudip Mukherjee --- just one doubt: vga_in8() is calling savage_in8() which is a readb(). so in effect we are reading one byte from (par->mmio.vbase + 0x8000 + 0x3da) and then discarding that value. so if we are discarding that value then why we are reading it? 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); }