Linux GPIO subsystem development
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: "Marco Scardovi (scardracs)" <mscardovi95@gmail.com>
Cc: Linus Walleij <linusw@kernel.org>,
	Bartosz Golaszewski <brgl@kernel.org>,
	Mika Westerberg <westeri@kernel.org>,
	linux-gpio@vger.kernel.org, linux-acpi@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 00/12] gpiolib: acpi: Refactor, harden, and modularize ACPI GPIO support
Date: Mon, 18 May 2026 11:19:10 +0300	[thread overview]
Message-ID: <agrLfsjapkOn6YQ7@ashevche-desk.local> (raw)
In-Reply-To: <20260518075357.112584-1-mscardovi95@gmail.com>

On Mon, May 18, 2026 at 09:53:45AM +0200, Marco Scardovi (scardracs) wrote:
> Good morning everyone,
> 
> This patch series took fairly a bit of time because, well,

It needs more work. Please, take your time to get familiar with the Linux
kernel process and patches requirements (read Submitting Patches and related
documentation).

> it ended up going a "bit"
> out of hand. It improves style, robustness, resource safety, and modularity
> of the ACPI GPIO subsystem. The massive gpiolib-acpi-core.c driver (previously
> well over 1400 lines) has been significantly refactored, reducing its footprint
> by separating concerns into distinct, dedicated modules for ACPI Operation Region
> handling and ACPI Event/Interrupt processing.

> Key changes and structure of the series:
> 1. Hardening & Correctness (Patches 1-4):
>    - Style adjustments to match Linux Kernel coding standard.
>    - Modernized parsing in quirks using standard sysfs/kstrto helpers.
>    - Added robust bounds checking for ACPI GPIO resource pin ranges.
>    - Fixed a critical memory resource leak in the OpRegion cleanup path.

Start from fixing critical issues first.

> 2. ACPI Operation Region Modularization (Patches 5-9):
>    - Declared shared data structures in the local header.
>    - Exposed private-to-core registration helpers by making them non-static.
>    - Extracted Operation Region handling logic to gpiolib-acpi-opregion.c.
>    - Diverted callback registration to the new OpRegion module.
>    - Removed the unused static emulation handlers from the core driver.
> 
> 3. ACPI Event & Interrupt Handling Modularization (Patches 10-12):
>    - Declared shared helper prototypes in the local header.
>    - Extracted Event/Interrupt logic to gpiolib-acpi-events.c.
>    - Fully decoupled static event handlers and event structures from the core.
> 
> Build correctness and functional behavior were validated on x86 virtual
> platforms using virtme-ng under KASAN and kmemleak with successful boot,
> execution, and zero resource leaks.

I didn't get the point of the whole series. It also gets +80 or so LoC.

-- 
With Best Regards,
Andy Shevchenko



      parent reply	other threads:[~2026-05-18  8:19 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-18  7:53 [PATCH 00/12] gpiolib: acpi: Refactor, harden, and modularize ACPI GPIO support Marco Scardovi (scardracs)
2026-05-18  7:53 ` [PATCH 01/12] gpiolib: acpi: Use snprintf() for ACPI event name formatting Marco Scardovi (scardracs)
2026-05-18  8:07   ` Andy Shevchenko
2026-05-18  7:53 ` [PATCH 02/12] gpiolib: acpi: Modernize string parsing in quirks layer Marco Scardovi (scardracs)
2026-05-18  8:11   ` Andy Shevchenko
2026-05-18  7:53 ` [PATCH 03/12] gpiolib: acpi: Add robust bounds-checking for GPIO pin resources Marco Scardovi (scardracs)
2026-05-18 10:33   ` Mika Westerberg
2026-05-19  7:00     ` [PATCH v2 0/2] gpiolib: acpi: Add bounds-checking and fix leak in OpRegion Marco Scardovi (scardracs)
2026-05-19  7:00       ` [PATCH 1/2] gpiolib: acpi: Add robust bounds-checking for GPIO pin resources Marco Scardovi (scardracs)
2026-05-19  7:25         ` Andy Shevchenko
2026-05-19  7:00       ` [PATCH 2/2] gpiolib: acpi: Fix resource leak in OpRegion cleanup path Marco Scardovi (scardracs)
2026-05-19  8:28         ` Andy Shevchenko
2026-05-20  7:45           ` [PATCH v3 0/2] gpiolib: acpi: Fix bounds-checking and connection leak Marco Scardovi (scardracs)
2026-05-20  7:45             ` [PATCH v3 1/2] gpiolib: acpi: Add robust bounds-checking for GPIO pin resources Marco Scardovi (scardracs)
2026-06-02  7:34               ` Andy Shevchenko
2026-05-20  7:45             ` [PATCH v3 2/2] Fixes: gpiolib: acpi: resource leak in OpRegion Marco Scardovi (scardracs)
2026-06-02  7:45               ` Andy Shevchenko
2026-06-02  7:47             ` [PATCH v3 0/2] gpiolib: acpi: Fix bounds-checking and connection leak Andy Shevchenko
2026-05-18  7:53 ` [PATCH 04/12] gpiolib: acpi: Fix resource leak in OpRegion cleanup path Marco Scardovi (scardracs)
2026-05-18  7:53 ` [PATCH 05/12] gpiolib: acpi: Declare shared structures in gpiolib-acpi.h Marco Scardovi (scardracs)
2026-05-18  8:21   ` Andy Shevchenko
2026-05-18  7:53 ` [PATCH 06/12] gpiolib: acpi: Expose core GPIO resource and OpRegion helpers Marco Scardovi (scardracs)
2026-05-18  7:53 ` [PATCH 07/12] gpiolib: acpi: Add dedicated Operation Region module Marco Scardovi (scardracs)
2026-05-18  7:53 ` [PATCH 08/12] gpiolib: acpi: Divert OpRegion registration callbacks from core Marco Scardovi (scardracs)
2026-05-18  7:53 ` [PATCH 09/12] gpiolib: acpi: Remove unused static address space emulation " Marco Scardovi (scardracs)
2026-05-18  7:53 ` [PATCH 10/12] gpiolib: acpi: Declare shared event helpers in gpiolib-acpi.h Marco Scardovi (scardracs)
2026-05-18  7:53 ` [PATCH 11/12] gpiolib: acpi: Add dedicated ACPI GPIO events module Marco Scardovi (scardracs)
2026-05-18  7:53 ` [PATCH 12/12] gpiolib: acpi: Decouple Event and Interrupt handling from core Marco Scardovi (scardracs)
2026-05-18  8:19 ` Andy Shevchenko [this message]

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=agrLfsjapkOn6YQ7@ashevche-desk.local \
    --to=andriy.shevchenko@linux.intel.com \
    --cc=brgl@kernel.org \
    --cc=linusw@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mscardovi95@gmail.com \
    --cc=westeri@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