Skip to content

Commit

Permalink
rtc: sc27xx: Remove unnecessary conversion to bool
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Kaixu Xia <[email protected]>
Signed-off-by: Alexandre Belloni <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
  • Loading branch information
kaixuxiakx authored and alexandrebelloni committed Nov 14, 2020
1 parent 28d2119 commit 825156a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/rtc/rtc-sc27xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 825156a

Please sign in to comment.