Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1638413 > unrolled thread

[PATCH] target: remove dead code

Started by"Gustavo A. R. Silva" <garsilva@embeddedor.com>
First post2017-05-09 23:50 +0200
Last post2017-05-24 05:40 +0200
Articles 3 — 3 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] target: remove dead code "Gustavo A. R. Silva" <garsilva@embeddedor.com> - 2017-05-09 23:50 +0200
    Re: [PATCH] target: remove dead code Tyrel Datwyler <tyreld@linux.vnet.ibm.com> - 2017-05-11 22:40 +0200
      Re: [PATCH] target: remove dead code "Nicholas A. Bellinger" <nab@linux-iscsi.org> - 2017-05-24 05:40 +0200

#1638413 — [PATCH] target: remove dead code

From"Gustavo A. R. Silva" <garsilva@embeddedor.com>
Date2017-05-09 23:50 +0200
Subject[PATCH] target: remove dead code
Message-ID<tFlb3-7uq-1@gated-at.bofh.it>
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 <garsilva@embeddedor.com>
---
 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)
-- 
2.5.0

[toc] | [next] | [standalone]


#1640010

FromTyrel Datwyler <tyreld@linux.vnet.ibm.com>
Date2017-05-11 22:40 +0200
Message-ID<tG32q-2HQ-5@gated-at.bofh.it>
In reply to#1638413
On 05/09/2017 02:46 PM, Gustavo A. R. Silva wrote:
> 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 <garsilva@embeddedor.com>
> ---

Reviewed-by: Tyrel Datwyler <tyreld@linux.vnet.ibm.com>

[toc] | [prev] | [next] | [standalone]


#1649077

From"Nicholas A. Bellinger" <nab@linux-iscsi.org>
Date2017-05-24 05:40 +0200
Message-ID<tKvjr-51b-13@gated-at.bofh.it>
In reply to#1640010
On Thu, 2017-05-11 at 13:39 -0700, Tyrel Datwyler wrote:
> On 05/09/2017 02:46 PM, Gustavo A. R. Silva wrote:
> > 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 <garsilva@embeddedor.com>
> > ---
> 
> Reviewed-by: Tyrel Datwyler <tyreld@linux.vnet.ibm.com>
> 

Applied to target-pending/for-next.

Thanks Gustavo + Tyrel.

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web