Commit 0741f55
netfilter: nf_tables: Fix percpu address space issues in nf_tables_api.c
Compiling nf_tables_api.c results in several sparse warnings:
nf_tables_api.c:2077:31: warning: incorrect type in return expression (different address spaces)
nf_tables_api.c:2080:31: warning: incorrect type in return expression (different address spaces)
nf_tables_api.c:2084:31: warning: incorrect type in return expression (different address spaces)
nf_tables_api.c:2740:23: warning: incorrect type in assignment (different address spaces)
nf_tables_api.c:2752:38: warning: incorrect type in assignment (different address spaces)
nf_tables_api.c:2798:21: warning: incorrect type in argument 1 (different address spaces)
Use {ERR_PTR,IS_ERR,PTR_ERR}_PCPU() macros when crossing between generic
and percpu address spaces and add __percpu annotation to *stats pointer
to fix these warnings.
Found by GCC's named address space checks.
There were no changes in the resulting object files.
Signed-off-by: Uros Bizjak <ubizjak@gmail.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>1 parent 6c959fd commit 0741f55
1 file changed
+8
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2082 | 2082 | | |
2083 | 2083 | | |
2084 | 2084 | | |
2085 | | - | |
| 2085 | + | |
2086 | 2086 | | |
2087 | 2087 | | |
2088 | | - | |
| 2088 | + | |
2089 | 2089 | | |
2090 | 2090 | | |
2091 | 2091 | | |
2092 | | - | |
| 2092 | + | |
2093 | 2093 | | |
2094 | 2094 | | |
2095 | 2095 | | |
| |||
2533 | 2533 | | |
2534 | 2534 | | |
2535 | 2535 | | |
2536 | | - | |
| 2536 | + | |
2537 | 2537 | | |
2538 | 2538 | | |
2539 | | - | |
| 2539 | + | |
2540 | 2540 | | |
2541 | 2541 | | |
2542 | 2542 | | |
| |||
2650 | 2650 | | |
2651 | 2651 | | |
2652 | 2652 | | |
2653 | | - | |
| 2653 | + | |
2654 | 2654 | | |
2655 | 2655 | | |
2656 | 2656 | | |
| |||
2746 | 2746 | | |
2747 | 2747 | | |
2748 | 2748 | | |
2749 | | - | |
2750 | | - | |
| 2749 | + | |
| 2750 | + | |
2751 | 2751 | | |
2752 | 2752 | | |
2753 | 2753 | | |
| |||
0 commit comments