RE: RE: [PATCH v3] gpio: amdptpci: add support for AMD PT PCI controller

From: Szuying Chen

Date: Fri Nov 13 2026 - 03:41:58 EST


Hi Linus,

Thanks for the review and feedback.

>> +#include <linux/bits.h>
>> +#include <linux/compiler.h>

>Why this include?? Add a comment next to it why it is included if this is really necessary.

Not need will drop it in V4.

>> +#include <linux/kernel.h>

>I think this generic include should not be used in new code, use specific includes.

Agreed, I will replace it with the specific headers in v4.

>> +static int pt27_irq_reqres(struct irq_data *d) {
>> + struct gpio_chip *gc = irq_data_get_irq_chip_data(d);
>> + irq_hw_number_t hwirq = irqd_to_hwirq(d);
>> + int ret;
>> +
>> + ret = gpiochip_reqres_irq(gc, hwirq);
>> + return ret;
>> +}
>> +
>> +static void pt27_irq_relres(struct irq_data *d) {
>> + struct gpio_chip *gc = irq_data_get_irq_chip_data(d);
>> + irq_hw_number_t hwirq = irqd_to_hwirq(d);
>> +
>> + gpiochip_relres_irq(gc, hwirq); }

>These are reimplementations of gpiochip_irq_reqres() and gpiochip_irq_relres() so use these instead?

Agreed these are redundant as they stand.
However, v3 does not keep the device in D0 while an IRQ is in use,
so I will extend the callbacks to hold a runtime PM reference in v4.
They can't be replaced by the generic helpers.

>Eh? Get rid of this horrid footer.
Sorry about that! I have asked our IT team to disable this disclaimer
for external emails, so it should be gone from v4 onward.

Best regards,
Szuying