From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
linux-kernel@vger.kernel.org, driver-core@lists.linux.dev
Cc: Mark Brown <broonie@kernel.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
"Rafael J. Wysocki" <rafael@kernel.org>,
Danilo Krummrich <dakr@kernel.org>,
Johan Hovold <johan@kernel.org>
Subject: [PATCH v1 1/1] regmap: irq: Get rid of duplicate check in regmap_del_irq_chip()
Date: Wed, 21 Oct 2026 22:50:35 +0200 [thread overview]
Message-ID: <20261021205036.1013622-1-andriy.shevchenko@linux.intel.com> (raw)
irq_dispose_mapping() already 0-aware, so there is no need to
perform the same test outside of the call. Get rid of duplicate
check in regmap_del_irq_chip().
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
drivers/base/regmap/regmap-irq.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/drivers/base/regmap/regmap-irq.c b/drivers/base/regmap/regmap-irq.c
index 715eb9e7aa2a..bd7c89618dd7 100644
--- a/drivers/base/regmap/regmap-irq.c
+++ b/drivers/base/regmap/regmap-irq.c
@@ -1021,7 +1021,6 @@ EXPORT_SYMBOL_GPL(regmap_add_irq_chip);
*/
void regmap_del_irq_chip(int irq, struct regmap_irq_chip_data *d)
{
- unsigned int virq;
int i, hwirq;
if (!d)
@@ -1039,9 +1038,7 @@ void regmap_del_irq_chip(int irq, struct regmap_irq_chip_data *d)
* Find the virtual irq of hwirq on chip and if it is
* there then dispose it
*/
- virq = irq_find_mapping(d->domain, hwirq);
- if (virq)
- irq_dispose_mapping(virq);
+ irq_dispose_mapping(irq_find_mapping(d->domain, hwirq));
}
irq_domain_remove(d->domain);
--
2.50.1
next reply other threads:[~2026-10-21 20:54 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-21 20:50 Andy Shevchenko [this message]
2026-10-22 8:13 ` [PATCH v1 1/1] regmap: irq: Get rid of duplicate check in regmap_del_irq_chip() Johan Hovold
2026-10-22 13:26 ` Mark Brown
2026-10-22 14:16 ` Johan Hovold
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=20261021205036.1013622-1-andriy.shevchenko@linux.intel.com \
--to=andriy.shevchenko@linux.intel.com \
--cc=broonie@kernel.org \
--cc=dakr@kernel.org \
--cc=driver-core@lists.linux.dev \
--cc=gregkh@linuxfoundation.org \
--cc=johan@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rafael@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.