mbox series

[v3,0/6] Refine _UID references across kernel

Message ID 20231024062018.23839-1-raag.jadav@intel.com
Headers show
Series Refine _UID references across kernel | expand

Message

Raag Jadav Oct. 24, 2023, 6:20 a.m. UTC
This series refines _UID references across kernel by:

- Extracting _UID matching functionality from acpi_dev_hid_uid_match()
  helper and introducing it as a separate acpi_dev_uid_match() helper.

- Converting manual _UID references to use the standard ACPI helpers.

Changes since v2:
- Drop review tags as suggested by Andy.

Changes since v1:
- Change acpi_dev_uid_match() to return false in case of NULL argument.
- Drop accepted patches.

Raag Jadav (6):
  ACPI: utils: Introduce acpi_dev_uid_match() for matching _UID
  pinctrl: intel: use acpi_dev_uid_match() for matching _UID
  ACPI: utils: use acpi_dev_uid_match() for matching _UID
  ACPI: x86: use acpi_dev_uid_match() for matching _UID
  hwmon: nct6775: use acpi_dev_hid_uid_match() for matching _HID and
    _UID
  perf: arm_cspmu: use acpi_dev_hid_uid_match() for matching _HID and
    _UID

 drivers/acpi/utils.c                  | 34 ++++++++++++++++++++++-----
 drivers/acpi/x86/utils.c              |  3 +--
 drivers/hwmon/nct6775-platform.c      |  4 +---
 drivers/perf/arm_cspmu/arm_cspmu.c    |  8 +++----
 drivers/pinctrl/intel/pinctrl-intel.c |  2 +-
 include/acpi/acpi_bus.h               |  1 +
 include/linux/acpi.h                  |  5 ++++
 7 files changed, 40 insertions(+), 17 deletions(-)


base-commit: a4ed5bffbeb19cfb7e21ac3b3f09d7bfe39a849b

Comments

Mika Westerberg Oct. 24, 2023, 9:28 a.m. UTC | #1
On Tue, Oct 24, 2023 at 11:50:13AM +0530, Raag Jadav wrote:
> +/**
> + * acpi_dev_uid_match - Match device by supplied UID
> + * @adev: ACPI device to match.
> + * @uid2: Unique ID of the device.
> + *
> + * Matches UID in @adev with given @uid2.
> + *
> + * Returns:
> + *  - %true if matches.
> + *  - %false otherwise.

Nit: these actually do not get formatted like above so you can just
write it as

Returns: %true in case UIDs match, %false otherwise.

If it is even needed, I think it is pretty obvious from the function
name what it returns.
Andy Shevchenko Oct. 24, 2023, 10:57 a.m. UTC | #2
On Tue, Oct 24, 2023 at 12:28:39PM +0300, Mika Westerberg wrote:
> On Tue, Oct 24, 2023 at 11:50:13AM +0530, Raag Jadav wrote:

...

> > + * Returns:
> > + *  - %true if matches.
> > + *  - %false otherwise.
> 
> Nit: these actually do not get formatted like above so you can just
> write it as
> 
> Returns: %true in case UIDs match, %false otherwise.
> 
> If it is even needed, I think it is pretty obvious from the function
> name what it returns.

kernel-doc complains if there is no Return: section in the text.
Rafael J. Wysocki Oct. 24, 2023, 7:51 p.m. UTC | #3
On Tue, Oct 24, 2023 at 11:30 AM Mika Westerberg
<mika.westerberg@linux.intel.com> wrote:
>
> On Tue, Oct 24, 2023 at 11:50:12AM +0530, Raag Jadav wrote:
> > This series refines _UID references across kernel by:
> >
> > - Extracting _UID matching functionality from acpi_dev_hid_uid_match()
> >   helper and introducing it as a separate acpi_dev_uid_match() helper.
> >
> > - Converting manual _UID references to use the standard ACPI helpers.
> >
> > Changes since v2:
> > - Drop review tags as suggested by Andy.
> >
> > Changes since v1:
> > - Change acpi_dev_uid_match() to return false in case of NULL argument.
> > - Drop accepted patches.
> >
> > Raag Jadav (6):
> >   ACPI: utils: Introduce acpi_dev_uid_match() for matching _UID
> >   pinctrl: intel: use acpi_dev_uid_match() for matching _UID
> >   ACPI: utils: use acpi_dev_uid_match() for matching _UID
> >   ACPI: x86: use acpi_dev_uid_match() for matching _UID
> >   hwmon: nct6775: use acpi_dev_hid_uid_match() for matching _HID and
> >     _UID
> >   perf: arm_cspmu: use acpi_dev_hid_uid_match() for matching _HID and
> >     _UID
>
> For the series,
>
> Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>
>
> >  drivers/acpi/utils.c                  | 34 ++++++++++++++++++++++-----
> >  drivers/acpi/x86/utils.c              |  3 +--
> >  drivers/hwmon/nct6775-platform.c      |  4 +---
> >  drivers/perf/arm_cspmu/arm_cspmu.c    |  8 +++----
> >  drivers/pinctrl/intel/pinctrl-intel.c |  2 +-
>
> This pinctrl one is also fine by me so if Andy does not have objections,
> feel free to add my,
>
> Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com>

Whole series applied as 6.7 material with tags as per the above, thanks!
Guenter Roeck Oct. 25, 2023, 2:05 a.m. UTC | #4
On Tue, Oct 24, 2023 at 09:51:08PM +0200, Rafael J. Wysocki wrote:
> On Tue, Oct 24, 2023 at 11:30 AM Mika Westerberg
> <mika.westerberg@linux.intel.com> wrote:
> >
> > On Tue, Oct 24, 2023 at 11:50:12AM +0530, Raag Jadav wrote:
> > > This series refines _UID references across kernel by:
> > >
> > > - Extracting _UID matching functionality from acpi_dev_hid_uid_match()
> > >   helper and introducing it as a separate acpi_dev_uid_match() helper.
> > >
> > > - Converting manual _UID references to use the standard ACPI helpers.
> > >
> > > Changes since v2:
> > > - Drop review tags as suggested by Andy.
> > >
> > > Changes since v1:
> > > - Change acpi_dev_uid_match() to return false in case of NULL argument.
> > > - Drop accepted patches.
> > >
> > > Raag Jadav (6):
> > >   ACPI: utils: Introduce acpi_dev_uid_match() for matching _UID
> > >   pinctrl: intel: use acpi_dev_uid_match() for matching _UID
> > >   ACPI: utils: use acpi_dev_uid_match() for matching _UID
> > >   ACPI: x86: use acpi_dev_uid_match() for matching _UID
> > >   hwmon: nct6775: use acpi_dev_hid_uid_match() for matching _HID and
> > >     _UID
> > >   perf: arm_cspmu: use acpi_dev_hid_uid_match() for matching _HID and
> > >     _UID
> >
> > For the series,
> >
> > Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>
> >
> > >  drivers/acpi/utils.c                  | 34 ++++++++++++++++++++++-----
> > >  drivers/acpi/x86/utils.c              |  3 +--
> > >  drivers/hwmon/nct6775-platform.c      |  4 +---
> > >  drivers/perf/arm_cspmu/arm_cspmu.c    |  8 +++----
> > >  drivers/pinctrl/intel/pinctrl-intel.c |  2 +-
> >
> > This pinctrl one is also fine by me so if Andy does not have objections,
> > feel free to add my,
> >
> > Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com>
> 
> Whole series applied as 6.7 material with tags as per the above, thanks!

Ok, that means I will _not_ apply the hwmon patch through
the hwmon tree.

FWIW, please note that I would have very much preferred applying
it through the hwmon tree, and I did _not_ Ack it.

Guenter
Rafael J. Wysocki Oct. 25, 2023, 11:32 a.m. UTC | #5
On Wed, Oct 25, 2023 at 4:05 AM Guenter Roeck <linux@roeck-us.net> wrote:
>
> On Tue, Oct 24, 2023 at 09:51:08PM +0200, Rafael J. Wysocki wrote:
> > On Tue, Oct 24, 2023 at 11:30 AM Mika Westerberg
> > <mika.westerberg@linux.intel.com> wrote:
> > >
> > > On Tue, Oct 24, 2023 at 11:50:12AM +0530, Raag Jadav wrote:
> > > > This series refines _UID references across kernel by:
> > > >
> > > > - Extracting _UID matching functionality from acpi_dev_hid_uid_match()
> > > >   helper and introducing it as a separate acpi_dev_uid_match() helper.
> > > >
> > > > - Converting manual _UID references to use the standard ACPI helpers.
> > > >
> > > > Changes since v2:
> > > > - Drop review tags as suggested by Andy.
> > > >
> > > > Changes since v1:
> > > > - Change acpi_dev_uid_match() to return false in case of NULL argument.
> > > > - Drop accepted patches.
> > > >
> > > > Raag Jadav (6):
> > > >   ACPI: utils: Introduce acpi_dev_uid_match() for matching _UID
> > > >   pinctrl: intel: use acpi_dev_uid_match() for matching _UID
> > > >   ACPI: utils: use acpi_dev_uid_match() for matching _UID
> > > >   ACPI: x86: use acpi_dev_uid_match() for matching _UID
> > > >   hwmon: nct6775: use acpi_dev_hid_uid_match() for matching _HID and
> > > >     _UID
> > > >   perf: arm_cspmu: use acpi_dev_hid_uid_match() for matching _HID and
> > > >     _UID
> > >
> > > For the series,
> > >
> > > Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>
> > >
> > > >  drivers/acpi/utils.c                  | 34 ++++++++++++++++++++++-----
> > > >  drivers/acpi/x86/utils.c              |  3 +--
> > > >  drivers/hwmon/nct6775-platform.c      |  4 +---
> > > >  drivers/perf/arm_cspmu/arm_cspmu.c    |  8 +++----
> > > >  drivers/pinctrl/intel/pinctrl-intel.c |  2 +-
> > >
> > > This pinctrl one is also fine by me so if Andy does not have objections,
> > > feel free to add my,
> > >
> > > Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com>
> >
> > Whole series applied as 6.7 material with tags as per the above, thanks!
>
> Ok, that means I will _not_ apply the hwmon patch through
> the hwmon tree.
>
> FWIW, please note that I would have very much preferred applying
> it through the hwmon tree, and I did _not_ Ack it.

OK, I'll drop it now and please feel free to pick it up (whenever it
is convenient to do so), or if you'd rather let me carry it, please
let me know.

It's only been in my bleeding-edge branch so far.
Guenter Roeck Oct. 25, 2023, 6:59 p.m. UTC | #6
On Tue, Oct 24, 2023 at 11:50:17AM +0530, Raag Jadav wrote:
> Convert manual _UID references to use the standard ACPI helper.
> 
> Signed-off-by: Raag Jadav <raag.jadav@intel.com>

Applied.

Guenter