Skip to content

Commit

Permalink
powerpc: Add const qual to local_read() parameter
Browse files Browse the repository at this point in the history
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.

Fixes: 316580b ("u64_stats: provide u64_stats_t type")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Reported-by: kbuild test robot <lkp@intel.com>
Acked-by: Michael Ellerman <mpe@ellerman.id.au>
Tested-by: Stephen Rothwell <sfr@canb.auug.org.au> # build only
Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
  • Loading branch information
Eric Dumazet authored and Jakub Kicinski committed Nov 24, 2019
1 parent c98dfcd commit c392bcc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/powerpc/include/asm/local.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit c392bcc

Please sign in to comment.