projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5140b46
)
i2c: mux: ltc4306: Remove an unnecessary ternary operator
author
Ruan Jinjie
<ruanjinjie@huawei.com>
Tue, 1 Aug 2023 02:53:28 +0000
(10:53 +0800)
committer
Andi Shyti
<andi.shyti@kernel.org>
Tue, 8 Aug 2023 13:36:58 +0000
(15:36 +0200)
The true or false judgement of the ternary operator is unnecessary
in C language semantics. So remove it to clean Code.
Signed-off-by: Ruan Jinjie <ruanjinjie@huawei.com>
Acked-by: Andi Shyti <andi.shyti@kernel.org>
Link:
https://lore.kernel.org/r/20230801025328.3380963-1-ruanjinjie@huawei.com
Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
drivers/i2c/muxes/i2c-mux-ltc4306.c
patch
|
blob
|
history
diff --git
a/drivers/i2c/muxes/i2c-mux-ltc4306.c
b/drivers/i2c/muxes/i2c-mux-ltc4306.c
index 5a03031519bee0e44eae93352142965c1f58291f..637e25506490d9a0e89ab5004f3ca190cd1f0880 100644
(file)
--- a/
drivers/i2c/muxes/i2c-mux-ltc4306.c
+++ b/
drivers/i2c/muxes/i2c-mux-ltc4306.c
@@
-62,7
+62,7
@@
static const struct chip_desc chips[] = {
static bool ltc4306_is_volatile_reg(struct device *dev, unsigned int reg)
{
- return
(reg == LTC_REG_CONFIG) ? true : false
;
+ return
reg == LTC_REG_CONFIG
;
}
static const struct regmap_config ltc4306_regmap_config = {