From: Alistair Popple <apopple@nvidia.com>
To: Xichao Zhao <zhao.xichao@vivo.com>
Cc: jgg@ziepe.ca, leon@kernel.org, akpm@linux-foundation.org,
linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] lib/test_hmm: drop redundant conversion to bool
Date: Thu, 28 Aug 2025 09:59:06 +1000 [thread overview]
Message-ID: <l3qkai3xh5hwvt2f627i4jhf3upyvzvvftikgbahauutyhyagr@7tsq4upe6hl4> (raw)
In-Reply-To: <20250819070457.486348-1-zhao.xichao@vivo.com>
On 2025-08-19 at 17:04 +1000, Xichao Zhao <zhao.xichao@vivo.com> wrote...
> The result of integer comparison already evaluates to bool. No need for
> explicit conversion.
Seems reasonable.
Reviewed-by: Alistair Popple <apopple@nvidia.com>
> No functional impact.
>
> Signed-off-by: Xichao Zhao <zhao.xichao@vivo.com>
> ---
> lib/test_hmm.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/lib/test_hmm.c b/lib/test_hmm.c
> index 761725bc713c..83e3d8208a54 100644
> --- a/lib/test_hmm.c
> +++ b/lib/test_hmm.c
> @@ -140,7 +140,7 @@ static int dmirror_bounce_init(struct dmirror_bounce *bounce,
> static bool dmirror_is_private_zone(struct dmirror_device *mdevice)
> {
> return (mdevice->zone_device_type ==
> - HMM_DMIRROR_MEMORY_DEVICE_PRIVATE) ? true : false;
> + HMM_DMIRROR_MEMORY_DEVICE_PRIVATE);
> }
>
> static enum migrate_vma_direction
> --
> 2.34.1
>
>
prev parent reply other threads:[~2025-08-27 23:59 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-19 7:04 Xichao Zhao
2025-08-27 23:59 ` Alistair Popple [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=l3qkai3xh5hwvt2f627i4jhf3upyvzvvftikgbahauutyhyagr@7tsq4upe6hl4 \
--to=apopple@nvidia.com \
--cc=akpm@linux-foundation.org \
--cc=jgg@ziepe.ca \
--cc=leon@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=zhao.xichao@vivo.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