public inbox for linux-i2c@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH -next] i2c: mux: ltc4306: Remove an unnecessary ternary operator
@ 2023-08-01  2:53 Ruan Jinjie
  2023-08-05 11:53 ` Andi Shyti
  2023-08-05 11:55 ` Andi Shyti
  0 siblings, 2 replies; 4+ messages in thread
From: Ruan Jinjie @ 2023-08-01  2:53 UTC (permalink / raw)
  To: michael.hennerich, peda, linux-i2c; +Cc: ruanjinjie

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>
---
 drivers/i2c/muxes/i2c-mux-ltc4306.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/i2c/muxes/i2c-mux-ltc4306.c b/drivers/i2c/muxes/i2c-mux-ltc4306.c
index 5a03031519be..637e25506490 100644
--- 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 = {
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-08-14 15:17 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-01  2:53 [PATCH -next] i2c: mux: ltc4306: Remove an unnecessary ternary operator Ruan Jinjie
2023-08-05 11:53 ` Andi Shyti
2023-08-05 11:55 ` Andi Shyti
2023-08-14 15:15   ` Wolfram Sang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox