linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH linux-next] USB: Delete the useless assignment to "nbytes"
@ 2021-11-11 15:11 cgel.zte
  2021-11-17 13:32 ` Greg Kroah-Hartman
  0 siblings, 1 reply; 2+ messages in thread
From: cgel.zte @ 2021-11-11 15:11 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Stephen Rothwell, linux-usb, linux-kernel, luo penghao, Zeal Robot

From: luo penghao <luo.penghao@zte.com.cn>

The assignment of the local variable "nbytes" in the if statement
will not be used

Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: luo penghao <luo.penghao@zte.com.cn>
---
 drivers/usb/mon/mon_bin.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/usb/mon/mon_bin.c b/drivers/usb/mon/mon_bin.c
index f48a23a..b8ba0f7 100644
--- a/drivers/usb/mon/mon_bin.c
+++ b/drivers/usb/mon/mon_bin.c
@@ -845,7 +845,6 @@ static ssize_t mon_bin_read(struct file *file, char __user *buf,
 			mutex_unlock(&rp->fetch_lock);
 			return -EFAULT;
 		}
-		nbytes -= step_len;
 		buf += step_len;
 		rp->b_read += step_len;
 		done += step_len;
-- 
2.15.2



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

* Re: [PATCH linux-next] USB: Delete the useless assignment to "nbytes"
  2021-11-11 15:11 [PATCH linux-next] USB: Delete the useless assignment to "nbytes" cgel.zte
@ 2021-11-17 13:32 ` Greg Kroah-Hartman
  0 siblings, 0 replies; 2+ messages in thread
From: Greg Kroah-Hartman @ 2021-11-17 13:32 UTC (permalink / raw)
  To: cgel.zte
  Cc: Stephen Rothwell, linux-usb, linux-kernel, luo penghao, Zeal Robot

On Thu, Nov 11, 2021 at 03:11:24PM +0000, cgel.zte@gmail.com wrote:
> From: luo penghao <luo.penghao@zte.com.cn>
> 
> The assignment of the local variable "nbytes" in the if statement
> will not be used
> 
> Reported-by: Zeal Robot <zealci@zte.com.cn>
> Signed-off-by: luo penghao <luo.penghao@zte.com.cn>
> ---
>  drivers/usb/mon/mon_bin.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/drivers/usb/mon/mon_bin.c b/drivers/usb/mon/mon_bin.c
> index f48a23a..b8ba0f7 100644
> --- a/drivers/usb/mon/mon_bin.c
> +++ b/drivers/usb/mon/mon_bin.c
> @@ -845,7 +845,6 @@ static ssize_t mon_bin_read(struct file *file, char __user *buf,
>  			mutex_unlock(&rp->fetch_lock);
>  			return -EFAULT;
>  		}
> -		nbytes -= step_len;
>  		buf += step_len;
>  		rp->b_read += step_len;
>  		done += step_len;
> -- 
> 2.15.2
> 
> 

This patch is not correct (it's either wrong, or incomplete).  Please
fix your "robot" to not send changes that you have not properly
verified.

thanks,

greg k-h

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

end of thread, other threads:[~2021-11-17 13:32 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-11 15:11 [PATCH linux-next] USB: Delete the useless assignment to "nbytes" cgel.zte
2021-11-17 13:32 ` Greg Kroah-Hartman

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