]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
bpf: Export cnum_umin/umax() helpers for netronome driver
authorAlan Maguire <alan.maguire@oracle.com>
Mon, 27 Apr 2026 11:22:05 +0000 (12:22 +0100)
committerAlexei Starovoitov <ast@kernel.org>
Mon, 27 Apr 2026 17:09:48 +0000 (10:09 -0700)
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>
kernel/bpf/cnum_defs.h

index 1f232138b6e9c71d3d8992c493905df989608b03..a90e317e35780f37f7bd61205ea7b03e1a580020 100644 (file)
@@ -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)