Skip to contentSkip to conversation

devlink: include <linux/const.h> for _BITUL

net-next Applied Jacob Keller 2 participants 2 messages Sep 29, 2020

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

Commit 5d5b4128c4ca ("devlink: introduce flash update overwrite mask") added a usage of _BITUL to the UAPI <linux/devlink.h> header, but failed to include the header file where it was defined. It happens that this does not break any existing kernel include chains because it gets included through other sources. However, when including the UAPI headers in a userspace application (such as devlink in iproute2), _BITUL is not defined.

Fixes 5d5b4128c4ca ("devlink: introduce flash update overwrite mask")

---

I believe this is the appropriate fix for the issue Dave reported at [1], vs working around it by including uapi/linux/const.h in the devlink.c file in iproute2.

[1] https://lore.kernel.org/netdev/[email protected]/

 include/uapi/linux/devlink.h | 2 ++
 1 file changed, 2 insertions(+)
include/uapi/linux/devlink.h +2 -0
index 7b0face1bad5..ba467dc07852 100644
@@ -13,6 +13,8 @@
 #ifndef _UAPI_LINUX_DEVLINK_H_
 #define _UAPI_LINUX_DEVLINK_H_
 
+#include <linux/const.h>
+
 #define DEVLINK_GENL_NAME "devlink"
 #define DEVLINK_GENL_VERSION 0x1
 #define DEVLINK_GENL_MCGRP_CONFIG_NAME "config"

base-commit: 280095713ce244e8dbdfb059cdca695baa72230a

Signature · 1 line
2.28.0.497.g54e85e7af1ac
maintainer Applied
#1 lore raw

From: Jacob Keller <[email protected]>
Date: Tue, 29 Sep 2020 11:08:59 -0700

Quoted 10 lines

Commit 5d5b4128c4ca ("devlink: introduce flash update overwrite mask") added a usage of _BITUL to the UAPI <linux/devlink.h> header, but failed to include the header file where it was defined. It happens that this does not break any existing kernel include chains because it gets included through other sources. However, when including the UAPI headers in a userspace application (such as devlink in iproute2), _BITUL is not defined.

Fixes 5d5b4128c4ca ("devlink: introduce flash update overwrite mask")

Applied.