For the sake of code clarity Signed-off-by: Igor Mitsyanko <i.mitsya...@samsung.com> --- hw/sd.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/hw/sd.c b/hw/sd.c index e1c998c..7160e8c 100644 --- a/hw/sd.c +++ b/hw/sd.c @@ -539,9 +539,9 @@ static void sd_function_switch(SDState *sd, uint32_t arg) sd->data[66] = crc & 0xff; } -static inline int sd_wp_addr(SDState *sd, uint32_t addr) +static inline bool sd_wp_addr(SDState *sd, uint32_t addr) { - return test_bit(addr >> (HWBLOCK_SHIFT + SECTOR_SHIFT + WPGROUP_SHIFT), + return !!test_bit(addr >> (HWBLOCK_SHIFT + SECTOR_SHIFT + WPGROUP_SHIFT), sd->wp_groups); } -- 1.7.4.1