Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp3505749yba; Mon, 8 Apr 2019 21:47:17 -0700 (PDT) X-Google-Smtp-Source: APXvYqxPjpGRiy0KwM8+CQzmuMiv3QLJJJi1hgYB/am+++aDcxikkFFJ0kUg4c5w0azIgDqLYLme X-Received: by 2002:a63:c746:: with SMTP id v6mr31775306pgg.401.1554785237794; Mon, 08 Apr 2019 21:47:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554785237; cv=none; d=google.com; s=arc-20160816; b=Z3VBA+KkgLmvcfI85hfY2j57+0JMOGOwT88Wuu3bJOEXiNj31UXPxU0R3hgDmsjBvl VRB5g8CFcqutFmuUXpklTs3jGIbE2IkadYIz8RrTYN3jJCnBnYOcXYPD20rwMymFn5Vs gz9Fs/8FSU38GA1pIxnanGAw7E8Lkl+dGypiXkP9rRqAH9ilyfJWy1wXxTYd5YBAXMUs +JJzCD9sABFsj8vEgtJP3P5oLH7LMaSkjddBYN66VUy+dqGF69VPzJOZJkHbCZfSrGJh vIwJQPIzoAFM50ZiwYmwTLJwXtdE++kOwUDfZGtylkYI8CmoRQMSGNSP5Ln9bB9gkVKX z/Ug== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from; bh=Ik4BrfVwKqXLdzvJZ/iwEppNZ27x/WtiyCm/IaiwvKw=; b=MftoxKizhcVR/OyNwOD60oETcY67QVbxtnwO/e02WaI/+75K6L9WNHJYdXfhxKdvza b2dZQBO7ddbDB3Hcy2fp/gw0KUlyFvGWWrgMH8XSum/mtstMbwswsfPcGcUpmdO2jq6T PqVyhx5ShK4vMBzIb7yw0Kr1fXu4yvMW+D7qjmVo3r/ZVIddZk7P1N8GBXkucEXvTxUy AXmvqEP1tKOIBw1zsSxh6UJDHPqBmXPymvuvu/9Os8ObHyB5CybqMamnYFZKAz/euzyW ThWo8TLfQHH74hdQxvqbrwRJBRWmyCooD/mGrHhx1Cppt5BtMHD+9/+AtEHb7YNzF6t+ 24mw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m15si29004975pgj.126.2019.04.08.21.47.02; Mon, 08 Apr 2019 21:47:17 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726967AbfDIDsm (ORCPT + 99 others); Mon, 8 Apr 2019 23:48:42 -0400 Received: from www.osadl.org ([62.245.132.105]:36291 "EHLO www.osadl.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726456AbfDIDsm (ORCPT ); Mon, 8 Apr 2019 23:48:42 -0400 Received: from localhost.localdomain (178.115.242.59.static.drei.at [178.115.242.59]) by www.osadl.org (8.13.8/8.13.8/OSADL-2007092901) with ESMTP id x393mTx8012040; Tue, 9 Apr 2019 05:48:29 +0200 From: Nicholas Mc Guire To: Samuel Ortiz Cc: Daniel Mack , linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org, Nicholas Mc Guire Subject: [PATCH 1/2] NFC: st95hf: use msleep for long delay Date: Tue, 9 Apr 2019 05:48:18 +0200 Message-Id: <1554781699-42604-1-git-send-email-hofrat@opentech.at> X-Mailer: git-send-email 2.1.4 X-Spam-Status: No, score=-4.2 required=6.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_PASS autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on www.osadl.org Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org usleep_ranges is backed by hrtimers - for a delay of 50ms notably in a loop using a hrtimer is of no benefit and msleep() should be fine here (see Documentation/timers/timers-howto.txt). Signed-off-by: Nicholas Mc Guire --- Problem located with an experimental coccinelle script Patch was compile tested with: x86_64_defconfig + SPI=y, NFC=y, NFC_DIGITAL=y, NFC_ST95HF=m Patch is against 5.1-rc3 (localversion-next is -next-20190408) drivers/nfc/st95hf/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/nfc/st95hf/core.c b/drivers/nfc/st95hf/core.c index a50a95c..34bf1d7 100644 --- a/drivers/nfc/st95hf/core.c +++ b/drivers/nfc/st95hf/core.c @@ -535,7 +535,7 @@ static int st95hf_por_sequence(struct st95hf_context *st95context) st95hf_send_spi_reset_sequence(st95context); /* delay of 50 milisecond */ - usleep_range(50000, 51000); + msleep(50); } while (nth_attempt++ < 3); return -ETIMEDOUT; -- 2.1.4