Skip to contentSkip to conversation

binderfs: use correct include guards in header

PATCH New Christian Brauner 1 participant 2 messages Jan 21, 2019 VFS

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 binderfs: use correct include guards in header

When we switched over from binder_ctl.h to binderfs.h we forgot to change the include guards. It's minor but it's obviously correct.

---
 include/uapi/linux/android/binderfs.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
include/uapi/linux/android/binderfs.h +3 -3
index 65b2efd1a0a5..b41628b77120 100644
@@ -4,8 +4,8 @@
  *
  */
 
-#ifndef _UAPI_LINUX_BINDER_CTL_H
-#define _UAPI_LINUX_BINDER_CTL_H
+#ifndef _UAPI_LINUX_BINDERFS_H
+#define _UAPI_LINUX_BINDERFS_H
 
 #include <linux/android/binder.h>
 #include <linux/types.h>
@@ -31,5 +31,5 @@ struct binderfs_device {
  */
 #define BINDER_CTL_ADD _IOWR('b', 1, struct binderfs_device)
 
-#endif /* _UAPI_LINUX_BINDER_CTL_H */
+#endif /* _UAPI_LINUX_BINDERFS_H */
 
Signature · 1 line
2.19.1
#1 lore raw

PATCH 2/2 binderfs: use __u32 for device numbers

We allow more then 255 binderfs binder devices to be created since there are workloads that require more than that. If we use __u8 we'll overflow after 255. So let's use a __u32.
Note that there's no released kernel with binderfs out there so this is not a regression.

---
 include/uapi/linux/android/binderfs.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
include/uapi/linux/android/binderfs.h +2 -2
index b41628b77120..87410477aea9 100644
@@ -22,8 +22,8 @@
  */
 struct binderfs_device {
 	char name[BINDERFS_MAX_NAME + 1];
-	__u8 major;
-	__u8 minor;
+	__u32 major;
+	__u32 minor;
 };
 
 /**
Signature · 1 line
2.19.1