mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Alexandre Ghiti <alex@ghiti.fr>
To: Masahiro Yamada <masahiroy@kernel.org>,
	Paul Walmsley <paul.walmsley@sifive.com>,
	Palmer Dabbelt <palmer@dabbelt.com>,
	Albert Ou <aou@eecs.berkeley.edu>,
	linux-riscv@lists.infradead.org
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] riscv: merge two if-blocks for KBUILD_IMAGE
Date: Tue, 26 Mar 2024 20:52:14 +0100	[thread overview]
Message-ID: <13eb7c38-68da-4635-a713-5791d5294df2@ghiti.fr> (raw)
In-Reply-To: <20240323113500.1249272-1-masahiroy@kernel.org>

Hi Masahiro,

On 23/03/2024 12:35, Masahiro Yamada wrote:
> In arch/riscv/Makefile, KBUILD_IMAGE is assigned in two separate
> if-blocks.
>
> When CONFIG_XIP_KERNEL is disabled, the decision made by the first
> if-block is overwritten by the second one, which is redundant and
> unreadable.
>
> Merge the two if-blocks.
>
> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
> ---
>
>   arch/riscv/Makefile | 19 ++++++++-----------
>   1 file changed, 8 insertions(+), 11 deletions(-)
>
> diff --git a/arch/riscv/Makefile b/arch/riscv/Makefile
> index 252d63942f34..a74e70405d3f 100644
> --- a/arch/riscv/Makefile
> +++ b/arch/riscv/Makefile
> @@ -133,7 +133,15 @@ boot		:= arch/riscv/boot
>   ifeq ($(CONFIG_XIP_KERNEL),y)
>   KBUILD_IMAGE := $(boot)/xipImage
>   else
> +ifeq ($(CONFIG_RISCV_M_MODE)$(CONFIG_ARCH_CANAAN),yy)
> +KBUILD_IMAGE := $(boot)/loader.bin
> +else
> +ifeq ($(CONFIG_EFI_ZBOOT),)
>   KBUILD_IMAGE	:= $(boot)/Image.gz
> +else
> +KBUILD_IMAGE := $(boot)/vmlinuz.efi
> +endif
> +endif
>   endif
>   
>   libs-y += arch/riscv/lib/
> @@ -153,17 +161,6 @@ endif
>   vdso-install-y			+= arch/riscv/kernel/vdso/vdso.so.dbg
>   vdso-install-$(CONFIG_COMPAT)	+= arch/riscv/kernel/compat_vdso/compat_vdso.so.dbg:../compat_vdso/compat_vdso.so
>   
> -ifneq ($(CONFIG_XIP_KERNEL),y)
> -ifeq ($(CONFIG_RISCV_M_MODE)$(CONFIG_ARCH_CANAAN),yy)
> -KBUILD_IMAGE := $(boot)/loader.bin
> -else
> -ifeq ($(CONFIG_EFI_ZBOOT),)
> -KBUILD_IMAGE := $(boot)/Image.gz
> -else
> -KBUILD_IMAGE := $(boot)/vmlinuz.efi
> -endif
> -endif
> -endif
>   BOOT_TARGETS := Image Image.gz loader loader.bin xipImage vmlinuz.efi
>   
>   all:	$(notdir $(KBUILD_IMAGE))


You can add:

Reviewed-by: Alexandre Ghiti <alexghiti@rivosinc.com>

Thanks,

Alex


  reply	other threads:[~2024-03-26 19:52 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-23 11:35 Masahiro Yamada
2024-03-26 19:52 ` Alexandre Ghiti [this message]
2024-04-10 14:10 ` patchwork-bot+linux-riscv

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=13eb7c38-68da-4635-a713-5791d5294df2@ghiti.fr \
    --to=alex@ghiti.fr \
    --cc=aou@eecs.berkeley.edu \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=masahiroy@kernel.org \
    --cc=palmer@dabbelt.com \
    --cc=paul.walmsley@sifive.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®