diff mbox

[OPW,kernel] Staging:serqt_usb2: Correct double assignment in serqt_usb2.c

Message ID 20140308144913.GA11190@winterfell
State New, archived
Headers show

Commit Message

Iulia Manda March 8, 2014, 2:49 p.m. UTC
Remove n_sw_flow_out first assignment, which is redundant.
I have used da.cocci patch.

Signed-off-by: Iulia Manda <iulia.manda21@gmail.com>
---
 drivers/staging/serqt_usb2/serqt_usb2.c |    1 -
 1 file changed, 1 deletion(-)

Comments

Sarah Sharp March 8, 2014, 9:29 p.m. UTC | #1
On Sat, Mar 08, 2014 at 04:49:13PM +0200, Iulia Manda wrote:
> Remove n_sw_flow_out first assignment, which is redundant.
> I have used da.cocci patch.

This actually looks like a bug, and the driver writer would need to
explain what n_sw_flow_out should actually be set to.  I would leave the
code in tact unless you're going to figure out how to fix it.

Sarah Sharp

> 
> Signed-off-by: Iulia Manda <iulia.manda21@gmail.com>
> ---
>  drivers/staging/serqt_usb2/serqt_usb2.c |    1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/drivers/staging/serqt_usb2/serqt_usb2.c b/drivers/staging/serqt_usb2/serqt_usb2.c
> index f0fcbf7..48120f8 100644
> --- a/drivers/staging/serqt_usb2/serqt_usb2.c
> +++ b/drivers/staging/serqt_usb2/serqt_usb2.c
> @@ -653,7 +653,6 @@ static int box_set_sw_flow_ctrl(struct usb_serial *serial, __u16 index,
>  	__u16 n_sw_flow_out;
>  	int result;
>  
> -	n_sw_flow_out = start_char << 8;
>  	n_sw_flow_out = (unsigned short)stop_char;
>  
>  	result =
> -- 
> 1.7.10.4
> 
> -- 
> You received this message because you are subscribed to the Google Groups "opw-kernel" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to opw-kernel+unsubscribe@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
Julia Lawall March 8, 2014, 10:04 p.m. UTC | #2
On Sat, 8 Mar 2014, Iulia Manda wrote:

> Remove n_sw_flow_out first assignment, which is redundant.
> I have used da.cocci patch.

This one is also not part of the Linux kernel.

julia

> 
> Signed-off-by: Iulia Manda <iulia.manda21@gmail.com>
> ---
>  drivers/staging/serqt_usb2/serqt_usb2.c |    1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/drivers/staging/serqt_usb2/serqt_usb2.c b/drivers/staging/serqt_usb2/serqt_usb2.c
> index f0fcbf7..48120f8 100644
> --- a/drivers/staging/serqt_usb2/serqt_usb2.c
> +++ b/drivers/staging/serqt_usb2/serqt_usb2.c
> @@ -653,7 +653,6 @@ static int box_set_sw_flow_ctrl(struct usb_serial *serial, __u16 index,
>  	__u16 n_sw_flow_out;
>  	int result;
>  
> -	n_sw_flow_out = start_char << 8;
>  	n_sw_flow_out = (unsigned short)stop_char;
>  
>  	result =
> -- 
> 1.7.10.4
> 
> -- 
> You received this message because you are subscribed to the Google Groups "opw-kernel" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to opw-kernel+unsubscribe@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>
diff mbox

Patch

diff --git a/drivers/staging/serqt_usb2/serqt_usb2.c b/drivers/staging/serqt_usb2/serqt_usb2.c
index f0fcbf7..48120f8 100644
--- a/drivers/staging/serqt_usb2/serqt_usb2.c
+++ b/drivers/staging/serqt_usb2/serqt_usb2.c
@@ -653,7 +653,6 @@  static int box_set_sw_flow_ctrl(struct usb_serial *serial, __u16 index,
 	__u16 n_sw_flow_out;
 	int result;
 
-	n_sw_flow_out = start_char << 8;
 	n_sw_flow_out = (unsigned short)stop_char;
 
 	result =