Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp4138286imw; Mon, 18 Jul 2022 23:51:43 -0700 (PDT) X-Google-Smtp-Source: AGRyM1tXdYgwF6Ou3QT8io6wgivBE6PrTMd4EPHI0oUU+9MoGF/Sl7q/Q3doAe/s4jUTEHN1uYZK X-Received: by 2002:a17:906:f17:b0:6fe:94f6:cb8a with SMTP id z23-20020a1709060f1700b006fe94f6cb8amr29803108eji.456.1658213503100; Mon, 18 Jul 2022 23:51:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658213503; cv=none; d=google.com; s=arc-20160816; b=Vzrmr9Il8OXpUM4hImP4sVuw3n1Ifpzya1t2zpCsHJib4vD9cyAvQOOrW7/OaXEtxV 0OUu7POHCFnklxz3cFvw82TBPDpIyNoOWAfb40fsUg/K3/Qu2h7mp1qD1uPRjDINb5zp RZYIFTxQetiYNFrwP1y9cGnsaZRtWVSRYFvfHzHI4VSdQVnOhfRjWrnk7FIHFHW65fyN zjy5qjTXQ37/rvn62dICxFvaMwwhgXxjIQQnCVBvax9J/lp0PYFSAl5ehXB2jKOmXUXT e7yNDHemA/YwBQlITcJ41OVyHQFrK6M5mx2viDh6Cu1wp7onuLXCOo/3lb2h1zSuWUco Ibqg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=HHO8osvsFsvbd0xvviExPt+lYcyKimJ7XmjRQwKhDok=; b=JMlfWNr812XJOxft29z3ZXuO+DiyzflnowGsCwDsqJqNiEFV1MuZmAPFi1OwoDHha8 knFqtjX6VX6ObMJnhk8u1eqMFQg5Nt/46+gqDJ7we0csaEbeGpBi3xlKkvL81+v6UncI ZyVPyHb4pXqfzIpvLV12hWGY4ELGHAcIM2iSuJSDmzs6+K8SlxLtqFrXziOuIHnqjZ0K wMOFF4/b1/8FRJ4+BymV2OEcbuN9EUhsoR2GNEhzVrzxqHuy+08BpywHecLaIH3q6kbU KBwC57j4xPKv0nBk+xTggydTZODlecyWwnGFW5Pcz5x5CClTeYOBLZu7NgPF+uBYy7Oi i8qw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b15-20020a056402350f00b0043a788fca92si20799840edd.503.2022.07.18.23.51.18; Mon, 18 Jul 2022 23:51:43 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237056AbiGSGjP (ORCPT + 99 others); Tue, 19 Jul 2022 02:39:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50680 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235161AbiGSGjN (ORCPT ); Tue, 19 Jul 2022 02:39:13 -0400 Received: from szxga08-in.huawei.com (szxga08-in.huawei.com [45.249.212.255]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 96BD8248FC for ; Mon, 18 Jul 2022 23:39:12 -0700 (PDT) Received: from kwepemi500012.china.huawei.com (unknown [172.30.72.53]) by szxga08-in.huawei.com (SkyGuard) with ESMTP id 4Ln8Hc2j5tz1M7yl; Tue, 19 Jul 2022 14:36:28 +0800 (CST) Received: from huawei.com (10.175.112.208) by kwepemi500012.china.huawei.com (7.221.188.12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Tue, 19 Jul 2022 14:39:10 +0800 From: Xu Qiang To: , CC: , , , Subject: [PATCH v2 -next 1/2] irqdomain: Fix an issue where the Linux IRQ number is not stored Date: Tue, 19 Jul 2022 06:36:40 +0000 Message-ID: <20220719063641.56541-2-xuqiang36@huawei.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20220719063641.56541-1-xuqiang36@huawei.com> References: <20220719063641.56541-1-xuqiang36@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit X-Originating-IP: [10.175.112.208] X-ClientProxiedBy: dggems706-chm.china.huawei.com (10.3.19.183) To kwepemi500012.china.huawei.com (7.221.188.12) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 (“irqdomain: Introduce irq_resolve_mapping()”) Signed-off-by: Xu Qiang --- 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_domain *domain, data = irq_domain_get_irq_data(domain, hwirq); if (data && data->hwirq == hwirq) desc = irq_data_to_desc(data); + if (irq && desc) + *irq = hwirq; } return desc; -- 2.17.1