linux-usb.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] USB: storage: isd200: remove redundant assignment to variable sendToTransport
@ 2019-08-09 17:33 Colin King
  2019-08-09 19:29 ` Alan Stern
  0 siblings, 1 reply; 3+ messages in thread
From: Colin King @ 2019-08-09 17:33 UTC (permalink / raw)
  To: Alan Stern, Greg Kroah-Hartman, linux-usb, usb-storage
  Cc: kernel-janitors, linux-kernel

From: Colin Ian King <colin.king@canonical.com>

The variable sendToTransport is being initialized with a value that is
never read and is being re-assigned a little later on. The assignment
is redundant and hence can be removed.

Addresses-Coverity: ("Unused value")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 drivers/usb/storage/isd200.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/storage/isd200.c b/drivers/usb/storage/isd200.c
index 2b474d60b4db..28e1128d53a4 100644
--- a/drivers/usb/storage/isd200.c
+++ b/drivers/usb/storage/isd200.c
@@ -1511,7 +1511,7 @@ static int isd200_Initialization(struct us_data *us)
 
 static void isd200_ata_command(struct scsi_cmnd *srb, struct us_data *us)
 {
-	int sendToTransport = 1, orig_bufflen;
+	int sendToTransport, orig_bufflen;
 	union ata_cdb ataCdb;
 
 	/* Make sure driver was initialized */
-- 
2.20.1


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

* Re: [PATCH] USB: storage: isd200: remove redundant assignment to variable sendToTransport
  2019-08-09 17:33 [PATCH] USB: storage: isd200: remove redundant assignment to variable sendToTransport Colin King
@ 2019-08-09 19:29 ` Alan Stern
  2019-08-09 19:32   ` Colin Ian King
  0 siblings, 1 reply; 3+ messages in thread
From: Alan Stern @ 2019-08-09 19:29 UTC (permalink / raw)
  To: Colin King
  Cc: Greg Kroah-Hartman, linux-usb, usb-storage, kernel-janitors,
	linux-kernel

On Fri, 9 Aug 2019, Colin King wrote:

> From: Colin Ian King <colin.king@canonical.com>
> 
> The variable sendToTransport is being initialized with a value that is
> never read and is being re-assigned a little later on. The assignment
> is redundant and hence can be removed.
> 
> Addresses-Coverity: ("Unused value")

Of what use is that tag to general kernel developers?

> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
>  drivers/usb/storage/isd200.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/usb/storage/isd200.c b/drivers/usb/storage/isd200.c
> index 2b474d60b4db..28e1128d53a4 100644
> --- a/drivers/usb/storage/isd200.c
> +++ b/drivers/usb/storage/isd200.c
> @@ -1511,7 +1511,7 @@ static int isd200_Initialization(struct us_data *us)
>  
>  static void isd200_ata_command(struct scsi_cmnd *srb, struct us_data *us)
>  {
> -	int sendToTransport = 1, orig_bufflen;
> +	int sendToTransport, orig_bufflen;
>  	union ata_cdb ataCdb;
>  
>  	/* Make sure driver was initialized */

Otherwise:

Acked-by: Alan Stern <stern@rowland.harvard.edu>

Alan Stern


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

* Re: [PATCH] USB: storage: isd200: remove redundant assignment to variable sendToTransport
  2019-08-09 19:29 ` Alan Stern
@ 2019-08-09 19:32   ` Colin Ian King
  0 siblings, 0 replies; 3+ messages in thread
From: Colin Ian King @ 2019-08-09 19:32 UTC (permalink / raw)
  To: Alan Stern
  Cc: Greg Kroah-Hartman, linux-usb, usb-storage, kernel-janitors,
	linux-kernel

On 09/08/2019 20:29, Alan Stern wrote:
> On Fri, 9 Aug 2019, Colin King wrote:
> 
>> From: Colin Ian King <colin.king@canonical.com>
>>
>> The variable sendToTransport is being initialized with a value that is
>> never read and is being re-assigned a little later on. The assignment
>> is redundant and hence can be removed.
>>
>> Addresses-Coverity: ("Unused value")
> 
> Of what use is that tag to general kernel developers?

This is being informally used so that we can track which bugs are
getting found with specific static analysis tools.  The public coverity
bug reports also have a CID# number.  I'm working on range of coverity
builds (different build configs) that are not public because I can crank
multiple builds per day to find issues.

Colin

> 
>> Signed-off-by: Colin Ian King <colin.king@canonical.com>
>> ---
>>  drivers/usb/storage/isd200.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/usb/storage/isd200.c b/drivers/usb/storage/isd200.c
>> index 2b474d60b4db..28e1128d53a4 100644
>> --- a/drivers/usb/storage/isd200.c
>> +++ b/drivers/usb/storage/isd200.c
>> @@ -1511,7 +1511,7 @@ static int isd200_Initialization(struct us_data *us)
>>  
>>  static void isd200_ata_command(struct scsi_cmnd *srb, struct us_data *us)
>>  {
>> -	int sendToTransport = 1, orig_bufflen;
>> +	int sendToTransport, orig_bufflen;
>>  	union ata_cdb ataCdb;
>>  
>>  	/* Make sure driver was initialized */
> 
> Otherwise:
> 
> Acked-by: Alan Stern <stern@rowland.harvard.edu>
> 
> Alan Stern
> 


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

end of thread, other threads:[~2019-08-09 19:32 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-09 17:33 [PATCH] USB: storage: isd200: remove redundant assignment to variable sendToTransport Colin King
2019-08-09 19:29 ` Alan Stern
2019-08-09 19:32   ` Colin Ian King

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).