lkml.org 
[lkml]   [2023]   [Mar]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 2/2] rtc: pcf8523: remove unnecessary OR operation
Date
The value variable is initialized to 0 and it is not used to set any
other bits rather than the one that defines the capacitor value. Setting
this capacitor value is the only purpose of the function where the
variable is defined and therefore the OR operation does not apply as a
way to foresee functionality extensions either.

Signed-off-by: Javier Carrasco <javier.carrasco@wolfvision.net>
---
drivers/rtc/rtc-pcf8523.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/rtc/rtc-pcf8523.c b/drivers/rtc/rtc-pcf8523.c
index ccb5aa690433..e7115ebef707 100644
--- a/drivers/rtc/rtc-pcf8523.c
+++ b/drivers/rtc/rtc-pcf8523.c
@@ -65,7 +65,7 @@ static int pcf8523_load_capacitance(struct pcf8523 *pcf8523, struct device_node
load);
fallthrough;
case 12500:
- value |= PCF8523_CONTROL1_CAP_SEL;
+ value = PCF8523_CONTROL1_CAP_SEL;
break;
case 7000:
break;
--
2.37.2
\
 
 \ /
  Last update: 2023-03-27 01:00    [W:0.078 / U:0.772 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site