diff mbox

i40iw: Replace mdelay with msleep in i40iw_wait_pe_ready

Message ID 1514111980-30502-1-git-send-email-baijiaju1990@gmail.com (mailing list archive)
State Accepted
Delegated to: Doug Ledford
Headers show

Commit Message

Jia-Ju Bai Dec. 24, 2017, 10:39 a.m. UTC
i40iw_wait_pe_ready is not called in an interrupt handler 
nor holding a spinlock.
The function mdelay in it can be replaced with msleep, 
to reduce busy wait.

Signed-off-by: Jia-Ju Bai <baijiaju1990@gmail.com>
---
 drivers/infiniband/hw/i40iw/i40iw_main.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Leon Romanovsky Dec. 24, 2017, 11:57 a.m. UTC | #1
On Sun, Dec 24, 2017 at 06:39:40PM +0800, Jia-Ju Bai wrote:
> i40iw_wait_pe_ready is not called in an interrupt handler
> nor holding a spinlock.
> The function mdelay in it can be replaced with msleep,
> to reduce busy wait.
>
> Signed-off-by: Jia-Ju Bai <baijiaju1990@gmail.com>
> ---
>  drivers/infiniband/hw/i40iw/i40iw_main.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>

Thanks,
Reviewed-by: Leon Romanovsky <leonro@mellanox.com>
Shiraz Saleem Jan. 5, 2018, 5:44 p.m. UTC | #2
On Sun, Dec 24, 2017 at 03:39:40AM -0700, Jia-Ju Bai wrote:
> i40iw_wait_pe_ready is not called in an interrupt handler 
> nor holding a spinlock.
> The function mdelay in it can be replaced with msleep, 
> to reduce busy wait.
> 
> Signed-off-by: Jia-Ju Bai <baijiaju1990@gmail.com>
> ---
>  drivers/infiniband/hw/i40iw/i40iw_main.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>

Thanks!
Acked-by: Shiraz Saleem <shiraz.saleem@intel.com>

 
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Doug Ledford Jan. 5, 2018, 6:47 p.m. UTC | #3
On Fri, 2018-01-05 at 11:44 -0600, Shiraz Saleem wrote:
> On Sun, Dec 24, 2017 at 03:39:40AM -0700, Jia-Ju Bai wrote:
> > i40iw_wait_pe_ready is not called in an interrupt handler 
> > nor holding a spinlock.
> > The function mdelay in it can be replaced with msleep, 
> > to reduce busy wait.
> > 
> > Signed-off-by: Jia-Ju Bai <baijiaju1990@gmail.com>
> > ---
> >  drivers/infiniband/hw/i40iw/i40iw_main.c |    2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> 
> Thanks!
> Acked-by: Shiraz Saleem <shiraz.saleem@intel.com>
> 
>  

Thanks, applied.
diff mbox

Patch

diff --git a/drivers/infiniband/hw/i40iw/i40iw_main.c b/drivers/infiniband/hw/i40iw/i40iw_main.c
index e824296..8098bc1 100644
--- a/drivers/infiniband/hw/i40iw/i40iw_main.c
+++ b/drivers/infiniband/hw/i40iw/i40iw_main.c
@@ -1285,7 +1285,7 @@  static void i40iw_wait_pe_ready(struct i40iw_hw *hw)
 			      __LINE__, statuscpu2);
 		if ((statuscpu0 == 0x80) && (statuscpu1 == 0x80) && (statuscpu2 == 0x80))
 			break;	/* SUCCESS */
-		mdelay(1000);
+		msleep(1000);
 		retrycount++;
 	} while (retrycount < 14);
 	i40iw_wr32(hw, 0xb4040, 0x4C104C5);