uhid: Remove local copy of uhid header
Subsystems (2)
Luiz Augusto von Dentz
maintainerPATCH v2 1/1 uhid: Remove local copy of uhid header
From: Luiz Augusto von Dentz <[email protected]>
uhid.h is part of kernel uapi nowadays so it can be included directly from linux/uhid.h so this removes the local copy to use it instead.
--- Makefile.plugins | 2 +- profiles/input/uhid_copy.h | 199 ------------------------------------- src/shared/uhid.h | 3 +- 3 files changed, 2 insertions(+), 202 deletions(-) delete mode 100644 profiles/input/uhid_copy.h
Makefile.plugins +1 -1
@@ -68,7 +68,7 @@ endif if HOG builtin_modules += hog -builtin_sources += profiles/input/hog.c profiles/input/uhid_copy.h \ +builtin_sources += profiles/input/hog.c \ profiles/input/hog-lib.c profiles/input/hog-lib.h \ profiles/deviceinfo/dis.c profiles/deviceinfo/dis.h \ profiles/battery/bas.c profiles/battery/bas.h \
profiles/input/uhid_copy.h deleted +0 -199
199 lines not on this page · raw message
src/shared/uhid.h +1 -2
@@ -10,8 +10,7 @@#include <stdbool.h> #include <stdint.h> - -#include "profiles/input/uhid_copy.h" +#include <linux/uhid.h> struct bt_uhid ;
Signature · 1 line
2.33.1
This is automated email and please do not reply to this email!
Dear submitter,
Thank you for submitting the patches to the linux bluetooth mailing list. This is a CI test results with your patch series:
PW Link:https://patchwork.kernel.org/project/bluetooth/list/?series=584157
---Test result---
Test Summary:
CheckPatch PASS 1.37 seconds GitLint PASS 0.97 seconds Prep - Setup ELL PASS 42.74 seconds Build - Prep PASS 0.50 seconds Build - Configure PASS 8.03 seconds Build - Make PASS 182.26 seconds Make Check PASS 9.75 seconds Make Distcheck PASS 218.98 seconds Build w/ext ELL - Configure PASS 8.10 seconds Build w/ext ELL - Make PASS 173.15 seconds
---
Regards,
Linux Bluetooth
Quoted 5 lines · Luiz Augusto von Dentz
From: Luiz Augusto von Dentz <[email protected]>
uhid.his part of kernel uapi nowadays so it can be included directly fromlinux/uhid.hso this removes the local copy to use it instead.
This will cause the same problems that importing those headers into the repository was supposed to solve. If you remove those headers, then older distributions will be stuck on old kernel headers, and bluez compilations will regularly fail when it uses new structs, struct members, functions, or constants that are in the upstream uapi headers but not yet propagated to the user's distribution.
Strong NAK on this one and the uinput header change too.
Luiz Augusto von Dentz
maintainerHi Bastien,
Quoted 8 lines · Bastien Nocera
Quoted 5 lines · Luiz Augusto von Dentz
From: Luiz Augusto von Dentz <[email protected]>
uhid.his part of kernel uapi nowadays so it can be included directly fromlinux/uhid.hso this removes the local copy to use it instead.
Quoted 6 lines
This will cause the same problems that importing those headers into the repository was supposed to solve. If you remove those headers, then older distributions will be stuck on old kernel headers, and bluez compilations will regularly fail when it uses new structs, struct members, functions, or constants that are in the upstream uapi headers but not yet propagated to the user's distribution.
I'm not following you on this, the distros don't have uapi headers that match their kernel release? Afaik being a kernel uapi means these APIs are considered stable and I suspect they haven't been changed in a while, you are right that this introduces a kernel dependency if we were to use new members but I still think this is better than having copies that at some point goes out of sync, specially when nothing indicates that things like input_event was not accepted by the kernel.
Quoted 1 line
Strong NAK on this one and the uinput header change too.
I didn't introduce the usage of any new symbols, so the only new requirement is that linux/uinput.h and linux/uhid.h headers exist, I could however rollback if we have another way to check if those headers exists use then otherwise we can keep using copies, perhaps move then under linux/ directory, anyway it is not like we don't have kernel dependencies already and we actually have been debating on having the bluetooth socket definitions as part of the uapi instead of libbluetooth, so we will need to sort out how we can update the userspace parts with new kernel interface without breaking the build on systems that don't actually ship with e.g. linux/bluetooth.h.
Signature · 1 line
Luiz Augusto von Dentz
Quoted 22 lines · Luiz Augusto von Dentz
Hi Bastien,
Quoted 9 lines · Bastien Nocera
Quoted 6 lines · Luiz Augusto von Dentz
From: Luiz Augusto von Dentz <[email protected]>
uhid.his part of kernel uapi nowadays so it can be included directly fromlinux/uhid.hso this removes the local copy to use it
instead.Quoted 8 lines
This will cause the same problems that importing those headers into the
repository was supposed to solve. If you remove those headers, then older distributions will be stuck on old kernel headers, and bluez compilations will regularly fail when it uses new structs, struct members, functions, or constants that are in the upstream uapi headers
but not yet propagated to the user's distribution.
Quoted 9 lines
I'm not following you on this, the distros don't have uapi headers that match their kernel release? Afaik being a kernel uapi means these
APIs are considered stable and I suspect they haven't been changed in a while, you are right that this introduces a kernel dependency if we were to use new members but I still think this is better than having copies that at some point goes out of sync, specially when nothing indicates that things likeinput_eventwas not accepted by the kernel.
Let's say you want to use a KEY_* definition that was recently added to the kernel, what would you do?
Quoted 13 lines
Quoted 1 line
Strong NAK on this one and the uinput header change too.
I didn't introduce the usage of any new symbols, so the only new requirement is that
linux/uinput.handlinux/uhid.hheaders exist, I could however rollback if we have another way to check if those headers exists use then otherwise we can keep using copies, perhaps move then under linux/ directory, anyway it is not like we don't have kernel dependencies already and we actually have been debating on having the bluetooth socket definitions as part of the uapi instead of
libbluetooth, so we will need to sort out how we can update the userspace parts with new kernel interface without breaking the build on systems that don't actually ship with e.g.linux/bluetooth.h.
You're talking about the state of things now, I'm talking about the compilation failures once you rely on a slightly newer header that isn't shipped with a distribution.
But if you're willing to react to the compilation failure in the future, I can't really stand in your way. It just seems weird to do this now just to undo it the moment you'll need a slightly newer kernel header.
Cheers
Marcel Holtmann
maintainerHi Batien,
Quoted 41 lines
Quoted 14 lines
Quoted 5 lines
Quoted 4 lines
uhid.his part of kernel uapi nowadays so it can be included directly fromlinux/uhid.hso this removes the local copy to use it
instead.Quoted 8 lines
This will cause the same problems that importing those headers into the
repository was supposed to solve. If you remove those headers, then older distributions will be stuck on old kernel headers, and bluez compilations will regularly fail when it uses new structs, struct members, functions, or constants that are in the upstream uapi headers
but not yet propagated to the user's distribution.Quoted 9 lines
I'm not following you on this, the distros don't have uapi headers that match their kernel release? Afaik being a kernel uapi means these
APIs are considered stable and I suspect they haven't been changed in a while, you are right that this introduces a kernel dependency if we were to use new members but I still think this is better than having copies that at some point goes out of sync, specially when nothing indicates that things likeinput_eventwas not accepted by the kernel.Let's say you want to use a KEY_* definition that was recently added to the kernel, what would you do?
Quoted 13 lines
Quoted 1 line
Strong NAK on this one and the uinput header change too.
I didn't introduce the usage of any new symbols, so the only new requirement is that
linux/uinput.handlinux/uhid.hheaders exist, I could however rollback if we have another way to check if those headers exists use then otherwise we can keep using copies, perhaps move then under linux/ directory, anyway it is not like we don't have kernel dependencies already and we actually have been debating on having the bluetooth socket definitions as part of the uapi instead of
libbluetooth, so we will need to sort out how we can update the userspace parts with new kernel interface without breaking the build on systems that don't actually ship with e.g.linux/bluetooth.h.
Quoted 8 lines
You're talking about the state of things now, I'm talking about the compilation failures once you rely on a slightly newer header that isn't shipped with a distribution.
But if you're willing to react to the compilation failure in the future, I can't really stand in your way. It just seems weird to do this now just to undo it the moment you'll need a slightly newer kernel header.
if I can’t build the tarballs on 5.10.0-7-powerpc, then they don’t get released.
Regards
Marcel
Luiz Augusto von Dentz
maintainerHi Marcel, Bastien,
Quoted 48 lines · Marcel Holtmann
Hi Batien,
Quoted 45 lines
Quoted 14 lines
Quoted 5 lines
Quoted 4 lines
uhid.his part of kernel uapi nowadays so it can be included directly fromlinux/uhid.hso this removes the local copy to use it
instead.Quoted 8 lines
This will cause the same problems that importing those headers into the
repository was supposed to solve. If you remove those headers, then older distributions will be stuck on old kernel headers, and bluez compilations will regularly fail when it uses new structs, struct members, functions, or constants that are in the upstream uapi headers
but not yet propagated to the user's distribution.Quoted 9 lines
I'm not following you on this, the distros don't have uapi headers that match their kernel release? Afaik being a kernel uapi means these
APIs are considered stable and I suspect they haven't been changed in a while, you are right that this introduces a kernel dependency if we were to use new members but I still think this is better than having copies that at some point goes out of sync, specially when nothing indicates that things likeinput_eventwas not accepted by the kernel.Let's say you want to use a KEY_* definition that was recently added to the kernel, what would you do?
Quoted 13 lines
Quoted 1 line
Strong NAK on this one and the uinput header change too.
I didn't introduce the usage of any new symbols, so the only new requirement is that
linux/uinput.handlinux/uhid.hheaders exist, I could however rollback if we have another way to check if those headers exists use then otherwise we can keep using copies, perhaps move then under linux/ directory, anyway it is not like we don't have kernel dependencies already and we actually have been debating on having the bluetooth socket definitions as part of the uapi instead of
libbluetooth, so we will need to sort out how we can update the userspace parts with new kernel interface without breaking the build on systems that don't actually ship with e.g.linux/bluetooth.h.You're talking about the state of things now, I'm talking about the compilation failures once you rely on a slightly newer header that isn't shipped with a distribution.
Quoted 6 lines
Quoted 4 lines
But if you're willing to react to the compilation failure in the future, I can't really stand in your way. It just seems weird to do this now just to undo it the moment you'll need a slightly newer kernel header.
if I can’t build the tarballs on 5.10.0-7-powerpc, then they don’t get released.
The way I see this is only really a problem for unstable uapi headers, so in case we are early adopters it is probably a good practice to have a copy to make sure the packages can be compiled on systems without these headers, once these headers becomes stable and most distros already ship with them, imo, there is no reason to keep the copies as they are not subject to major redesign and normally just receive minor updates for bugs, etc, which is the kind of change we would likely miss given we were no longer paying attention to changes on those headers as they are considered stable.
Also we might as well include these headers to be check like we do in the following check:
https://git.kernel.org/pub/scm/bluetooth/bluez.git/tree/configure.ac#n66
Signature · 1 line
Luiz Augusto von Dentz