From patchwork Sat Jul 5 12:41:24 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rickard Strandqvist X-Patchwork-Id: 4488091 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.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 4DF8B9F358 for ; Sat, 5 Jul 2014 12:40:35 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 7F13620357 for ; Sat, 5 Jul 2014 12:40:34 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id A52A32021F for ; Sat, 5 Jul 2014 12:40:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751968AbaGEMkK (ORCPT ); Sat, 5 Jul 2014 08:40:10 -0400 Received: from mail-wi0-f177.google.com ([209.85.212.177]:49673 "EHLO mail-wi0-f177.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751120AbaGEMkJ (ORCPT ); Sat, 5 Jul 2014 08:40:09 -0400 Received: by mail-wi0-f177.google.com with SMTP id r20so4883790wiv.4 for ; Sat, 05 Jul 2014 05:40:07 -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=jWMbKNxy8j2Cws17MnvtcVTVz5JVJzRPuRRE9nghgKk=; b=EbI7HKBTxUmCp5ufdnq4+/q4b9xlGZQ5ZJuQyrjNrx9601n9Fddn3XLdulozfxGFPA rkg8N4e+/2H5IZ1GcFqgmzf2UpQ1TGYzxgjF4OdieQkk0mTyS6YMyHUhTVqnWNfrWMGd bq60Aca6ZZCzhOUvwR7xKwf0DOw0zeegPTIIvZLNmBKPIBra1edn+B8qYld0euABLZmi wU0aGA3/5V8fo7junkVD/BnNpqC7RfzH0wkR+Ysr62ckDE3D5HHpFK1JR0Ndqo91+0KG alPRY21eXnS+xNHTaY5Nq5BxLqJ081mkaS56kjdWjaHa85ckJDTU/fwiJ1o71Nm8AJB5 cwDQ== X-Gm-Message-State: ALoCoQn/5duSr2SqInBsdtKNGOZWPtUT9PP1EpUkr+GtZR6UQARv/60DMGobAl0Rmgtpp4Qt5eF9 X-Received: by 10.194.88.168 with SMTP id bh8mr2728358wjb.103.1404564007919; Sat, 05 Jul 2014 05:40:07 -0700 (PDT) Received: from localhost.localdomain (h-245-62.a218.priv.bahnhof.se. [85.24.245.62]) by mx.google.com with ESMTPSA id o9sm44024530wib.22.2014.07.05.05.40.06 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 05 Jul 2014 05:40:07 -0700 (PDT) From: Rickard Strandqvist To: Jean-Christophe Plagniol-Villard , Tomi Valkeinen Cc: Rickard Strandqvist , 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: Sat, 5 Jul 2014 14:41:24 +0200 Message-Id: <1404564084-21109-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/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;