From patchwork Sat Jul 5 12:11:10 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rickard Strandqvist X-Patchwork-Id: 4487441 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 C8B9E9F26C for ; Sat, 5 Jul 2014 12:10:17 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id BBC19202EC for ; Sat, 5 Jul 2014 12:10:16 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id B2334202E9 for ; Sat, 5 Jul 2014 12:10:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751918AbaGEMJz (ORCPT ); Sat, 5 Jul 2014 08:09:55 -0400 Received: from mail-wg0-f48.google.com ([74.125.82.48]:53331 "EHLO mail-wg0-f48.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751169AbaGEMJz (ORCPT ); Sat, 5 Jul 2014 08:09:55 -0400 Received: by mail-wg0-f48.google.com with SMTP id m15so1473359wgh.31 for ; Sat, 05 Jul 2014 05:09:53 -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=u94A4Mra9/lrFRyzcMAbmDRUDiaw22ZOydych/X5AB8=; b=W2/udurwoSmVHk/cj8OCwfI4KWNpMj7XC5/GtmKU5+mkA3I5JE//stKpxdPEDZzQEN FoU8a65tK/a0baI11tyDTALLcoj5iPt7RVytoS2ZJOCU89/PIVINBuKYWitR3TqdBJ7P wOKlQUOHMVtpbWZrkCv45HvrfzfjGgxdmBPKiuNmDY9FxRLcJkVGEKvAvq1RWOzSHygC mLpy2ckQ58Jkv2xvufY3/CFvoa5u9q8XgbiN3XDjeBjYSHU1tSBQhlD/4QJFSeSE1qbo ypL9ODaG1l+79ueXwVGkjvfJMen7r3DliWC7k0NmQWO79DIyOaAoYwijRwIpwWMYIjQC Hikg== X-Gm-Message-State: ALoCoQkDcjQUqILuIV8NLoFb09ctL51ARkKeovL9A2r1ngpUtWNujcUCQzexd0BUP/Bl3CTFUGUx X-Received: by 10.180.105.68 with SMTP id gk4mr23616923wib.24.1404562193391; Sat, 05 Jul 2014 05:09:53 -0700 (PDT) Received: from localhost.localdomain (h-245-62.a218.priv.bahnhof.se. [85.24.245.62]) by mx.google.com with ESMTPSA id p3sm75397590wjw.13.2014.07.05.05.09.51 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 05 Jul 2014 05:09:52 -0700 (PDT) From: Rickard Strandqvist To: Jingoo Han , Bryan Wu Cc: Rickard Strandqvist , Rickard Strandqvist , Lee Jones , Jean-Christophe Plagniol-Villard , Tomi Valkeinen , linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] video: backlight: ili922x.c: Cleaning up variable that is never used Date: Sat, 5 Jul 2014 14:11:10 +0200 Message-Id: <1404562270-18387-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/backlight/ili922x.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/video/backlight/ili922x.c b/drivers/video/backlight/ili922x.c index ea67fe1..06936c8 100644 --- a/drivers/video/backlight/ili922x.c +++ b/drivers/video/backlight/ili922x.c @@ -251,7 +251,7 @@ static int ili922x_write(struct spi_device *spi, u8 reg, u16 value) struct spi_transfer xfer_regindex, xfer_regvalue; unsigned char tbuf[CMD_BUFSIZE]; unsigned char rbuf[CMD_BUFSIZE]; - int ret, len = 0; + int ret; memset(&xfer_regindex, 0, sizeof(struct spi_transfer)); memset(&xfer_regvalue, 0, sizeof(struct spi_transfer)); @@ -273,7 +273,6 @@ static int ili922x_write(struct spi_device *spi, u8 reg, u16 value) ret = spi_sync(spi, &msg); spi_message_init(&msg); - len = 0; tbuf[0] = set_tx_byte(START_BYTE(ili922x_id, START_RS_REG, START_RW_WRITE)); tbuf[1] = set_tx_byte((value & 0xFF00) >> 8);