public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Aleksandrs Vinarskis <alex.vinarskis@gmail.com>
Cc: lee@kernel.org, linux-kernel@vger.kernel.org, hdegoede@redhat.com
Subject: Re: [PATCH v1 1/2] mfd: intel-lpss: Switch to generalized quirk table
Date: Wed, 20 Dec 2023 17:08:18 +0200	[thread overview]
Message-ID: <ZYMDYsWj3eONUnjs@smile.fi.intel.com> (raw)
In-Reply-To: <20231220073148.19402-2-alex.vinarskis@gmail.com>

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



  reply	other threads:[~2023-12-20 15:08 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-20  7:31 [PATCH v1 0/2] Fix LPSS clock divider for XPS 9530 Aleksandrs Vinarskis
2023-12-20  7:31 ` [PATCH v1 1/2] mfd: intel-lpss: Switch to generalized quirk table Aleksandrs Vinarskis
2023-12-20 15:08   ` Andy Shevchenko [this message]
2023-12-20  7:31 ` [PATCH v1 2/2] mfd: intel-lpss: Introduce QUIRK_CLOCK_DIVIDER_UNITY for XPS 9530 Aleksandrs Vinarskis
2023-12-20 15:12   ` Andy Shevchenko
2023-12-20 20:56 ` [PATCH v2 0/2] Fix LPSS clock divider " Aleksandrs Vinarskis
2023-12-20 20:56   ` [PATCH v2 1/2] mfd: intel-lpss: Switch to generalized quirk table Aleksandrs Vinarskis
2023-12-21 12:41     ` Andy Shevchenko
2023-12-21 12:46       ` Andy Shevchenko
2023-12-20 20:56   ` [PATCH v2 2/2] mfd: intel-lpss: Introduce QUIRK_CLOCK_DIVIDER_UNITY for XPS 9530 Aleksandrs Vinarskis
2023-12-21 12:42     ` Andy Shevchenko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZYMDYsWj3eONUnjs@smile.fi.intel.com \
    --to=andriy.shevchenko@linux.intel.com \
    --cc=alex.vinarskis@gmail.com \
    --cc=hdegoede@redhat.com \
    --cc=lee@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox