]> git.ipfire.org Git - thirdparty/linux.git/commit
genirq/chip: Change irq_chip_pm_put() return type to void
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Thu, 8 Jan 2026 15:05:37 +0000 (16:05 +0100)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Fri, 16 Jan 2026 19:28:05 +0000 (20:28 +0100)
commite9df6eba060c6db2f7f3fd8666d1af0a369d6f7b
tree1662f91b3d88f1bfc5f9cf486082dfe7e76b904e
parentbf91b35a46ceef08a1e64c54b0e611fcae531e7a
genirq/chip: Change irq_chip_pm_put() return type to void

The irq_chip_pm_put() return value is only used in __irq_do_set_handler()
to trigger a WARN_ON() if it is negative, but doing so is not useful
because irq_chip_pm_put() simply passes the pm_runtime_put() return value
to its callers.

Returning an error code from pm_runtime_put() merely means that it has
not queued up a work item to check whether or not the device can be
suspended and there are many perfectly valid situations in which that
can happen, like after writing "on" to the devices' runtime PM "control"
attribute in sysfs for one example.

For this reason, modify irq_chip_pm_put() to discard the pm_runtime_put()
return value, change its return type to void, and drop the WARN_ON()
around the irq_chip_pm_put() invocation from __irq_do_set_handler().
Also update the irq_chip_pm_put() kerneldoc comment to be more accurate.

This will facilitate a planned change of the pm_runtime_put() return
type to void in the future.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Reviewed-by: Thomas Gleixner <tglx@kernel.org>
Link: https://patch.msgid.link/5075294.31r3eYUQgx@rafael.j.wysocki
include/linux/irq.h
kernel/irq/chip.c