Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752242AbdLXKgv (ORCPT ); Sun, 24 Dec 2017 05:36:51 -0500 Received: from mail-pl0-f68.google.com ([209.85.160.68]:47085 "EHLO mail-pl0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750941AbdLXKgr (ORCPT ); Sun, 24 Dec 2017 05:36:47 -0500 X-Google-Smtp-Source: ACJfBovHLnybSEEq19Y4Y//JdvSDipgDwyDX1HYpBZlIIpA82QgWpyZ7Ud3U4Mlh3hM1PHqCHc7sgA== From: Jia-Ju Bai To: faisal.latif@intel.com, shiraz.saleem@intel.com, dledford@redhat.com, jgg@ziepe.ca Cc: linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org, Jia-Ju Bai Subject: [PATCH] i40iw: Replace mdelay with msleep in i40iw_wait_pe_ready Date: Sun, 24 Dec 2017 18:39:40 +0800 Message-Id: <1514111980-30502-1-git-send-email-baijiaju1990@gmail.com> X-Mailer: git-send-email 1.7.9.5 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 877 Lines: 25 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 --- drivers/infiniband/hw/i40iw/i40iw_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); -- 1.7.9.5