Commit 825156a5 authored by Kaixu Xia's avatar Kaixu Xia Committed by Alexandre Belloni
Browse files

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: default avatarTosk Robot <tencent_os_robot@tencent.com>
Signed-off-by: default avatarKaixu Xia <kaixuxia@tencent.com>
Signed-off-by: default avatarAlexandre Belloni <alexandre.belloni@bootlin.com>
Link: https://lore.kernel.org/r/1604647854-876-1-git-send-email-kaixuxia@tencent.com
parent 28d21191
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;
}