OSDN Git Service

ubi: Simplify bool conversion
authorYang Li <yang.lee@linux.alibaba.com>
Wed, 15 Feb 2023 01:21:17 +0000 (09:21 +0800)
committerRichard Weinberger <richard@nod.at>
Fri, 21 Apr 2023 19:44:46 +0000 (21:44 +0200)
./drivers/mtd/ubi/build.c:1261:33-38: WARNING: conversion to bool not needed here

Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=4061
Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>
Reviewed-by: Zhihao Cheng <chengzhihao1@huawei.com>
Signed-off-by: Richard Weinberger <richard@nod.at>
drivers/mtd/ubi/build.c

index ad025b2..bb1a90b 100644 (file)
@@ -1267,7 +1267,7 @@ static int __init ubi_init(void)
                mutex_lock(&ubi_devices_mutex);
                err = ubi_attach_mtd_dev(mtd, p->ubi_num,
                                         p->vid_hdr_offs, p->max_beb_per1024,
-                                        p->enable_fm == 0 ? true : false);
+                                        p->enable_fm == 0);
                mutex_unlock(&ubi_devices_mutex);
                if (err < 0) {
                        pr_err("UBI error: cannot attach mtd%d\n",