From mboxrd@z Thu Jan 1 00:00:00 1970 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 04207C19F2A for ; Mon, 8 Aug 2022 01:53:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243417AbiHHBxJ (ORCPT ); Sun, 7 Aug 2022 21:53:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35616 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243412AbiHHBuz (ORCPT ); Sun, 7 Aug 2022 21:50:55 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BEC6F19012; Sun, 7 Aug 2022 18:37:56 -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 ams.source.kernel.org (Postfix) with ESMTPS id 785DCB80E10; Mon, 8 Aug 2022 01:37:54 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 81E41C433C1; Mon, 8 Aug 2022 01:37:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1659922673; bh=9LjwY+T4K0WpW3gEj2ZZaN8kTnJt6JPVShGg+3jjePY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ndxBXQDVIwcuZCTtiDS9ee3briQFi6kUYJf+aBatTrYt2Q2y3B0VRO91Kfi85N9Ik bYVVZYk1Q2Zn7DetpYjV/EeeCMx/fmNq91mpwb9kEmVZ4yJTgyhAB3slmDBTQjx/aW uUQcGvs2EBr5AGzRKmrVboMnsgXT+UKDwdav2H8r+YBAlBjtbahOtzWnoRdXtwKJJ1 LGnu1dZ/d1o36+2noX59lPzdr+WuCZ5A859xIOTXgjP76e1ZbcjW6GB4nfvefGBkpw yQsujlhv8ZAc6NXpCi19PWx6kgGuv3klhoQ8/5iiIbL2S+JelTHhwA2c68u+HE/+rT fdgXnS6CVxrpw== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Antonio Borneo , Marc Zyngier , Sasha Levin , tglx@linutronix.de Subject: [PATCH AUTOSEL 5.10 05/29] genirq: Don't return error on missing optional irq_request_resources() Date: Sun, 7 Aug 2022 21:37:15 -0400 Message-Id: <20220808013741.316026-5-sashal@kernel.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220808013741.316026-1-sashal@kernel.org> References: <20220808013741.316026-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Antonio Borneo [ Upstream commit 95001b756467ecc9f5973eb5e74e97699d9bbdf1 ] Function irq_chip::irq_request_resources() is reported as optional in the declaration of struct irq_chip. If the parent irq_chip does not implement it, we should ignore it and return. Don't return error if the functions is missing. Signed-off-by: Antonio Borneo Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20220512160544.13561-1-antonio.borneo@foss.st.com Signed-off-by: Sasha Levin --- kernel/irq/chip.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/kernel/irq/chip.c b/kernel/irq/chip.c index 0b70811fd956..621d8dd157bc 100644 --- a/kernel/irq/chip.c +++ b/kernel/irq/chip.c @@ -1543,7 +1543,8 @@ int irq_chip_request_resources_parent(struct irq_data *data) if (data->chip->irq_request_resources) return data->chip->irq_request_resources(data); - return -ENOSYS; + /* no error on missing optional irq_chip::irq_request_resources */ + return 0; } EXPORT_SYMBOL_GPL(irq_chip_request_resources_parent); -- 2.35.1