Re: [PATCH 4/4] staging: ozwpan: Return correct hub status.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Aug 05, 2013 at 06:40:15PM +0100, Rupesh Gujare wrote:
> Fix a bug where we were not returning correct hub status
> for 8th port.

What are the user visible effects of this bug?

Style nits below.

> 
> Signed-off-by: Rupesh Gujare <rupesh.gujare@xxxxxxxxx>
> ---
>  drivers/staging/ozwpan/ozhcd.c |   11 +++++++++--
>  1 file changed, 9 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/staging/ozwpan/ozhcd.c b/drivers/staging/ozwpan/ozhcd.c
> index b060e43..2f93a00 100644
> --- a/drivers/staging/ozwpan/ozhcd.c
> +++ b/drivers/staging/ozwpan/ozhcd.c
> @@ -1871,17 +1871,24 @@ static int oz_hcd_hub_status_data(struct usb_hcd *hcd, char *buf)
>  	int i;
>  
>  	buf[0] = 0;
> +	buf[1] = 0;
>  
>  	spin_lock_bh(&ozhcd->hcd_lock);
>  	for (i = 0; i < OZ_NB_PORTS; i++) {
>  		if (ozhcd->ports[i].flags & OZ_PORT_F_CHANGED) {
>  			oz_dbg(HUB, "Port %d changed\n", i);
>  			ozhcd->ports[i].flags &= ~OZ_PORT_F_CHANGED;
> -			buf[0] |= 1<<(i+1);
> +			if (i < 7)
> +				buf[0] |= 1 << (i+1);

Put spaces around math operations:
				buf[0] |= 1 << (i + 1);

> +			else
> +				buf[1] |= 1 << (i-7);

				buf[1] |= 1 << (i - 7);

regards,
dan carpenter

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux