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]
Date:   Thu, 27 Oct 2022 21:32:24 +0000
From:   Barnabás Pőcze <pobrn@...tonmail.com>
To:     José Expósito <jose.exposito89@...il.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


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.


> +			return true;
> +	}
> +
> +	return false;
> +}
> [...]


Regards,
Barnabás Pőcze

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ