Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1004841imu; Fri, 21 Dec 2018 10:52:41 -0800 (PST) X-Google-Smtp-Source: AFSGD/WFo5LoW98+g3hgmF2a7HhT2kTkA/jMO7PRyVqO2fiqtHuZ7I1CioWw85C4kWSP3oP9Pm1L X-Received: by 2002:a62:5e41:: with SMTP id s62mr3639837pfb.232.1545418361725; Fri, 21 Dec 2018 10:52:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1545418361; cv=none; d=google.com; s=arc-20160816; b=z5O77ijmM4oy9jo9DDTwuSNn8nOxyRVbp64OXM7wcug43W3QrZ3HPmCxS/SJeH9XaP hqoxKaC8CyoZL7WJ/1EQdCQzDjKKYuCauMGPvzjUSADSJLYGstmvgeHaIsaqQ3vV916U kG7yvUxMaTnHzhO1yN1WNTHT3kNIPlFoKlS4Wzp5MFOycV4yPRBOhJ4mfQg3Zrk9VpR7 +H92Mi0uCC00BPWe2MG+mpDubapg96WIk0AOqziCoKL5KPFg0MchdVDOcPpysup5yQbp zQ7zo4UkzoUMJruaPzeNiJLWHI9TAW3N4T3cdUPLadbzhqM9W/Xrbw9TLicEFsfA4JaE dW8Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:mime-version:user-agent:date:message-id:subject :from:cc:to; bh=0ZUNpLtYe6g9KZN5gDIqS5PAUVkQ7SG4tUw157JqYWI=; b=gQHTKrfYTUGovigSJ9vl1DPHm/TJFDXDgqDfzfa7fLIrkw879vIIsl3CYYH5KT9ViA AjkuT2IlrE8pmWPr/TtDYLJVvkXPYHp/+YDdkUfsTfqQMYKd242nHJnqC/fPxPDC6Mor LY3ugUWbkGvv+b6ay8K4bPmP71ofWOqHD0kIEBlmnKdLCRjkNJkWsJZKm8t0zaz42mnI 0iiq8QV0uH6FLL8BuhdrhfWU847ACsHU3y3JXXRGASERdDaJtpxP2snVyU99WcDQ21hu I3sU6zli2g7kkUSW8M/DVWClNmpA/FgXHZyncXSwwj9ItAN7Peq5ys8CQzpxgJPt0Nf2 /6jw== 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 a11si23455445pla.20.2018.12.21.10.52.13; Fri, 21 Dec 2018 10:52:41 -0800 (PST) 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 S2389438AbeLUKNt (ORCPT + 99 others); Fri, 21 Dec 2018 05:13:49 -0500 Received: from smtp3-g21.free.fr ([212.27.42.3]:28225 "EHLO smtp3-g21.free.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731874AbeLUKNt (ORCPT ); Fri, 21 Dec 2018 05:13:49 -0500 Received: from [192.168.108.68] (unknown [213.36.7.13]) (Authenticated sender: marc.w.gonzalez) by smtp3-g21.free.fr (Postfix) with ESMTPSA id 5CD3513F8BA; Fri, 21 Dec 2018 11:13:18 +0100 (CET) To: Kishon Vijay Abraham , Andy Gross , David Brown , Yaniv Gardi Cc: Vivek Gautam , Matt Wagantall , Mitchel Humpherys , Will Deacon , Bjorn Andersson , Arnd Bergmann , MSM , Linux ARM , LKML From: Marc Gonzalez Subject: [PATCH v1] phy: qcom-ufs: Use iopoll.h readl_poll_timeout macro Message-ID: <88cd3a2e-2acc-02ff-9f27-284d3b679d10@free.fr> Date: Fri, 21 Dec 2018 11:13:18 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The private copy of readl_poll_timeout is no longer needed. Use the implementation in iopoll.h instead. Signed-off-by: Marc Gonzalez --- drivers/phy/qualcomm/phy-qcom-ufs-i.h | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) diff --git a/drivers/phy/qualcomm/phy-qcom-ufs-i.h b/drivers/phy/qualcomm/phy-qcom-ufs-i.h index 681644e43248..f798fb64de94 100644 --- a/drivers/phy/qualcomm/phy-qcom-ufs-i.h +++ b/drivers/phy/qualcomm/phy-qcom-ufs-i.h @@ -23,24 +23,7 @@ #include #include #include - -#define readl_poll_timeout(addr, val, cond, sleep_us, timeout_us) \ -({ \ - ktime_t timeout = ktime_add_us(ktime_get(), timeout_us); \ - might_sleep_if(timeout_us); \ - for (;;) { \ - (val) = readl(addr); \ - if (cond) \ - break; \ - if (timeout_us && ktime_compare(ktime_get(), timeout) > 0) { \ - (val) = readl(addr); \ - break; \ - } \ - if (sleep_us) \ - usleep_range(DIV_ROUND_UP(sleep_us, 4), sleep_us); \ - } \ - (cond) ? 0 : -ETIMEDOUT; \ -}) +#include #define UFS_QCOM_PHY_CAL_ENTRY(reg, val) \ { \ -- 2.17.1