From patchwork Sun Jul 6 18:52:02 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rickard Strandqvist X-Patchwork-Id: 4491341 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 74FDFBEEAA for ; Sun, 6 Jul 2014 18:50:50 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A6D5420253 for ; Sun, 6 Jul 2014 18:50:49 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 917502024C for ; Sun, 6 Jul 2014 18:50:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752133AbaGFSus (ORCPT ); Sun, 6 Jul 2014 14:50:48 -0400 Received: from mail-wg0-f49.google.com ([74.125.82.49]:35754 "EHLO mail-wg0-f49.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752032AbaGFSur (ORCPT ); Sun, 6 Jul 2014 14:50:47 -0400 Received: by mail-wg0-f49.google.com with SMTP id a1so60230wgh.8 for ; Sun, 06 Jul 2014 11:50:46 -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=e1vEzwSv7oPWYJQqhuESQOE/FiH68509fUV+aOsht2M=; b=CN/4vAyGSU+tycwXQ6WOj615NEonwTmGUACoyIi5mnXuJLyGUMAdnZsbP9emQSvBbE eK25t2czB3ogKKxh3dzSblVxvxvCb9bFmMzEc/FNDCDRBbbUH/HybufZBOkaOP0vuv41 TBAADwujHsYhH8v2RLnd6tmXGcUFHMngjbJNhpAf+kew/PVbMgcFYG8BigcQHuYEpawE 3e0SW1DgNngqhK5bqyWOPKw/NFAfCuRGNR/j6/KtHqJbi6zEsTSFVA9W5Xyn37V8COg1 grnU9IxDlMaQ3yj7yPQUvoAi2F6yQD6VG1impKC72TIlM5gE7YvDB2AFogbBEdsa71fG qyyQ== X-Gm-Message-State: ALoCoQmtt8nPm2aikpvH0u4AksGlq657lGe4l435aKP4gxHWgT0D04RSMUobPzvRoAEa0bCTL773 X-Received: by 10.180.211.101 with SMTP id nb5mr55592603wic.53.1404672646265; Sun, 06 Jul 2014 11:50:46 -0700 (PDT) Received: from localhost.localdomain (h-245-62.a218.priv.bahnhof.se. [85.24.245.62]) by mx.google.com with ESMTPSA id wp6sm84162167wjb.9.2014.07.06.11.50.44 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 06 Jul 2014 11:50:45 -0700 (PDT) From: Rickard Strandqvist To: Jean-Christophe Plagniol-Villard , Tomi Valkeinen Cc: Rickard Strandqvist , Jyri Sarha , linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] video: fbdev: omap2: dss: hdmi5_core.c: Cleaning up variable that is never used Date: Sun, 6 Jul 2014 20:52:02 +0200 Message-Id: <1404672722-19820-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/omap2/dss/hdmi5_core.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/video/fbdev/omap2/dss/hdmi5_core.c b/drivers/video/fbdev/omap2/dss/hdmi5_core.c index 7528c7a..3975e83 100644 --- a/drivers/video/fbdev/omap2/dss/hdmi5_core.c +++ b/drivers/video/fbdev/omap2/dss/hdmi5_core.c @@ -142,7 +142,6 @@ static int hdmi_core_ddc_edid(struct hdmi_core_data *core, u8 *pedid, u8 ext) { void __iomem *base = core->base; u8 cur_addr; - char checksum = 0; const int retries = 1000; u8 seg_ptr = ext / 2; u8 edidbase = ((ext % 2) * 0x80); @@ -191,7 +190,6 @@ static int hdmi_core_ddc_edid(struct hdmi_core_data *core, u8 *pedid, u8 ext) } pedid[cur_addr] = REG_GET(base, HDMI_CORE_I2CM_DATAI, 7, 0); - checksum += pedid[cur_addr]; } return 0; @@ -810,7 +808,7 @@ int hdmi5_audio_config(struct hdmi_core_data *core, struct hdmi_wp_data *wp, struct hdmi_audio_format audio_format; struct hdmi_audio_dma audio_dma; struct hdmi_core_audio_config core_cfg; - int err, n, cts, channel_count; + int n, cts, channel_count; unsigned int fs_nr; bool word_length_16b = false; @@ -853,7 +851,7 @@ int hdmi5_audio_config(struct hdmi_core_data *core, struct hdmi_wp_data *wp, return -EINVAL; } - err = hdmi_compute_acr(pclk, fs_nr, &n, &cts); + hdmi_compute_acr(pclk, fs_nr, &n, &cts); core_cfg.n = n; core_cfg.cts = cts;