From: Dan Carpenter <dan.carpenter@oracle.com>
To: Rupesh Gujare <rupesh.gujare@atmel.com>
Cc: devel@linuxdriverproject.org, gregkh@linuxfoundation.org,
linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 4/4] staging: ozwpan: Return correct hub status.
Date: Mon, 5 Aug 2013 21:56:43 +0300 [thread overview]
Message-ID: <20130805185643.GM5051@mwanda> (raw)
In-Reply-To: <1375724415-10801-5-git-send-email-rupesh.gujare@atmel.com>
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@atmel.com>
> ---
> 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
next prev parent reply other threads:[~2013-08-05 18:57 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-05 17:40 [PATCH 0/4] staging: ozwpan: Fix crash issues Rupesh Gujare
2013-08-05 17:40 ` [PATCH 1/4] staging: ozwpan: Fixes crash due to invalid port aceess Rupesh Gujare
2013-08-05 18:20 ` Dan Carpenter
2013-08-05 17:40 ` [PATCH 2/4] staging: ozwpan: Increment port number for new device Rupesh Gujare
2013-08-05 17:53 ` Dan Carpenter
2013-08-05 18:43 ` Rupesh Gujare
2013-08-05 20:23 ` Dan Carpenter
2013-08-05 20:33 ` Dan Carpenter
2013-08-06 10:26 ` Rupesh Gujare
2013-08-06 10:41 ` Dan Carpenter
2013-08-12 21:57 ` Greg KH
2013-08-05 17:40 ` [PATCH 3/4] staging: ozwpan: Reset port configuration number Rupesh Gujare
2013-08-05 18:21 ` Dan Carpenter
2013-08-05 18:58 ` Rupesh Gujare
2013-08-05 17:40 ` [PATCH 4/4] staging: ozwpan: Return correct hub status Rupesh Gujare
2013-08-05 18:56 ` Dan Carpenter [this message]
2013-08-05 19:00 ` Rupesh Gujare
2013-08-05 19:28 ` Dan Carpenter
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20130805185643.GM5051@mwanda \
--to=dan.carpenter@oracle.com \
--cc=devel@linuxdriverproject.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=rupesh.gujare@atmel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox