提交 c392bccf 编写于 作者: E Eric Dumazet 提交者: Jakub Kicinski

powerpc: Add const qual to local_read() parameter

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: 316580b6 ("u64_stats: provide u64_stats_t type")
Signed-off-by: NEric Dumazet <edumazet@google.com>
Reported-by: Nkbuild test robot <lkp@intel.com>
Acked-by: NMichael Ellerman <mpe@ellerman.id.au>
Tested-by: Stephen Rothwell <sfr@canb.auug.org.au> # build only
Signed-off-by: NJakub Kicinski <jakub.kicinski@netronome.com>
上级 c98dfcd3
......@@ -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);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册