From nobody Mon Sep 29 21:19:01 2025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 87ED3C00140 for ; Mon, 15 Aug 2022 23:08:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1352600AbiHOXIt (ORCPT ); Mon, 15 Aug 2022 19:08:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59936 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1353070AbiHOXHH (ORCPT ); Mon, 15 Aug 2022 19:07:07 -0400 Received: from sin.source.kernel.org (sin.source.kernel.org [IPv6:2604:1380:40e1:4800::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A2BA286730; Mon, 15 Aug 2022 12:59:10 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sin.source.kernel.org (Postfix) with ESMTPS id 090C8CE12C1; Mon, 15 Aug 2022 19:59:09 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0EECBC433D6; Mon, 15 Aug 2022 19:59:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660593547; bh=N9TJ94ZoPUoNsloQHfrpn0GyEU2bxkyC7I82FkaGEUI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Age8BI9rsFZdRfFRoWWw+w7x1X2FV9anAzkbtiD2wcU7b39F49XTbhBRIL/iwEttg l7Czhx70Em5FADiPzIo2oEhgB8BesuIuiM2oMEWQlFVt/6NAbCoWg625bkWApVkdsB doeFA9VB/Rl+TyjfuBReQlWujiO2J8DiTtL3WTeQ= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Xu Qiang , Marc Zyngier , Sasha Levin Subject: [PATCH 5.19 0286/1157] irqdomain: Report irq number for NOMAP domains Date: Mon, 15 Aug 2022 19:54:02 +0200 Message-Id: <20220815180451.059458446@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220815180439.416659447@linuxfoundation.org> References: <20220815180439.416659447@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Xu Qiang [ Upstream commit 6f194c99f466147148cc08452718b46664112548 ] When using a NOMAP domain, __irq_resolve_mapping() doesn't store the Linux IRQ number at the address optionally provided by the caller. While this isn't a huge deal (the returned value is guaranteed to the hwirq that was passed as a parameter), let's honour the letter of the API by writing the expected value. Fixes: d22558dd0a6c (=E2=80=9Cirqdomain: Introduce irq_resolve_mapping()=E2= =80=9D) Signed-off-by: Xu Qiang [maz: commit message] Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20220719063641.56541-2-xuqiang36@huawei.com Signed-off-by: Sasha Levin --- kernel/irq/irqdomain.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/kernel/irq/irqdomain.c b/kernel/irq/irqdomain.c index d5ce96510549..481abb885d61 100644 --- a/kernel/irq/irqdomain.c +++ b/kernel/irq/irqdomain.c @@ -910,6 +910,8 @@ struct irq_desc *__irq_resolve_mapping(struct irq_domai= n *domain, data =3D irq_domain_get_irq_data(domain, hwirq); if (data && data->hwirq =3D=3D hwirq) desc =3D irq_data_to_desc(data); + if (irq && desc) + *irq =3D hwirq; } =20 return desc; --=20 2.35.1