Skip to contentSkip to conversation

xfs: Remove incorrect use of '&'

PATCH Applied Alejandro Colomar 3 participants 8 messages Nov 25 – Nov 26 XFS filesystem

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 xfs: Remove incorrect use of '&'

We want to pass the character array, not a pointer to it.

This seems an obvious typo, introduced in a48373e7d35a (2026-01-20; "xfs: start creating infrastructure for health monitoring").

Cc Darrick J. Wong <[email protected]>
Cc Christoph Hellwig <[email protected]>
---
 fs/xfs/xfs_healthmon.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/xfs/xfs_healthmon.c +1 -1
index 2bdd747f1ead..56d19ffb02b3 100644
@@ -1061,7 +1061,7 @@ xfs_healthmon_validate(
 		return false;
 	if (hmo->format != XFS_HEALTH_MONITOR_FMT_V0)
 		return false;
-	if (memchr_inv(&hmo->pad, 0, sizeof(hmo->pad)))
+	if (memchr_inv(hmo->pad, 0, sizeof(hmo->pad)))
 		return false;
 	return true;
 }
Signature · 1 line
2.55.0
maintainer Reviewed-by on v1 1/1
#1 lore raw
Quoted 17 lines · Alejandro Colomar

We want to pass the character array, not a pointer to it.

This seems an obvious typo, introduced in a48373e7d35a (2026-01-20; "xfs: start creating infrastructure for health monitoring").

Cc Darrick J. Wong <[email protected]>
Cc Christoph Hellwig <[email protected]>
---
 fs/xfs/xfs_healthmon.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/xfs/xfs_healthmon.c +0 -0
index 2bdd747f1ead..56d19ffb02b3 100644

fs/xfs/xfs_healthmon.c xfs_healthmon_validate( · line 1066

Quoted 7 lines
fs/xfs/xfs_healthmon.c +1 -1
@@ -1061,7 +1061,7 @@ xfs_healthmon_validate(
 		return false;
 	if (hmo->format != XFS_HEALTH_MONITOR_FMT_V0)
 		return false;
-	if (memchr_inv(&hmo->pad, 0, sizeof(hmo->pad)))
+	if (memchr_inv(hmo->pad, 0, sizeof(hmo->pad)))
 		return false;
 	return true;
Quoted 4 lines
fs/xfs/xfs_healthmon.c +0 -0
 }
Signature · 1 line
2.55.0
#2 lore raw

Hi Carlos,

Quoted 16 lines

Date: 2026-11-25 18:38:11+0100
From: Carlos Maiolino <[email protected]>

Quoted 12 lines · Alejandro Colomar

We want to pass the character array, not a pointer to it.

This seems an obvious typo, introduced in a48373e7d35a (2026-01-20; "xfs: start creating infrastructure for health monitoring").

Cc Darrick J. Wong <[email protected]>
Cc Christoph Hellwig <[email protected]>
---
 fs/xfs/xfs_healthmon.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Quoted 14 lines

fs/xfs/xfs_healthmon.c xfs_healthmon_validate( · line 1066

Quoted 12 lines
fs/xfs/xfs_healthmon.c +1 -1
index 2bdd747f1ead..56d19ffb02b3 100644
@@ -1061,7 +1061,7 @@ xfs_healthmon_validate(
 		return false;
 	if (hmo->format != XFS_HEALTH_MONITOR_FMT_V0)
 		return false;
-	if (memchr_inv(&hmo->pad, 0, sizeof(hmo->pad)))
+	if (memchr_inv(hmo->pad, 0, sizeof(hmo->pad)))
 		return false;
 	return true;

Thanks! Will you take the patch?

Cheers,
Alex

Quoted 7 lines
Quoted 5 lines
fs/xfs/xfs_healthmon.c +0 -0
 }
Signature · 1 line
2.55.0
Signature · 1 line
<https://www.alejandro-colomar.es>
maintainer
#3 lore raw
Quoted 33 lines · Alejandro Colomar

Hi Carlos,

Quoted 16 lines

Date: 2026-11-25 18:38:11+0100
From: Carlos Maiolino <[email protected]>

Quoted 12 lines · Alejandro Colomar

We want to pass the character array, not a pointer to it.

This seems an obvious typo, introduced in a48373e7d35a (2026-01-20; "xfs: start creating infrastructure for health monitoring").

Cc Darrick J. Wong <[email protected]>
Cc Christoph Hellwig <[email protected]>
---
 fs/xfs/xfs_healthmon.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Quoted 14 lines

fs/xfs/xfs_healthmon.c xfs_healthmon_validate( · line 1066

Quoted 12 lines
fs/xfs/xfs_healthmon.c +1 -1
index 2bdd747f1ead..56d19ffb02b3 100644
@@ -1061,7 +1061,7 @@ xfs_healthmon_validate(
 		return false;
 	if (hmo->format != XFS_HEALTH_MONITOR_FMT_V0)
 		return false;
-	if (memchr_inv(&hmo->pad, 0, sizeof(hmo->pad)))
+	if (memchr_inv(hmo->pad, 0, sizeof(hmo->pad)))
 		return false;
 	return true;
Quoted 1 line

Thanks! Will you take the patch?

Yes I will

Quoted 15 lines

Cheers,
Alex

Quoted 7 lines
Quoted 5 lines
fs/xfs/xfs_healthmon.c +0 -0
 }
Signature · 1 line
2.55.0
Signature · 1 line
<https://www.alejandro-colomar.es>
#4 lore raw
In reply to Alejandro Colomar
Quoted 4 lines · Alejandro Colomar

We want to pass the character array, not a pointer to it.

This seems an obvious typo, introduced in a48373e7d35a (2026-01-20; "xfs: start creating infrastructure for health monitoring").

So,

Fixes a48373e7d35a ("xfs: start creating infrastructure for health monitoring")
Quoted 20 lines
Cc Darrick J. Wong <[email protected]>
Cc Christoph Hellwig <[email protected]>
---
 fs/xfs/xfs_healthmon.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/xfs/xfs_healthmon.c +1 -1
index 2bdd747f1ead..56d19ffb02b3 100644
@@ -1061,7 +1061,7 @@ xfs_healthmon_validate(
 		return false;
 	if (hmo->format != XFS_HEALTH_MONITOR_FMT_V0)
 		return false;
-	if (memchr_inv(&hmo->pad, 0, sizeof(hmo->pad)))
+	if (memchr_inv(hmo->pad, 0, sizeof(hmo->pad)))
 		return false;
 	return true;
 }
#5 lore raw

Hi Eric,

Quoted 6 lines

Date: 2026-11-25 11:43:00-0600
From: Eric Sandeen <[email protected]>

Quoted 2 lines · Alejandro Colomar

We want to pass the character array, not a pointer to it.

Quoted 8 lines
Quoted 2 lines

This seems an obvious typo, introduced in a48373e7d35a (2026-01-20; "xfs: start creating infrastructure for health monitoring").

So,

Fixes a48373e7d35a ("xfs: start creating infrastructure for health monitoring")

It's unnecessary, because the binary will have the same exact value passed. It's only a type-system issue, which affects diagnostics etc., but doesn't create an actual bug.

I would add the 'Fixes' tag, but without stable@, since it doesn't need to be backported. I didn't include the 'Fixes' tag because some maintainers don't want to see them if there's no bug in the binary.

Let me know your preference.

Cheers,
Alex

Quoted 22 lines
Quoted 21 lines
Cc Darrick J. Wong <[email protected]>
Cc Christoph Hellwig <[email protected]>
---
 fs/xfs/xfs_healthmon.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/xfs/xfs_healthmon.c +1 -1
index 2bdd747f1ead..56d19ffb02b3 100644
@@ -1061,7 +1061,7 @@ xfs_healthmon_validate(
 		return false;
 	if (hmo->format != XFS_HEALTH_MONITOR_FMT_V0)
 		return false;
-	if (memchr_inv(&hmo->pad, 0, sizeof(hmo->pad)))
+	if (memchr_inv(hmo->pad, 0, sizeof(hmo->pad)))
 		return false;
 	return true;
 }
Signature · 1 line
<https://www.alejandro-colomar.es>
#6 lore raw
Quoted 21 lines · Alejandro Colomar

Hi Eric,

Quoted 6 lines

Date: 2026-11-25 11:43:00-0600
From: Eric Sandeen <[email protected]>

Quoted 2 lines · Alejandro Colomar

We want to pass the character array, not a pointer to it.

Quoted 8 lines
Quoted 2 lines

This seems an obvious typo, introduced in a48373e7d35a (2026-01-20; "xfs: start creating infrastructure for health monitoring").

So,

Fixes a48373e7d35a ("xfs: start creating infrastructure for health monitoring")

It's unnecessary, because the binary will have the same exact value passed. It's only a type-system issue, which affects diagnostics etc., but doesn't create an actual bug.

Quoted 5 lines

I would add the 'Fixes' tag, but without stable@, since it doesn't need to be backported. I didn't include the 'Fixes' tag because some maintainers don't want to see them if there's no bug in the binary.

Let me know your preference.

yeah, fair enough. cem mentioned this too. Sorry for the noise :)

-Eric

Quoted 27 lines

Cheers,
Alex

Quoted 22 lines
Quoted 21 lines
Cc Darrick J. Wong <[email protected]>
Cc Christoph Hellwig <[email protected]>
---
 fs/xfs/xfs_healthmon.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/xfs/xfs_healthmon.c +1 -1
index 2bdd747f1ead..56d19ffb02b3 100644
@@ -1061,7 +1061,7 @@ xfs_healthmon_validate(
 		return false;
 	if (hmo->format != XFS_HEALTH_MONITOR_FMT_V0)
 		return false;
-	if (memchr_inv(&hmo->pad, 0, sizeof(hmo->pad)))
+	if (memchr_inv(hmo->pad, 0, sizeof(hmo->pad)))
 		return false;
 	return true;
 }
maintainer Applied
#7 lore raw
In reply to Alejandro Colomar
Quoted 6 lines · Alejandro Colomar

We want to pass the character array, not a pointer to it.

This seems an obvious typo, introduced in a48373e7d35a (2026-01-20; "xfs: start creating infrastructure for health monitoring").

Applied to for-next, thanks!

[1/1] xfs: Remove incorrect use of '&'

      commit: 58de428557082dabdeaa1e1809766236f8e9d6c3

Best regards,

Signature · 1 line
Carlos Maiolino <[email protected]>