* [PATCH -next] mtd: ubi: Simplify bool conversion
@ 2023-02-15 1:21 Yang Li
2023-03-20 2:28 ` Zhihao Cheng
0 siblings, 1 reply; 2+ messages in thread
From: Yang Li @ 2023-02-15 1:21 UTC (permalink / raw)
To: miquel.raynal
Cc: vigneshr, richard, linux-mtd, linux-kernel, Yang Li, Abaci Robot
./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>
---
drivers/mtd/ubi/build.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/mtd/ubi/build.c b/drivers/mtd/ubi/build.c
index 0904eb40c95f..e9c153b7c471 100644
--- a/drivers/mtd/ubi/build.c
+++ b/drivers/mtd/ubi/build.c
@@ -1258,7 +1258,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",
--
2.20.1.7.g153144c
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH -next] mtd: ubi: Simplify bool conversion
2023-02-15 1:21 [PATCH -next] mtd: ubi: Simplify bool conversion Yang Li
@ 2023-03-20 2:28 ` Zhihao Cheng
0 siblings, 0 replies; 2+ messages in thread
From: Zhihao Cheng @ 2023-03-20 2:28 UTC (permalink / raw)
To: Yang Li, miquel.raynal
Cc: vigneshr, richard, linux-mtd, linux-kernel, Abaci Robot
在 2023/2/15 9:21, Yang Li 写道:
> ./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>
> ---
> drivers/mtd/ubi/build.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/mtd/ubi/build.c b/drivers/mtd/ubi/build.c
> index 0904eb40c95f..e9c153b7c471 100644
> --- a/drivers/mtd/ubi/build.c
> +++ b/drivers/mtd/ubi/build.c
> @@ -1258,7 +1258,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",
>
Looks good.
Reviewed-by: Zhihao Cheng <chengzhihao1@huawei.com>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-03-20 2:28 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-15 1:21 [PATCH -next] mtd: ubi: Simplify bool conversion Yang Li
2023-03-20 2:28 ` Zhihao Cheng
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®