linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Andrey Konovalov <andreyknvl@gmail.com>
To: Xichao Zhao <zhao.xichao@vivo.com>
Cc: ryabinin.a.a@gmail.com, akpm@linux-foundation.org,
	glider@google.com,  dvyukov@google.com,
	vincenzo.frascino@arm.com, kasan-dev@googlegroups.com,
	 linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mm: remove unnecessary pointer variables
Date: Mon, 11 Aug 2025 15:38:30 +0200	[thread overview]
Message-ID: <CA+fCnZf8XVydjMNRfR3JDeE=3i_0p+w0gTP8ep43LVU8k2Tsxw@mail.gmail.com> (raw)
In-Reply-To: <20250811034257.154862-1-zhao.xichao@vivo.com>

On Mon, Aug 11, 2025 at 5:43 AM Xichao Zhao <zhao.xichao@vivo.com> wrote:
>
> Simplify the code to enhance readability and maintain a consistent
> coding style.
>
> Signed-off-by: Xichao Zhao <zhao.xichao@vivo.com>
> ---
>  mm/kasan/init.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/mm/kasan/init.c b/mm/kasan/init.c
> index ced6b29fcf76..e5810134813c 100644
> --- a/mm/kasan/init.c
> +++ b/mm/kasan/init.c
> @@ -266,11 +266,9 @@ int __ref kasan_populate_early_shadow(const void *shadow_start,
>                 }
>
>                 if (pgd_none(*pgd)) {
> -                       p4d_t *p;
>
>                         if (slab_is_available()) {
> -                               p = p4d_alloc(&init_mm, pgd, addr);
> -                               if (!p)
> +                               if (!p4d_alloc(&init_mm, pgd, addr))
>                                         return -ENOMEM;
>                         } else {
>                                 pgd_populate(&init_mm, pgd,
> --
> 2.34.1
>

Reviewed-by: Andrey Konovalov <andreyknvl@gmail.com>


  parent reply	other threads:[~2025-08-11 13:38 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-11  3:42 Xichao Zhao
2025-08-11  4:30 ` Anshuman Khandual
2025-08-11 13:38 ` Andrey Konovalov [this message]
2025-08-11 19:18 ` Vishal Moola (Oracle)

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='CA+fCnZf8XVydjMNRfR3JDeE=3i_0p+w0gTP8ep43LVU8k2Tsxw@mail.gmail.com' \
    --to=andreyknvl@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=dvyukov@google.com \
    --cc=glider@google.com \
    --cc=kasan-dev@googlegroups.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=ryabinin.a.a@gmail.com \
    --cc=vincenzo.frascino@arm.com \
    --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