From: Kaixu Xia Date: Fri, 6 Nov 2020 07:30:54 +0000 (+0800) Subject: rtc: sc27xx: Remove unnecessary conversion to bool X-Git-Url: https://git.baikalelectronics.ru/sdk/?a=commitdiff_plain;h=825156a5eeded9bcb55e9c36d4b4b72bf20bcba6;p=kernel.git 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 Signed-off-by: Kaixu Xia Signed-off-by: Alexandre Belloni Link: https://lore.kernel.org/r/1604647854-876-1-git-send-email-kaixuxia@tencent.com --- diff --git a/drivers/rtc/rtc-sc27xx.c b/drivers/rtc/rtc-sc27xx.c index 36810dd40cd35..6e65f68ea86dc 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; }