summary refs log tree commit diff
path: root/drivers/rtc/rtc-sc27xx.c
diff options
context:
space:
mode:
authorKaixu Xia <kaixuxia@tencent.com>2020-11-06 15:30:54 +0800
committerAlexandre Belloni <alexandre.belloni@bootlin.com>2020-11-14 23:30:10 +0100
commit825156a5eeded9bcb55e9c36d4b4b72bf20bcba6 (patch)
tree7466e5090f21fbe275f34341de38c7d4381f6b08 /drivers/rtc/rtc-sc27xx.c
parent28d211919e422f58c1e6c900e5810eee4f1ce4c8 (diff)
downloadlinux-825156a5eeded9bcb55e9c36d4b4b72bf20bcba6.tar.gz
rtc: sc27xx: Remove unnecessary conversion to bool
Here we could use the '!=' expression to fix the following coccicheck
warning:

./drivers/rtc/rtc-sc27xx.c:566:50-55: WARNING: conversion to bool not needed here

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/1604647854-876-1-git-send-email-kaixuxia@tencent.com
Diffstat (limited to 'drivers/rtc/rtc-sc27xx.c')
-rw-r--r--drivers/rtc/rtc-sc27xx.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/rtc/rtc-sc27xx.c b/drivers/rtc/rtc-sc27xx.c
index 36810dd40cd3..6e65f68ea86d 100644
--- a/drivers/rtc/rtc-sc27xx.c
+++ b/drivers/rtc/rtc-sc27xx.c
@@ -563,7 +563,7 @@ static int sprd_rtc_check_power_down(struct sprd_rtc *rtc)
 	 * means the RTC has been powered down, so the RTC time values are
 	 * invalid.
 	 */
-	rtc->valid = val == SPRD_RTC_POWER_RESET_VALUE ? false : true;
+	rtc->valid = val != SPRD_RTC_POWER_RESET_VALUE;
 	return 0;
 }