From patchwork Sat Jul 5 12:24:08 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rickard Strandqvist X-Patchwork-Id: 4487751 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 101F0BEEAA for ; Sat, 5 Jul 2014 12:23:11 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 392CC20357 for ; Sat, 5 Jul 2014 12:23:10 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 2547C20263 for ; Sat, 5 Jul 2014 12:23:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754532AbaGEMWx (ORCPT ); Sat, 5 Jul 2014 08:22:53 -0400 Received: from mail-wi0-f173.google.com ([209.85.212.173]:63327 "EHLO mail-wi0-f173.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752961AbaGEMWx (ORCPT ); Sat, 5 Jul 2014 08:22:53 -0400 Received: by mail-wi0-f173.google.com with SMTP id cc10so13865107wib.6 for ; Sat, 05 Jul 2014 05:22:51 -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=Y6+u5dx3MxdH5/HTYLuBtkRcdGlFmhq/l8bEMiCRFUo=; b=G+4od79BtJ9D3Y8kQ7TOU52UplbuTzp2h2tFyL+yJ2vTyYUs5g+vtwNQZooXiqIUM8 2SYK6uvO/hkVMRD2p16MhVjQ2npr36aiigvwZ6L6N1gvGzGW65ajNbU4Z5bHq4sgZtS9 vX8Rwk/kMPmd3K33v+F+75De6bFTDV3+L8x8IpY+CvrrGZCoNK3+Fn7sKCur122tPckK 973KaoQX/pTrGzi52UzbzceEc4iFx9LL2Btb8Lp1xHPiN8jJyHeY7tO7QrJSmQeulNgV +hvLPXYVMXB3l6cdwWMwdFAxNg0jQKMeuOn7EZS4/DM0Rm1+2BYbToy19nL1JacwivEg ODDg== X-Gm-Message-State: ALoCoQlr71/FXE2EY8nnEQHmKGICvmJwU+YwqFiScyBX+yubxZ2F20hxHVimnp979hLu8VzxgaFV X-Received: by 10.194.120.35 with SMTP id kz3mr18842154wjb.38.1404562971887; Sat, 05 Jul 2014 05:22:51 -0700 (PDT) Received: from localhost.localdomain (h-245-62.a218.priv.bahnhof.se. [85.24.245.62]) by mx.google.com with ESMTPSA id hi4sm75449060wjc.27.2014.07.05.05.22.50 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 05 Jul 2014 05:22:51 -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: intelfb: intelfb_i2c.c: Cleaning up variable that is never used Date: Sat, 5 Jul 2014 14:24:08 +0200 Message-Id: <1404563048-19690-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/intelfb/intelfb_i2c.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/video/fbdev/intelfb/intelfb_i2c.c b/drivers/video/fbdev/intelfb/intelfb_i2c.c index 3300bd3..4df2f1f 100644 --- a/drivers/video/fbdev/intelfb/intelfb_i2c.c +++ b/drivers/video/fbdev/intelfb/intelfb_i2c.c @@ -55,22 +55,20 @@ static void intelfb_gpio_setscl(void *data, int state) { struct intelfb_i2c_chan *chan = data; struct intelfb_info *dinfo = chan->dinfo; - u32 val; OUTREG(chan->reg, (state ? SCL_VAL_OUT : 0) | SCL_DIR | SCL_DIR_MASK | SCL_VAL_MASK); - val = INREG(chan->reg); + INREG(chan->reg); } static void intelfb_gpio_setsda(void *data, int state) { struct intelfb_i2c_chan *chan = data; struct intelfb_info *dinfo = chan->dinfo; - u32 val; OUTREG(chan->reg, (state ? SDA_VAL_OUT : 0) | SDA_DIR | SDA_DIR_MASK | SDA_VAL_MASK); - val = INREG(chan->reg); + INREG(chan->reg); } static int intelfb_gpio_getscl(void *data)