lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAK8P3a2NP=mTO9z8_wtbjExAfGsPaGhaa=srEuR4hA9HbPNUFg@mail.gmail.com>
Date:   Fri, 28 Jul 2017 16:29:34 +0200
From:   Arnd Bergmann <arnd@...db.de>
To:     Jason Gerecke <killertofu@...il.com>
Cc:     Jiri Kosina <jikos@...nel.org>,
        Jason Gerecke <jason.gerecke@...om.com>,
        Benjamin Tissoires <benjamin.tissoires@...hat.com>,
        "open list:HID CORE LAYER" <linux-input@...r.kernel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] HID: wacom: add USB_HID dependency

On Fri, Jul 28, 2017 at 4:24 PM, Jason Gerecke <killertofu@...il.com> wrote:
> On Fri, Jul 28, 2017 at 7:18 AM, Arnd Bergmann <arnd@...db.de> wrote:
>> On Fri, Jul 28, 2017 at 4:07 PM, Jason Gerecke <killertofu@...il.com> wrote:

>> #ifdef CONFIG_USB_HID
>> extern bool hid_is_using_usb_driver(struct hid_device *hdev)
>> #else
>> static inline bool hid_is_using_usb_driver(struct hid_device *hdev)
>> {
>>        return false;
>> }
>> #endif
>>
>> but is it worth it to avoid the dependency?
>>
>>        Arnd
>
> I was thinking something more along the lines of the following since
> the idea of per-transport helper functions was dismissed earlier:
>
> #ifdef CONFIG_USB_HID
>                 if (hid_is_using_ll_driver(wacom->hdev, &usb_hid_driver)) {

I would consider that rather ugly, a driver shouldn't really use
#ifdef like this, but you can hide stuff like this in a header. The method
I proposed also has the advantage of avoiding exporting the
usb_hid_driver object. Drivers shouldn't really need to access this,
and wacom_sys.c is the only remaining user of the export.

      Arnd

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ