mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-23 15:11:16 +00:00
percpu: remove compile warnings caused by __verify_pcpu_ptr()
If percpu pointer is const, __verify_pcpu_ptr() triggers warnings like the following. drivers/net/loopback.c: In function 'loopback_get_stats': drivers/net/loopback.c:109: warning: initialization discards qualifiers from pointer target type Fix it by adding const to the verification target pointer used in __verify_pcpu_ptr(). Signed-off-by: Tejun Heo <tj@kernel.org> Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
This commit is contained in:
parent
545695fb41
commit
85438592f1
1 changed files with 1 additions and 1 deletions
|
@ -24,7 +24,7 @@
|
||||||
* input parameter is a percpu pointer.
|
* input parameter is a percpu pointer.
|
||||||
*/
|
*/
|
||||||
#define __verify_pcpu_ptr(ptr) do { \
|
#define __verify_pcpu_ptr(ptr) do { \
|
||||||
void __percpu *__vpp_verify = (typeof(ptr))NULL; \
|
const void __percpu *__vpp_verify = (typeof(ptr))NULL; \
|
||||||
(void)__vpp_verify; \
|
(void)__vpp_verify; \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue