Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751172AbdFYPNz (ORCPT ); Sun, 25 Jun 2017 11:13:55 -0400 Received: from mail-wr0-f196.google.com ([209.85.128.196]:33005 "EHLO mail-wr0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750763AbdFYPNy (ORCPT ); Sun, 25 Jun 2017 11:13:54 -0400 From: Karim Eshapa To: oss@buserror.net Cc: claudiu.manoil@nxp.com, roy.pledge@nxp.com, colin.king@canonical.com, linuxppc-dev@lists.ozlabs.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Karim Eshapa Subject: [PATCH] soc/qman: Sleep instead of stuck hacking jiffies. Date: Sun, 25 Jun 2017 17:13:42 +0200 Message-Id: <1498403622-2878-1-git-send-email-karim.eshapa@gmail.com> X-Mailer: git-send-email 2.7.4 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 746 Lines: 27 Use msleep() instead of stucking with long delay will be more efficient. Signed-off-by: Karim Eshapa --- drivers/soc/fsl/qbman/qman.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers/soc/fsl/qbman/qman.c b/drivers/soc/fsl/qbman/qman.c index 3d891db..18d391e 100644 --- a/drivers/soc/fsl/qbman/qman.c +++ b/drivers/soc/fsl/qbman/qman.c @@ -1084,11 +1084,7 @@ static int drain_mr_fqrni(struct qm_portal *p) * entries well before the ring has been fully consumed, so * we're being *really* paranoid here. */ - u64 now, then = jiffies; - - do { - now = jiffies; - } while ((then + 10000) > now); + msleep(1); msg = qm_mr_current(p); if (!msg) return 0; -- 2.7.4