OSDN Git Service
(root)
/
uclinux-h8
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
825156a
)
rtc: da9063: Simplify bool comparison
author
Kaixu Xia
<kaixuxia@tencent.com>
Fri, 6 Nov 2020 08:00:37 +0000
(16:00 +0800)
committer
Alexandre Belloni
<alexandre.belloni@bootlin.com>
Sat, 14 Nov 2020 22:31:33 +0000
(23:31 +0100)
Fix the following coccicheck warning:
./drivers/rtc/rtc-da9063.c:246:5-18: WARNING: Comparison to bool
Reported-by: Tosk Robot <tencent_os_robot@tencent.com>
Signed-off-by: Kaixu Xia <kaixuxia@tencent.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Link:
https://lore.kernel.org/r/1604649637-1014-1-git-send-email-kaixuxia@tencent.com
drivers/rtc/rtc-da9063.c
patch
|
blob
|
history
diff --git
a/drivers/rtc/rtc-da9063.c
b/drivers/rtc/rtc-da9063.c
index
046b1d4
..
6f0a3a7
100644
(file)
--- a/
drivers/rtc/rtc-da9063.c
+++ b/
drivers/rtc/rtc-da9063.c
@@
-243,7
+243,7
@@
static int da9063_rtc_read_time(struct device *dev, struct rtc_time *tm)
al_secs = rtc_tm_to_time64(&rtc->alarm_time);
/* handle the rtc synchronisation delay */
- if (rtc->rtc_sync
== true
&& al_secs - tm_secs == 1)
+ if (rtc->rtc_sync && al_secs - tm_secs == 1)
memcpy(tm, &rtc->alarm_time, sizeof(struct rtc_time));
else
rtc->rtc_sync = false;