[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20211117142115.694316-1-anders.roxell@linaro.org>
Date: Wed, 17 Nov 2021 15:21:15 +0100
From: Anders Roxell <anders.roxell@...aro.org>
To: thierry.reding@...il.com, jonathanh@...dia.com
Cc: nathan@...nel.org, ndesaulniers@...gle.com,
linux-tegra@...r.kernel.org, linux-kernel@...r.kernel.org,
llvm@...ts.linux.dev, Anders Roxell <anders.roxell@...aro.org>
Subject: [PATCH] soc/tegra: fuse: fix bitwice vs. logical warning
When building with clang-13 the compiler warns about:
drivers/soc/tegra/fuse/speedo-tegra20.c:72:9: warning: use of bitwise '|' with boolean operands [-Wbitwise-instead-of-logical]
reg = tegra_fuse_read_spare(i) |
^~~~~~~~~~~~~~~~~~~~~~~~~~
||
This should be a logical OR so change it to fix the warning.
Fixes: 7e939de1b2bb ("soc/tegra: fuse: Unify Tegra20 and Tegra30 drivers")
Signed-off-by: Anders Roxell <anders.roxell@...aro.org>
---
drivers/soc/tegra/fuse/speedo-tegra20.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/soc/tegra/fuse/speedo-tegra20.c b/drivers/soc/tegra/fuse/speedo-tegra20.c
index 2546bddbab93..4984246605ae 100644
--- a/drivers/soc/tegra/fuse/speedo-tegra20.c
+++ b/drivers/soc/tegra/fuse/speedo-tegra20.c
@@ -69,7 +69,7 @@ void __init tegra20_init_speedo_data(struct tegra_sku_info *sku_info)
val = 0;
for (i = CPU_SPEEDO_MSBIT; i >= CPU_SPEEDO_LSBIT; i--) {
- reg = tegra_fuse_read_spare(i) |
+ reg = tegra_fuse_read_spare(i) ||
tegra_fuse_read_spare(i + CPU_SPEEDO_REDUND_OFFS);
val = (val << 1) | (reg & 0x1);
}
@@ -84,7 +84,7 @@ void __init tegra20_init_speedo_data(struct tegra_sku_info *sku_info)
val = 0;
for (i = SOC_SPEEDO_MSBIT; i >= SOC_SPEEDO_LSBIT; i--) {
- reg = tegra_fuse_read_spare(i) |
+ reg = tegra_fuse_read_spare(i) ||
tegra_fuse_read_spare(i + SOC_SPEEDO_REDUND_OFFS);
val = (val << 1) | (reg & 0x1);
}
--
2.33.0
Powered by blists - more mailing lists