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: <371fc87d-ade3-51b8-6f56-4d99dad88873@redhat.com>
Date:   Fri, 6 Oct 2023 19:08:35 +0200
From:   Hans de Goede <hdegoede@...hat.com>
To:     Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
        acpi4asus-user@...ts.sourceforge.net,
        platform-driver-x86@...r.kernel.org, linux-kernel@...r.kernel.org
Cc:     João Paulo Rechi Vita <jprvita@...il.com>,
        Corentin Chary <corentin.chary@...il.com>,
        Ilpo Järvinen <ilpo.jarvinen@...ux.intel.com>,
        Mark Gross <markgross@...nel.org>
Subject: Re: [PATCH v3 1/1] platform/x86: asus-wireless: Replace open coded
 acpi_match_device()

Hi,

On 10/6/23 17:53, Andy Shevchenko wrote:
> Replace open coded acpi_match_device() in asus_wireless_add().
> 
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
> ---
> v3: rewrote error path logic (Hans)
> v2: fixed compilation error
>  drivers/platform/x86/asus-wireless.c | 12 ++++--------
>  1 file changed, 4 insertions(+), 8 deletions(-)

Thanks, patch looks good to me now:

Reviewed-by: Hans de Goede <hdegoede@...hat.com>

Regards,

Hans


> 
> diff --git a/drivers/platform/x86/asus-wireless.c b/drivers/platform/x86/asus-wireless.c
> index abf01e00b799..1a571efa02eb 100644
> --- a/drivers/platform/x86/asus-wireless.c
> +++ b/drivers/platform/x86/asus-wireless.c
> @@ -148,16 +148,12 @@ static int asus_wireless_add(struct acpi_device *adev)
>  	if (err)
>  		return err;
>  
> -	for (id = device_ids; id->id[0]; id++) {
> -		if (!strcmp((char *) id->id, acpi_device_hid(adev))) {
> -			data->hswc_params =
> -				(const struct hswc_params *)id->driver_data;
> -			break;
> -		}
> -	}
> -	if (!data->hswc_params)
> +	id = acpi_match_device(device_ids, adev);
> +	if (!id)
>  		return 0;
>  
> +	data->hswc_params = (const struct hswc_params *)id->driver_data;
> +
>  	data->wq = create_singlethread_workqueue("asus_wireless_workqueue");
>  	if (!data->wq)
>  		return -ENOMEM;

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ