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] [day] [month] [year] [list]
Date:   Fri, 28 Oct 2022 10:16:56 +0200
From:   José Expósito <jose.exposito89@...il.com>
To:     Barnabás Pőcze <pobrn@...tonmail.com>
Cc:     jikos@...nel.org, benjamin.tissoires@...hat.com, spbnick@...il.com,
        linux-input@...r.kernel.org, linux-kernel@...r.kernel.org,
        Mia Kanashi <chad@...pilled.dev>,
        Andreas Grosse <andig.mail@...nline.de>
Subject: Re: [PATCH] HID: uclogic: Add support for XP-PEN Deco LW

Hi Barnabás,

Thanks for reviewing the patch.

On Thu, Oct 27, 2022 at 09:32:24PM +0000, Barnabás Pőcze wrote:
> Hi
> 
> 
> 2022. október 27., csütörtök 23:10 keltezéssel, José Expósito írta:
> 
> > [...]
> > +/**
> > + * uclogic_params_ugee_v2_has_battery() - check whether a UGEE v2 device has
> > + * battery or not.
> > + * @hdev:	The HID device of the tablet interface.
> > + *
> > + * Returns:
> > + *	True if the device has battery, false otherwise.
> > + */
> > +static bool uclogic_params_ugee_v2_has_battery(struct hid_device *hdev)
> > +{
> > +	/* The XP-PEN Deco LW vendor, product and version are identical to the
> > +	 * Deco L. The only difference reported by their firmware is the product
> > +	 * name. Add a quirk to support battery reporting on the wireless
> > +	 * version.
> > +	 */
> > +	if (hdev->vendor == USB_VENDOR_ID_UGEE &&
> > +	    hdev->product == USB_DEVICE_ID_UGEE_XPPEN_TABLET_DECO_L) {
> > +		struct usb_device *udev = hid_to_usb_dev(hdev);
> > +		const char *lw_name = "Deco LW";
> > +
> > +		if (strncmp(udev->product, lw_name, strlen(lw_name)) == 0)
> 
> Please use `strstarts()` here instead.

Good point, I'll send v2 in a minute with this change.

Jose
 
> 
> > +			return true;
> > +	}
> > +
> > +	return false;
> > +}
> > [...]
> 
> 
> Regards,
> Barnabás Pőcze

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ