linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] target: remove dead code
@ 2017-05-09 21:46 Gustavo A. R. Silva
  2017-05-11 20:39 ` Tyrel Datwyler
  0 siblings, 1 reply; 3+ messages in thread
From: Gustavo A. R. Silva @ 2017-05-09 21:46 UTC (permalink / raw)
  To: Nicholas A. Bellinger
  Cc: linux-scsi, target-devel, linux-kernel, Gustavo A. R. Silva

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

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] target: remove dead code
  2017-05-09 21:46 [PATCH] target: remove dead code Gustavo A. R. Silva
@ 2017-05-11 20:39 ` Tyrel Datwyler
  2017-05-24  3:30   ` Nicholas A. Bellinger
  0 siblings, 1 reply; 3+ messages in thread
From: Tyrel Datwyler @ 2017-05-11 20:39 UTC (permalink / raw)
  To: Gustavo A. R. Silva, Nicholas A. Bellinger
  Cc: linux-scsi, target-devel, linux-kernel

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>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] target: remove dead code
  2017-05-11 20:39 ` Tyrel Datwyler
@ 2017-05-24  3:30   ` Nicholas A. Bellinger
  0 siblings, 0 replies; 3+ messages in thread
From: Nicholas A. Bellinger @ 2017-05-24  3:30 UTC (permalink / raw)
  To: Tyrel Datwyler
  Cc: Gustavo A. R. Silva, linux-scsi, target-devel, linux-kernel

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.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-05-24  3:30 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-09 21:46 [PATCH] target: remove dead code Gustavo A. R. Silva
2017-05-11 20:39 ` Tyrel Datwyler
2017-05-24  3:30   ` Nicholas A. Bellinger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).