powerpc: Add const qual to local_read() parameter
Subsystems (3)
Michael Ellerman
reviewerPATCH v2 1/1 powerpc: Add const qual to local_read() parameter
From: Eric Dumazet <[email protected]>
A patch in net-next triggered a compile error on powerpc:
include/linux/u64_stats_sync.h: In function 'u64_stats_read':
include/asm-generic/local64.h:30:37: warning: passing argument 1 of 'local_read' discards 'const' qualifier from pointer target type
This seems reasonable to relax powerpc local_read() requirements.
--- arch/powerpc/include/asm/local.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
v2: mpe: Update change log with compiler warning, resend to netdev so it appears in the netdev patchwork.
Dave can you take this in the net tree so the window of the breakage is as small as possible please?
arch/powerpc/include/asm/local.h +1 -1
@@ -17,7 +17,7 @@ typedef struct#define LOCAL_INIT (i) { (i) } -static __inline__long local_read (local_t *l) +static __inline__long local_read (const local_t *l) {return READ_ONCE (l->v); }
Signature · 1 line
2.21.0
Hi all,
Quoted 8 lines · On Wed, 20 Nov 2019 12:14:51 +1100 Michael Ellerman <[email protected]> wrote:
From: Eric Dumazet <[email protected]>
A patch in net-next triggered a compile error on powerpc:
include/linux/u64_stats_sync.h: In function 'u64_stats_read':
include/asm-generic/local64.h:30:37: warning: passing argument 1 of 'local_read' discards 'const' qualifier from pointer target type
Quoted 6 lines
This seems reasonable to relax powerpc
local_read()requirements.Fixes 316580b69d0a ("u64_stats: provide u64_stats_t type")Signed-off-by Eric Dumazet <[email protected]>Reported-by kbuild test robot <[email protected]>Acked-by Michael Ellerman <[email protected]>
Signature · 2 lines
Cheers, Stephen Rothwell
Hi Dave,
Quoted 18 lines · On Wed, 20 Nov 2019 12:14:51 +1100 Michael Ellerman <[email protected]> wrote:
From: Eric Dumazet <[email protected]>
A patch in net-next triggered a compile error on powerpc:
include/linux/u64_stats_sync.h: In function 'u64_stats_read':
include/asm-generic/local64.h:30:37: warning: passing argument 1 of 'local_read' discards 'const' qualifier from pointer target typeThis seems reasonable to relax powerpc
local_read()requirements.Fixes 316580b69d0a ("u64_stats: provide u64_stats_t type")Signed-off-by Eric Dumazet <[email protected]>Reported-by kbuild test robot <[email protected]>Acked-by Michael Ellerman <[email protected]>--- arch/powerpc/include/asm/local.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Quoted 5 lines
v2: mpe: Update change log with compiler warning, resend to netdev so it appears in the netdev patchwork.
Dave can you take this in the net tree so the window of the breakage is as small as possible please?
I see that you marked this as "Not Applicable" in patchwork.
Michael meant the net-next tree which contains commit
316580b69d0a ("u64_stats: provide u64_stats_t type")
Please consider applying this patch.
Quoted 16 lines
arch/powerpc/include/asm/local.h +1
-1@@ -17,7 +17,7 @@ typedef struct#define LOCAL_INIT (i) { (i) } -static __inline__long local_read (local_t *l) +static __inline__long local_read (const local_t *l) {return READ_ONCE (l->v); }Signature · 1 line
2.21.0
Signature · 2 lines
Cheers, Stephen Rothwell
Jakub Kicinski
AppliedQuoted 7 lines · Michael Ellerman
From: Eric Dumazet <[email protected]>
A patch in net-next triggered a compile error on powerpc:
include/linux/u64_stats_sync.h: In function 'u64_stats_read':
include/asm-generic/local64.h:30:37: warning: passing argument 1 of 'local_read' discards 'const' qualifier from pointer target type
Quoted 6 lines
This seems reasonable to relax powerpc
local_read()requirements.Fixes 316580b69d0a ("u64_stats: provide u64_stats_t type")Signed-off-by Eric Dumazet <[email protected]>Reported-by kbuild test robot <[email protected]>Acked-by Michael Ellerman <[email protected]>
Applied to net-next now, thanks.