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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZYMDYsWj3eONUnjs@smile.fi.intel.com>
Date: Wed, 20 Dec 2023 17:08:18 +0200
From: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To: Aleksandrs Vinarskis <alex.vinarskis@...il.com>
Cc: lee@...nel.org, linux-kernel@...r.kernel.org, hdegoede@...hat.com
Subject: Re: [PATCH v1 1/2] mfd: intel-lpss: Switch to generalized quirk table

On Wed, Dec 20, 2023 at 08:31:47AM +0100, Aleksandrs Vinarskis wrote:
> Introduce generic quirk table, and port existing walkaround for select
> Microsoft devices to it. This is a preparation for
> QUIRK_CLOCK_DIVIDER_UNITY.

...

> +	quirk_pci_info = pci_match_id(quirk_ids, pdev);
> +	if (quirk_pci_info) {
> +		quirk_lpss_info = (void *)quirk_pci_info->driver_data;
> +		info->quirks = quirk_lpss_info->quirks;
> +	}

Just use driver_data as the quirks. No need to have an intermediate data
structure. This will become as simple as

	quirk_pci_info = pci_match_id(quirk_ids, pdev);
	if (quirk_pci_info)
		info->quirks = quirk_pci_info->driver_data;

No ugly castings is a good side effect of the change.

...

>  

+ bits.h as you used BIT() below.

>  #include <linux/pm.h>
>  
> +#define QUIRK_IGNORE_RESOURCE_CONFLICTS BIT(0)

-- 
With Best Regards,
Andy Shevchenko



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ