From patchwork Tue May 9 21:46:04 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Gustavo A. R. Silva" X-Patchwork-Id: 9718989 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 0E4B260236 for ; Tue, 9 May 2017 22:07:48 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id F1B5828471 for ; Tue, 9 May 2017 22:07:47 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E1A2728497; Tue, 9 May 2017 22:07:47 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.4 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D826D28471 for ; Tue, 9 May 2017 22:07:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750759AbdEIWHq (ORCPT ); Tue, 9 May 2017 18:07:46 -0400 Received: from gateway32.websitewelcome.com ([192.185.145.170]:22253 "EHLO gateway32.websitewelcome.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750753AbdEIWHp (ORCPT ); Tue, 9 May 2017 18:07:45 -0400 X-Greylist: delayed 1296 seconds by postgrey-1.27 at vger.kernel.org; Tue, 09 May 2017 18:07:45 EDT Received: from cm2.websitewelcome.com (cm2.websitewelcome.com [192.185.178.13]) by gateway32.websitewelcome.com (Postfix) with ESMTP id 4CC3B36D3F for ; Tue, 9 May 2017 16:46:06 -0500 (CDT) Received: from gator4166.hostgator.com ([108.167.133.22]) by cm2.websitewelcome.com with id JMm51v00G0V9LXg01Mm61i; Tue, 09 May 2017 16:46:06 -0500 Received: from [189.152.179.233] (port=57506 helo=embeddedgus) by gator4166.hostgator.com with esmtpa (Exim 4.87) (envelope-from ) id 1d8CxI-000Bvs-VB; Tue, 09 May 2017 16:46:05 -0500 Date: Tue, 9 May 2017 16:46:04 -0500 From: "Gustavo A. R. Silva" To: "Nicholas A. Bellinger" Cc: linux-scsi@vger.kernel.org, target-devel@vger.kernel.org, linux-kernel@vger.kernel.org, "Gustavo A. R. Silva" Subject: [PATCH] target: remove dead code Message-ID: <20170509214604.GA7643@embeddedgus> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.23 (2014-03-12) X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - gator4166.hostgator.com X-AntiAbuse: Original Domain - vger.kernel.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - embeddedor.com X-BWhitelist: no X-Source-IP: 189.152.179.233 X-Exim-ID: 1d8CxI-000Bvs-VB X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: (embeddedgus) [189.152.179.233]:57506 X-Source-Auth: garsilva@embeddedor.com X-Email-Count: 12 X-Source-Cap: Z3V6aWRpbmU7Z3V6aWRpbmU7Z2F0b3I0MTY2Lmhvc3RnYXRvci5jb20= Sender: target-devel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: target-devel@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Local variable _ret_ is assigned to a constant value and it is never updated again. Remove this variable and the dead code it guards. Addresses-Coverity-ID: 140761 Signed-off-by: Gustavo A. R. Silva Reviewed-by: Tyrel Datwyler --- drivers/target/target_core_rd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/target/target_core_rd.c b/drivers/target/target_core_rd.c index ddc216c..6e8ef23 100644 --- a/drivers/target/target_core_rd.c +++ b/drivers/target/target_core_rd.c @@ -568,7 +568,7 @@ static ssize_t rd_set_configfs_dev_params(struct se_device *dev, struct rd_dev *rd_dev = RD_DEV(dev); char *orig, *ptr, *opts; substring_t args[MAX_OPT_ARGS]; - int ret = 0, arg, token; + int arg, token; opts = kstrdup(page, GFP_KERNEL); if (!opts) @@ -603,7 +603,7 @@ static ssize_t rd_set_configfs_dev_params(struct se_device *dev, } kfree(orig); - return (!ret) ? count : ret; + return count; } static ssize_t rd_show_configfs_dev_params(struct se_device *dev, char *b)