selftests: drv-net: fix missing include in ncdevmem
Subsystems (3)
Jakub Kicinski
maintainerPATCH 1/1 selftests: drv-net: fix missing include in ncdevmem
Commit ca9d74eb5f6a ("uapi: add INT_MAX and INT_MIN constants") recently removed some includes of limits.h in uAPI headers. ncdevmem.c was depending on them:
ncdevmem.c: In function ‘ethtool_add_flow’:
ncdevmem.c:369:60: error: ‘INT_MAX’ undeclared (first use in this function)
369 | if (endptr == id_start || flow_id < 0 || flow_id > INT_MAX)
| ^~~~~~~
ncdevmem.c:77:1: note: ‘INT_MAX’ is defined in header ‘<limits.h>’; did you forget to ‘#include <limits.h>’?
---
CC: [email protected]
CC: [email protected]
CC: [email protected]
CC: [email protected]
--- tools/testing/selftests/drivers/net/hw/ncdevmem.c | 1 + 1 file changed, 1 insertion(+)
tools/testing/selftests/drivers/net/hw/ncdevmem.c +1 -0
@@ -48,6 +48,7 @@#include <errno.h> #define __iovec_defined#include <fcntl.h> +#include <limits.h> #include <malloc.h> #include <error.h> #include <poll.h>
Signature · 1 line
2.52.0
Quoted 5 lines · Jakub Kicinski
Commit
ca9d74eb5f6a("uapi: addINT_MAXandINT_MINconstants") recently removed some includes oflimits.hin uAPI headers.ncdevmem.cwas depending on them:
Quoted 7 lines
ncdevmem.c: In function ‘ethtool_add_flow’:
ncdevmem.c:369:60: error: ‘INT_MAX’ undeclared (first use in this function)
369 | if (endptr ==id_start||flow_id< 0 ||flow_id>INT_MAX)
| ^~~~~~~
ncdevmem.c:77:1: note: ‘INT_MAX’ is defined in header ‘<limits.h>’; did you forget to ‘#include <limits.h>’?Signed-off-by Jakub Kicinski <[email protected]>
Signature · 2 lines
Thanks, Mina
This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:
Hello:
This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:
Quoted 11 lines · On Tue, 20 Jan 2026 10:03:19 -0800 you wrote:
Commit
ca9d74eb5f6a("uapi: addINT_MAXandINT_MINconstants") recently removed some includes oflimits.hin uAPI headers.ncdevmem.cwas depending on them:
ncdevmem.c: In function ‘ethtool_add_flow’:
ncdevmem.c:369:60: error: ‘INT_MAX’ undeclared (first use in this function)
369 | if (endptr ==id_start||flow_id< 0 ||flow_id>INT_MAX)
| ^~~~~~~
ncdevmem.c:77:1: note: ‘INT_MAX’ is defined in header ‘<limits.h>’; did you forget to ‘#include <limits.h>’?[...]
Here is the summary with links:
- [net-next] selftests: drv-net: fix missing include in ncdevmem
https://git.kernel.org/netdev/net-next/c/1802e9079f65
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html