* [PATCH] phy: qualcomm: Adjust indentation in read_poll_timeout
@ 2019-12-18 1:36 Nathan Chancellor
2019-12-18 6:29 ` Bjorn Andersson
0 siblings, 1 reply; 3+ messages in thread
From: Nathan Chancellor @ 2019-12-18 1:36 UTC (permalink / raw)
To: Andy Gross, Bjorn Andersson
Cc: Kishon Vijay Abraham I, linux-arm-msm, linux-kernel,
clang-built-linux, Nathan Chancellor
Clang warns:
../drivers/phy/qualcomm/phy-qcom-apq8064-sata.c:83:4: warning:
misleading indentation; statement is not part of the previous 'if'
[-Wmisleading-indentation]
usleep_range(DELAY_INTERVAL_US, DELAY_INTERVAL_US + 50);
^
../drivers/phy/qualcomm/phy-qcom-apq8064-sata.c:80:3: note: previous
statement is here
if (readl_relaxed(addr) & mask)
^
1 warning generated.
This warning occurs because there is a space after the tab on this line.
Remove it so that the indentation is consistent with the Linux kernel
coding style and clang no longer warns.
Fixes: 1de990d8a169 ("phy: qcom: Add driver for QCOM APQ8064 SATA PHY")
Link: https://github.com/ClangBuiltLinux/linux/issues/816
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
---
drivers/phy/qualcomm/phy-qcom-apq8064-sata.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/phy/qualcomm/phy-qcom-apq8064-sata.c b/drivers/phy/qualcomm/phy-qcom-apq8064-sata.c
index 42bc5150dd92..febe0aef68d4 100644
--- a/drivers/phy/qualcomm/phy-qcom-apq8064-sata.c
+++ b/drivers/phy/qualcomm/phy-qcom-apq8064-sata.c
@@ -80,7 +80,7 @@ static int read_poll_timeout(void __iomem *addr, u32 mask)
if (readl_relaxed(addr) & mask)
return 0;
- usleep_range(DELAY_INTERVAL_US, DELAY_INTERVAL_US + 50);
+ usleep_range(DELAY_INTERVAL_US, DELAY_INTERVAL_US + 50);
} while (!time_after(jiffies, timeout));
return (readl_relaxed(addr) & mask) ? 0 : -ETIMEDOUT;
--
2.24.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] phy: qualcomm: Adjust indentation in read_poll_timeout
2019-12-18 1:36 [PATCH] phy: qualcomm: Adjust indentation in read_poll_timeout Nathan Chancellor
@ 2019-12-18 6:29 ` Bjorn Andersson
2019-12-20 11:25 ` Kishon Vijay Abraham I
0 siblings, 1 reply; 3+ messages in thread
From: Bjorn Andersson @ 2019-12-18 6:29 UTC (permalink / raw)
To: Nathan Chancellor
Cc: Andy Gross, Kishon Vijay Abraham I, linux-arm-msm, linux-kernel,
clang-built-linux
On Tue 17 Dec 17:36 PST 2019, Nathan Chancellor wrote:
> Clang warns:
>
> ../drivers/phy/qualcomm/phy-qcom-apq8064-sata.c:83:4: warning:
> misleading indentation; statement is not part of the previous 'if'
> [-Wmisleading-indentation]
> usleep_range(DELAY_INTERVAL_US, DELAY_INTERVAL_US + 50);
> ^
> ../drivers/phy/qualcomm/phy-qcom-apq8064-sata.c:80:3: note: previous
> statement is here
> if (readl_relaxed(addr) & mask)
> ^
> 1 warning generated.
>
> This warning occurs because there is a space after the tab on this line.
> Remove it so that the indentation is consistent with the Linux kernel
> coding style and clang no longer warns.
>
Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
> Fixes: 1de990d8a169 ("phy: qcom: Add driver for QCOM APQ8064 SATA PHY")
> Link: https://github.com/ClangBuiltLinux/linux/issues/816
> Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
> ---
> drivers/phy/qualcomm/phy-qcom-apq8064-sata.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/phy/qualcomm/phy-qcom-apq8064-sata.c b/drivers/phy/qualcomm/phy-qcom-apq8064-sata.c
> index 42bc5150dd92..febe0aef68d4 100644
> --- a/drivers/phy/qualcomm/phy-qcom-apq8064-sata.c
> +++ b/drivers/phy/qualcomm/phy-qcom-apq8064-sata.c
> @@ -80,7 +80,7 @@ static int read_poll_timeout(void __iomem *addr, u32 mask)
> if (readl_relaxed(addr) & mask)
> return 0;
>
> - usleep_range(DELAY_INTERVAL_US, DELAY_INTERVAL_US + 50);
> + usleep_range(DELAY_INTERVAL_US, DELAY_INTERVAL_US + 50);
> } while (!time_after(jiffies, timeout));
>
> return (readl_relaxed(addr) & mask) ? 0 : -ETIMEDOUT;
> --
> 2.24.1
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] phy: qualcomm: Adjust indentation in read_poll_timeout
2019-12-18 6:29 ` Bjorn Andersson
@ 2019-12-20 11:25 ` Kishon Vijay Abraham I
0 siblings, 0 replies; 3+ messages in thread
From: Kishon Vijay Abraham I @ 2019-12-20 11:25 UTC (permalink / raw)
To: Bjorn Andersson, Nathan Chancellor
Cc: Andy Gross, linux-arm-msm, linux-kernel, clang-built-linux
On 18/12/19 11:59 am, Bjorn Andersson wrote:
> On Tue 17 Dec 17:36 PST 2019, Nathan Chancellor wrote:
>
>> Clang warns:
>>
>> ../drivers/phy/qualcomm/phy-qcom-apq8064-sata.c:83:4: warning:
>> misleading indentation; statement is not part of the previous 'if'
>> [-Wmisleading-indentation]
>> usleep_range(DELAY_INTERVAL_US, DELAY_INTERVAL_US + 50);
>> ^
>> ../drivers/phy/qualcomm/phy-qcom-apq8064-sata.c:80:3: note: previous
>> statement is here
>> if (readl_relaxed(addr) & mask)
>> ^
>> 1 warning generated.
>>
>> This warning occurs because there is a space after the tab on this line.
>> Remove it so that the indentation is consistent with the Linux kernel
>> coding style and clang no longer warns.
>>
>
> Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
merged, thanks!
-Kishon
>
>> Fixes: 1de990d8a169 ("phy: qcom: Add driver for QCOM APQ8064 SATA PHY")
>> Link: https://github.com/ClangBuiltLinux/linux/issues/816
>> Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
>> ---
>> drivers/phy/qualcomm/phy-qcom-apq8064-sata.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/phy/qualcomm/phy-qcom-apq8064-sata.c b/drivers/phy/qualcomm/phy-qcom-apq8064-sata.c
>> index 42bc5150dd92..febe0aef68d4 100644
>> --- a/drivers/phy/qualcomm/phy-qcom-apq8064-sata.c
>> +++ b/drivers/phy/qualcomm/phy-qcom-apq8064-sata.c
>> @@ -80,7 +80,7 @@ static int read_poll_timeout(void __iomem *addr, u32 mask)
>> if (readl_relaxed(addr) & mask)
>> return 0;
>>
>> - usleep_range(DELAY_INTERVAL_US, DELAY_INTERVAL_US + 50);
>> + usleep_range(DELAY_INTERVAL_US, DELAY_INTERVAL_US + 50);
>> } while (!time_after(jiffies, timeout));
>>
>> return (readl_relaxed(addr) & mask) ? 0 : -ETIMEDOUT;
>> --
>> 2.24.1
>>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-12-20 11:23 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-18 1:36 [PATCH] phy: qualcomm: Adjust indentation in read_poll_timeout Nathan Chancellor
2019-12-18 6:29 ` Bjorn Andersson
2019-12-20 11:25 ` Kishon Vijay Abraham I
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).