Skip to contentSkip to conversation

arm64: errata: Fix missing space after comma

PATCH In review Josh Law 3 participants 9 messages Mar 1 – Mar 3 arm64

lore
Share & tools
lore

Josh Law

author
#0 lore raw

PATCH 1/4 arm64: errata: Fix missing space after comma

---
 arch/arm64/kernel/cpu_errata.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/kernel/cpu_errata.c +1 -1
index 5c0ab6bfd44a..5f8eaaf028ef 100644
@@ -884,7 +884,7 @@ const struct arm64_cpu_capabilities arm64_errata[] = {
 		.capability = ARM64_WORKAROUND_2658417,
 		/* Cortex-A510 r0p0 - r1p1 */
 		ERRATA_MIDR_RANGE(MIDR_CORTEX_A510, 0, 0, 1, 1),
-		MIDR_FIXED(MIDR_CPU_VAR_REV(1,1), BIT(25)),
+		MIDR_FIXED(MIDR_CPU_VAR_REV(1, 1), BIT(25)),
 	},
 #endif
 #ifdef CONFIG_ARM64_ERRATUM_3194386
Signature · 1 line
2.43.0
author
#1 lore raw

PATCH 2/4 arm64: fpsimd: make stack ctl_table const

---
 arch/arm64/kernel/fpsimd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/kernel/fpsimd.c +1 -1
index 9de1d8a604cb..86035d48ed27 100644
@@ -549,7 +549,7 @@ static int vec_proc_do_default_vl(const struct ctl_table *table, int write,
 	enum vec_type type = info->type;
 	int ret;
 	int vl = get_default_vl(type);
-	struct ctl_table tmp_table = {
+	const struct ctl_table tmp_table = {
 		.data = &vl,
 		.maxlen = sizeof(vl),
 	};
Signature · 1 line
2.43.0
author
#2 lore raw

PATCH 3/4 arm64: kernel: Move const after static in get_kaslr_seed

In reply to Josh Law
---
 arch/arm64/kernel/pi/kaslr_early.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/kernel/pi/kaslr_early.c +1 -1
index e0e018046a46..b1fb950f1564 100644
@@ -20,7 +20,7 @@
 
 static u64 __init get_kaslr_seed(void *fdt, int node)
 {
-	static char const seed_str[] __initconst = "kaslr-seed";
+	static const char seed_str[] __initconst = "kaslr-seed";
 	fdt64_t *prop;
 	u64 ret;
 	int len;
Signature · 1 line
2.43.0
author
#3 lore raw

PATCH 4/4 arm64: kernel: Fix style in io.c macro

In reply to Josh Law
---
 arch/arm64/kernel/io.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
arch/arm64/kernel/io.c +3 -3
index fe86ada23c7d..ce27fa5d2e37 100644
@@ -17,10 +17,10 @@
 #define memcpy_toio_aligned(to, from, count, bits)                        \
 	({                                                                \
 		volatile u##bits __iomem *_to = to;                       \
-		const u##bits *_from = from;                              \
+		const u##bits * _from = from;                             \
 		size_t _count = count;                                    \
-		const u##bits *_end_from = _from + ALIGN_DOWN(_count, 8); \
-                                                                          \
+		const u##bits * _end_from = _from + ALIGN_DOWN(_count, 8);\
+\
 		for (; _from < _end_from; _from += 8, _to += 8)           \
 			__const_memcpy_toio_aligned##bits(_to, _from, 8); \
 		if ((_count % 8) >= 4) {                                  \
Signature · 1 line
2.43.0
reviewer
#4 lore raw

Re: [PATCH 4/4] arm64: kernel: Fix style in io.c macro

Quoted 10 lines · Josh Law
---
 arch/arm64/kernel/io.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
arch/arm64/kernel/io.c +0 -0
index fe86ada23c7d..ce27fa5d2e37 100644

arch/arm64/kernel/io.c line 23

Quoted 10 lines
arch/arm64/kernel/io.c +3 -3
@@ -17,10 +17,10 @@
 #define memcpy_toio_aligned(to, from, count, bits)                        \
 	({                                                                \
 		volatile u##bits __iomem *_to = to;                       \
-		const u##bits *_from = from;                              \
+		const u##bits * _from = from;                             \
 		size_t _count = count;                                    \
-		const u##bits *_end_from = _from + ALIGN_DOWN(_count, 8); \
-                                                                          \
+		const u##bits * _end_from = _from + ALIGN_DOWN(_count, 8);\
+\

There is no style violation here. There's no need to add a space between '*' and the variable name.

Mark.

Quoted 7 lines
arch/arm64/kernel/io.c +0 -0
 		for (; _from < _end_from; _from += 8, _to += 8)           \
 			__const_memcpy_toio_aligned##bits(_to, _from, 8); \
 		if ((_count % 8) >= 4) {                                  \
Signature · 1 line
2.43.0
author
#5 lore raw

Re: [PATCH 4/4] arm64: kernel: Fix style in io.c macro

2 Mar 2026 14:51:19 Mark Rutland <[email protected]>:

Quoted 25 lines · Josh Law
Quoted 10 lines

---
arch/arm64/kernel/io.c | 6 +++---

1 file changed, 3 insertions(+), 3 deletions(-)
arch/arm64/kernel/io.c +0 -0
index fe86ada23c7d..ce27fa5d2e37 100644

arch/arm64/kernel/io.c line 23

Quoted 10 lines
arch/arm64/kernel/io.c +3 -3
@@ -17,10 +17,10 @@
 #define memcpy_toio_aligned(to, from, count, bits)                        \
     ({                                                                \
         volatile u##bits __iomem *_to = to;                       \
-       const u##bits *_from = from;                              \
+       const u##bits * _from = from;                             \
         size_t _count = count;                                    \
-       const u##bits *_end_from = _from + ALIGN_DOWN(_count, 8); \
-                                                                          \
+       const u##bits * _end_from = _from + ALIGN_DOWN(_count, 8);\
+\

There is no style violation here. There's no need to add a space between '*' and the variable name.

Quoted 1 line

Mark.

I used checkpatch.pl... it detected that

reviewer
#6 lore raw

Re: [PATCH 4/4] arm64: kernel: Fix style in io.c macro

Quoted 27 lines · Josh Law

2 Mar 2026 14:51:19 Mark Rutland <[email protected]>:

Quoted 25 lines · Josh Law
Quoted 10 lines

---
arch/arm64/kernel/io.c | 6 +++---

1 file changed, 3 insertions(+), 3 deletions(-)
arch/arm64/kernel/io.c +0 -0
index fe86ada23c7d..ce27fa5d2e37 100644

arch/arm64/kernel/io.c line 23

Quoted 10 lines
arch/arm64/kernel/io.c +3 -3
@@ -17,10 +17,10 @@
 #define memcpy_toio_aligned(to, from, count, bits)                        \
     ({                                                                \
         volatile u##bits __iomem *_to = to;                       \
-       const u##bits *_from = from;                              \
+       const u##bits * _from = from;                             \
         size_t _count = count;                                    \
-       const u##bits *_end_from = _from + ALIGN_DOWN(_count, 8); \
-                                                                          \
+       const u##bits * _end_from = _from + ALIGN_DOWN(_count, 8);\
+\

There is no style violation here. There's no need to add a space between '*' and the variable name.

Quoted 3 lines
Quoted 1 line

Mark.

I used checkpatch.pl... it detected that

So? Tools can be wrong.

In general, checkpatch.pl shouldn't be applied to existing files to find issues, since there are many deliberate violations, and cases it cannot parse correctly.

I checked out v7.0-rc2, and ran:

./scripts/checkpatch.pl -f arch/arm64/kernel/io.c

... and the warning you see seems to be:

| ERROR: need consistent spacing around '*' (ctx:WxV)
| #20: FILE: arch/arm64/kernel/io.c:20:
| +               const u##bits *_from = from;                              \
|                               ^

From a quick scan of checkpatch.pl, that's because it has mis-parsed this as a binary operator, where we *do* want consistent space around the '*'.

For types that's not the case, e.g.

| [mark@lakrids:~/src/linux]% cat test.c                               
| int *foo = 1;
| 
| int * bar = 1;
| [mark@lakrids:~/src/linux]% ./scripts/checkpatch.pl -f test.c        
| WARNING: Missing or malformed SPDX-License-Identifier tag in line 1
| #1: FILE: test.c:1:
| +int *foo = 1;
| 
| ERROR: "foo * bar" should be "foo *bar"
| #3: FILE: test.c:3:
| +int * bar = 1;

Mark.

author
#7 lore raw

Re: [PATCH 4/4] arm64: kernel: Fix style in io.c macro

2 Mar 2026 18:08:29 Mark Rutland <[email protected]>:

Quoted 68 lines · Josh Law
Quoted 27 lines

2 Mar 2026 14:51:19 Mark Rutland <[email protected]>:

Quoted 25 lines · Josh Law
Quoted 10 lines

---
arch/arm64/kernel/io.c | 6 +++---

1 file changed, 3 insertions(+), 3 deletions(-)
arch/arm64/kernel/io.c +0 -0
index fe86ada23c7d..ce27fa5d2e37 100644

arch/arm64/kernel/io.c line 23

Quoted 10 lines
arch/arm64/kernel/io.c +3 -3
@@ -17,10 +17,10 @@
 #define memcpy_toio_aligned(to, from, count, bits)                        \
     ({                                                                \
         volatile u##bits __iomem *_to = to;                       \
-       const u##bits *_from = from;                              \
+       const u##bits * _from = from;                             \
         size_t _count = count;                                    \
-       const u##bits *_end_from = _from + ALIGN_DOWN(_count, 8); \
-                                                                          \
+       const u##bits * _end_from = _from + ALIGN_DOWN(_count, 8);\
+\

There is no style violation here. There's no need to add a space between '*' and the variable name.

Quoted 3 lines
Quoted 1 line

Mark.

I used checkpatch.pl... it detected that

So? Tools can be wrong.

In general, checkpatch.pl shouldn't be applied to existing files to find issues, since there are many deliberate violations, and cases it cannot parse correctly.

I checked out v7.0-rc2, and ran:

  ./scripts/checkpatch.pl -f arch/arm64/kernel/io.c

... and the warning you see seems to be:

| ERROR: need consistent spacing around '*' (ctx:WxV)
| #20: FILE: arch/arm64/kernel/io.c:20:
| +               const u##bits *_from = from;                              \
|                               ^

From a quick scan of checkpatch.pl, that's because it has mis-parsed this as a binary operator, where we *do* want consistent space around the '*'.

For types that's not the case, e.g.

| [mark@lakrids:~/src/linux]% cat test.c                              
| int *foo = 1;
|
| int * bar = 1;
| [mark@lakrids:~/src/linux]% ./scripts/checkpatch.pl -f test.c       
| WARNING: Missing or malformed SPDX-License-Identifier tag in line 1
| #1: FILE: test.c:1:
| +int *foo = 1;
|
| ERROR: "foo * bar" should be "foo *bar"
| #3: FILE: test.c:3:
| +int * bar = 1;
Quoted 1 line

Mark.

Sorry Mark, I'm sure I'll do a real useful patch to you very soon

V/R

maintainer
#8 lore raw
In reply to Josh Law
Quoted 1 line · Josh Law

We don't tend to take patches without commit messages. Please read Documentation/process/submitting-patches.rst, have a look at the git log to see what other patches look like, include a cover letter when sending multiple patches at once and also bear in mind that purely cosmetic changes such as these are often considered as "churn" and consequently ignored.

You probably also need to fix your mail setup so that the author and the SoB line match.

Will