From: Ahmad Fatoum <a.fatoum@barebox.org>
To: barebox@lists.infradead.org
Cc: Ahmad Fatoum <a.fatoum@barebox.org>
Subject: [PATCH 2/2] ARM: Arria10: xload: don't check writel return value
Date: Mon, 2 Jun 2025 08:20:20 +0200 [thread overview]
Message-ID: <20250602062020.754880-2-a.fatoum@barebox.org> (raw)
In-Reply-To: <20250602062020.754880-1-a.fatoum@barebox.org>
No one checks a10_update_bits()'s return value, which is good as
return value has no indication over operation success anyway.
Make it void and fix this.
Signed-off-by: Ahmad Fatoum <a.fatoum@barebox.org>
---
arch/arm/mach-socfpga/arria10-xload.c | 7 ++-----
include/mach/socfpga/arria10-xload.h | 2 +-
2 files changed, 3 insertions(+), 6 deletions(-)
diff --git a/arch/arm/mach-socfpga/arria10-xload.c b/arch/arm/mach-socfpga/arria10-xload.c
index fb87135ca94a..4c8f9c7f0e55 100644
--- a/arch/arm/mach-socfpga/arria10-xload.c
+++ b/arch/arm/mach-socfpga/arria10-xload.c
@@ -16,20 +16,17 @@
#include <mach/socfpga/generic.h>
#include <linux/sizes.h>
-int a10_update_bits(unsigned int reg, unsigned int mask,
+void a10_update_bits(unsigned int reg, unsigned int mask,
unsigned int val)
{
unsigned int tmp, orig;
- int ret = 0;
orig = readl(ARRIA10_FPGAMGRREGS_ADDR + reg);
tmp = orig & ~mask;
tmp |= val & mask;
if (tmp != orig)
- ret = writel(tmp, ARRIA10_FPGAMGRREGS_ADDR + reg);
-
- return ret;
+ writel(tmp, ARRIA10_FPGAMGRREGS_ADDR + reg);
}
static uint32_t socfpga_a10_fpga_read_stat(void)
diff --git a/include/mach/socfpga/arria10-xload.h b/include/mach/socfpga/arria10-xload.h
index c58ab7f8cfd2..b7f100d90a96 100644
--- a/include/mach/socfpga/arria10-xload.h
+++ b/include/mach/socfpga/arria10-xload.h
@@ -6,7 +6,7 @@
void arria10_init_mmc(void);
int arria10_prepare_mmc(int barebox_part, int rbf_part);
int arria10_read_blocks(void *dst, int blocknum, size_t len);
-int a10_update_bits(unsigned int reg, unsigned int mask, unsigned int val);
+void a10_update_bits(unsigned int reg, unsigned int mask, unsigned int val);
struct partition {
uint64_t first_sec;
--
2.39.5
next prev parent reply other threads:[~2025-06-02 6:20 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-02 6:20 [PATCH 1/2] dma: apbh: pass integer, not pointer as value to writel Ahmad Fatoum
2025-06-02 6:20 ` Ahmad Fatoum [this message]
2025-06-02 7:43 ` 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=20250602062020.754880-2-a.fatoum@barebox.org \
--to=a.fatoum@barebox.org \
--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