From: Alexander Shiyan <eagle.alexander923@gmail.com>
To: barebox@lists.infradead.org
Cc: Alexander Shiyan <eagle.alexander923@gmail.com>
Subject: [PATCH] ARM: at91: sam9_smc: remove redundant SAMA5D2 check
Date: Fri, 20 Jun 2025 11:07:15 +0300 [thread overview]
Message-ID: <20250620080715.21194-1-eagle.alexander923@gmail.com> (raw)
The SAMA5D2 SoC uses a different SMC driver implementation (located in
drivers/mfd/atmel-smc.c) and doesn't utilize this low-level sam9_smc
driver. The check for AT91_SOC_SAMA5D2 in the read mode function is
therefore redundant and can be safely removed.
This cleanup eliminates dead code and improves maintainability by
removing an unused codepath. No functional changes are introduced.
Signed-off-by: Alexander Shiyan <eagle.alexander923@gmail.com>
---
arch/arm/mach-at91/sam9_smc.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/arch/arm/mach-at91/sam9_smc.c b/arch/arm/mach-at91/sam9_smc.c
index 257d7a07c3..6c9e169a8e 100644
--- a/arch/arm/mach-at91/sam9_smc.c
+++ b/arch/arm/mach-at91/sam9_smc.c
@@ -101,7 +101,6 @@ static void sam9_smc_cs_read_mode(void __iomem *base,
void __iomem *mode_reg;
switch (at91_soc_initdata.type) {
- case AT91_SOC_SAMA5D2:
case AT91_SOC_SAMA5D3:
case AT91_SOC_SAMA5D4:
mode_reg = base + AT91_SAMA5_SMC_MODE;
--
2.39.1
next reply other threads:[~2025-06-20 8:24 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-20 8:07 Alexander Shiyan [this message]
2025-06-20 11:46 ` Sascha Hauer
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=20250620080715.21194-1-eagle.alexander923@gmail.com \
--to=eagle.alexander923@gmail.com \
--cc=barebox@lists.infradead.org \
/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