mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Zhihao Cheng <chengzhihao1@huawei.com>
To: Yang Li <yang.lee@linux.alibaba.com>, <miquel.raynal@bootlin.com>
Cc: <vigneshr@ti.com>, <richard@nod.at>,
	<linux-mtd@lists.infradead.org>, <linux-kernel@vger.kernel.org>,
	Abaci Robot <abaci@linux.alibaba.com>
Subject: Re: [PATCH -next] mtd: ubi: Simplify bool conversion
Date: Mon, 20 Mar 2023 10:28:41 +0800	[thread overview]
Message-ID: <cce0dab6-01f4-11d4-6885-381171b7199e@huawei.com> (raw)
In-Reply-To: <20230215012117.83938-1-yang.lee@linux.alibaba.com>

在 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>

      reply	other threads:[~2023-03-20  2:28 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-15  1:21 Yang Li
2023-03-20  2:28 ` Zhihao Cheng [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cce0dab6-01f4-11d4-6885-381171b7199e@huawei.com \
    --to=chengzhihao1@huawei.com \
    --cc=abaci@linux.alibaba.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=miquel.raynal@bootlin.com \
    --cc=richard@nod.at \
    --cc=vigneshr@ti.com \
    --cc=yang.lee@linux.alibaba.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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®