All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kunwu Chan <kunwu.chan@linux.dev>
To: Paul Walmsley <pjw@kernel.org>,
	Palmer Dabbelt <palmer@dabbelt.com>,
	Albert Ou <aou@eecs.berkeley.edu>
Cc: Conor Dooley <conor@kernel.org>, Alexandre Ghiti <alex@ghiti.fr>,
	Anup Patel <anup@brainfault.org>,
	Atish Patra <atishp@rivosinc.com>, Zong Li <zong.li@sifive.com>,
	Deepak Gupta <debug@rivosinc.com>,
	Zhouyi Zhou <zhouzhouyi@gmail.com>,
	linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org,
	Kunwu Chan <kunwu.chan@linux.dev>
Subject: [PATCH RESEND 1/2] riscv: xip_fixup.h: fix comment typo and whitespace issue
Date: Sat, 14 Feb 2026 10:38:03 +0800	[thread overview]
Message-ID: <20260214023804.677127-2-kunwu.chan@linux.dev> (raw)
In-Reply-To: <20260214023804.677127-1-kunwu.chan@linux.dev>

Fix two minor issues in XIP_FIXUP_OFFSET macro:

- The comment describes the fixup formula as
  "reg += CONFIG_PHYS_RAM_BASE - _start", but the actual assembly
  code subtracts _sdata, not _start. Fix the comment to match.

- Replace spaces with a tab for the "add" instruction to keep
  consistent indentation with surrounding lines.

Reviewed-by: Zhouyi Zhou <zhouzhouyi@gmail.com>
Signed-off-by: Kunwu Chan <kunwu.chan@linux.dev>
---
 arch/riscv/include/asm/xip_fixup.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/riscv/include/asm/xip_fixup.h b/arch/riscv/include/asm/xip_fixup.h
index f3d56299bc22..56db595b0e14 100644
--- a/arch/riscv/include/asm/xip_fixup.h
+++ b/arch/riscv/include/asm/xip_fixup.h
@@ -16,10 +16,10 @@
 	 *
 	 * The start of data in Flash is _sdata and the start of data in RAM is
 	 * CONFIG_PHYS_RAM_BASE. So this fix-up essentially does this:
-	 * reg += CONFIG_PHYS_RAM_BASE - _start
+	 * reg += CONFIG_PHYS_RAM_BASE - _sdata
 	 */
 	li t0, CONFIG_PHYS_RAM_BASE
-        add \reg, \reg, t0
+	add \reg, \reg, t0
 	la t0, _sdata
 	sub \reg, \reg, t0
 .endm
-- 
2.25.1


_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

WARNING: multiple messages have this Message-ID (diff)
From: Kunwu Chan <kunwu.chan@linux.dev>
To: Paul Walmsley <pjw@kernel.org>,
	Palmer Dabbelt <palmer@dabbelt.com>,
	Albert Ou <aou@eecs.berkeley.edu>
Cc: Conor Dooley <conor@kernel.org>, Alexandre Ghiti <alex@ghiti.fr>,
	Anup Patel <anup@brainfault.org>,
	Atish Patra <atishp@rivosinc.com>, Zong Li <zong.li@sifive.com>,
	Deepak Gupta <debug@rivosinc.com>,
	Zhouyi Zhou <zhouzhouyi@gmail.com>,
	linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org,
	Kunwu Chan <kunwu.chan@linux.dev>
Subject: [PATCH RESEND 1/2] riscv: xip_fixup.h: fix comment typo and whitespace issue
Date: Sat, 14 Feb 2026 10:38:03 +0800	[thread overview]
Message-ID: <20260214023804.677127-2-kunwu.chan@linux.dev> (raw)
In-Reply-To: <20260214023804.677127-1-kunwu.chan@linux.dev>

Fix two minor issues in XIP_FIXUP_OFFSET macro:

- The comment describes the fixup formula as
  "reg += CONFIG_PHYS_RAM_BASE - _start", but the actual assembly
  code subtracts _sdata, not _start. Fix the comment to match.

- Replace spaces with a tab for the "add" instruction to keep
  consistent indentation with surrounding lines.

Reviewed-by: Zhouyi Zhou <zhouzhouyi@gmail.com>
Signed-off-by: Kunwu Chan <kunwu.chan@linux.dev>
---
 arch/riscv/include/asm/xip_fixup.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/riscv/include/asm/xip_fixup.h b/arch/riscv/include/asm/xip_fixup.h
index f3d56299bc22..56db595b0e14 100644
--- a/arch/riscv/include/asm/xip_fixup.h
+++ b/arch/riscv/include/asm/xip_fixup.h
@@ -16,10 +16,10 @@
 	 *
 	 * The start of data in Flash is _sdata and the start of data in RAM is
 	 * CONFIG_PHYS_RAM_BASE. So this fix-up essentially does this:
-	 * reg += CONFIG_PHYS_RAM_BASE - _start
+	 * reg += CONFIG_PHYS_RAM_BASE - _sdata
 	 */
 	li t0, CONFIG_PHYS_RAM_BASE
-        add \reg, \reg, t0
+	add \reg, \reg, t0
 	la t0, _sdata
 	sub \reg, \reg, t0
 .endm
-- 
2.25.1


  reply	other threads:[~2026-02-14  2:38 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-14  2:38 [PATCH RESEND 0/2] riscv: fix minor typos and style issues in XIP code Kunwu Chan
2026-02-14  2:38 ` Kunwu Chan
2026-02-14  2:38 ` Kunwu Chan [this message]
2026-02-14  2:38   ` [PATCH RESEND 1/2] riscv: xip_fixup.h: fix comment typo and whitespace issue Kunwu Chan
2026-02-14  2:38 ` [PATCH RESEND 2/2] riscv: head.S: fix typo and wrong #endif comment Kunwu Chan
2026-02-14  2:38   ` Kunwu Chan
2026-02-17 21:12 ` [PATCH RESEND 0/2] riscv: fix minor typos and style issues in XIP code Paul Walmsley
2026-02-17 21:12   ` Paul Walmsley
2026-02-18  0:58   ` Nam Cao
2026-02-18  0:58     ` Nam Cao
2026-02-20 15:38 ` Jisheng Zhang
2026-02-20 15:38   ` Jisheng Zhang
2026-02-20 22:39   ` Conor Dooley
2026-02-20 22:39     ` Conor Dooley
2026-03-18 23:23 ` Paul Walmsley
2026-03-18 23:23   ` Paul Walmsley

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=20260214023804.677127-2-kunwu.chan@linux.dev \
    --to=kunwu.chan@linux.dev \
    --cc=alex@ghiti.fr \
    --cc=anup@brainfault.org \
    --cc=aou@eecs.berkeley.edu \
    --cc=atishp@rivosinc.com \
    --cc=conor@kernel.org \
    --cc=debug@rivosinc.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=palmer@dabbelt.com \
    --cc=pjw@kernel.org \
    --cc=zhouzhouyi@gmail.com \
    --cc=zong.li@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.