diff options
| author | Alan Maguire <alan.maguire@oracle.com> | 2026-04-27 14:22:05 +0300 |
|---|---|---|
| committer | Alexei Starovoitov <ast@kernel.org> | 2026-04-27 20:09:48 +0300 |
| commit | 79b8ebcbe483fee401e1b91dd32470348d9aa5b8 (patch) | |
| tree | 85eb0634f99cb8b0b66c3d109d3b51f05a73f753 | |
| parent | 00eabbf88de32c2b51c9c156beed2a7eaac9b8d0 (diff) | |
| download | linux-79b8ebcbe483fee401e1b91dd32470348d9aa5b8.tar.xz | |
bpf: Export cnum_umin/umax() helpers for netronome driver
ERROR: modpost: "cnum64_umin" [drivers/net/ethernet/netronome/nfp/nfp.ko] undefined!
ERROR: modpost: "cnum64_umax" [drivers/net/ethernet/netronome/nfp/nfp.ko] undefined!
Export symbols for these references.
Reported-by: Kaitao Cheng <pilgrimtao@gmail.com>
Fixes: bbc631085503 ("bpf: replace min/max fields with struct cnum{32,64}")
Signed-off-by: Alan Maguire <alan.maguire@oracle.com>
Acked-by: Eduard Zingerman <eddyz87@gmail.com>
Link: https://lore.kernel.org/r/20260427112205.1346733-1-alan.maguire@oracle.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
| -rw-r--r-- | kernel/bpf/cnum_defs.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/kernel/bpf/cnum_defs.h b/kernel/bpf/cnum_defs.h index 1f232138b6e9..a90e317e3578 100644 --- a/kernel/bpf/cnum_defs.h +++ b/kernel/bpf/cnum_defs.h @@ -6,6 +6,7 @@ #endif #include <linux/cnum.h> +#include <linux/kernel.h> #include <linux/limits.h> #include <linux/minmax.h> #include <linux/compiler_types.h> @@ -48,11 +49,13 @@ ut FN(umin)(struct cnum_t cnum) { return FN(urange_overflow)(cnum) ? 0 : cnum.base; } +EXPORT_SYMBOL_GPL(FN(umin)); ut FN(umax)(struct cnum_t cnum) { return FN(urange_overflow)(cnum) ? UT_MAX : cnum.base + cnum.size; } +EXPORT_SYMBOL_GPL(FN(umax)); /* True if this cnum represents two signed ranges. */ static inline bool FN(srange_overflow)(struct cnum_t cnum) |
