Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp2876383rwb; Mon, 15 Aug 2022 13:07:10 -0700 (PDT) X-Google-Smtp-Source: AA6agR4+Imz0AalNUZpIJIYwKsZAWEIfaulLlVD7gEj9bPrczlkT9zEebCLZCUqaXxME28KLJG+p X-Received: by 2002:a17:902:db06:b0:16e:e5fc:56d8 with SMTP id m6-20020a170902db0600b0016ee5fc56d8mr18814729plx.100.1660594030140; Mon, 15 Aug 2022 13:07:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660594030; cv=none; d=google.com; s=arc-20160816; b=JZygyOxhnILNuPB1zwj/ZtDYGgQ2R0kM1oBZ9FKeYq01dPIxbyHwqRb1t8SLLuV01c EemW2Rk40AGXEnipg6QweHdfSykpuUrhRBY10nD82mIUDcO3rNCgJ3MQVYH8Ob/m0GrZ 68f6XG5LlcoZT/R3Ut2wSQSthKeUYwTUhv+jP/PAmTPacY3qPJj2nEq5ff2kNsXmQjEd OAt36tpLEOOt2N11+Mf1gXelQHZftxaPByfUJRKO6FF27uyrjSquRUB3IvtNwxNpYYJX p9bsxeNtIXKV18k6yttSMcXbQjYTOWYWYU/VvdjunsTNw2m+oT6s5DnMt9cGdbAAcL4x TYwg== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=9+7xhBm9wFm+m357v/1HeI7/DHVYKNFLqdoEPzRHta4=; b=yGVIF/taQckW0yk0VnfX9jyde3rgcqw4PPY/vuMDKU8UdgMGD6M9TT8dDT7tKuw//T EsQ5a5xmXi6eVARLtrE9xLIhOcU1W1J90SxH4u31xhytjcYmDQjqqCZgyQQc7FcU7GrU HcLVRJVBtpjczID31zTb1A5gphLDi9YuX7KbF+2wV7gxxgSrovQOB2wMaS5BCes1oxqi gyfg+k5/aavVeMOuxVza+m9ojtBU2jrQc52iNitpad7Ngh27wnYdJ/OQ10DBLwCfsUGs EhC5+Cr0lMxZ45QMtzRzpAiM39nHdGosy46HO9zDsJERuxwJt61KfFT/PXyxElnFFq+Q cAZw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=DZIaHxJN; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e1-20020a170902e0c100b0016f86a21198si9225629pla.610.2022.08.15.13.06.58; Mon, 15 Aug 2022 13:07:10 -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; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=DZIaHxJN; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242512AbiHOS2x (ORCPT + 99 others); Mon, 15 Aug 2022 14:28:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58054 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242579AbiHOS0Q (ORCPT ); Mon, 15 Aug 2022 14:26:16 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C34B72AE13; Mon, 15 Aug 2022 11:19:15 -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 6CB56B81076; Mon, 15 Aug 2022 18:19:11 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A4342C433D7; Mon, 15 Aug 2022 18:19:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660587550; bh=Gw7ty+G5lbAAotKSMNZhOw0+vgFQSF/mhHY+Ujdz0gE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=DZIaHxJNcjyEgl/zV2R0cPus8+lht+3uBRV//Ng2Bck3Uq7OpdpajlBa168dmJeVT JjRywi1FxmM1ax8foiJIoZdnjSnvSji+OPASRTW9oqun2/6JEZd0rRiDeOmk0tFkO4 rQyU8RMDWSC309bL/UCw6AqsXdAwBd+sqbBI7fQw= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Antonio Borneo , Marc Zyngier , Sasha Levin Subject: [PATCH 5.15 118/779] genirq: Dont return error on missing optional irq_request_resources() Date: Mon, 15 Aug 2022 19:56:02 +0200 Message-Id: <20220815180342.371126246@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220815180337.130757997@linuxfoundation.org> References: <20220815180337.130757997@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 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 a98bcfc4be7b..f3920374f71c 100644 --- a/kernel/irq/chip.c +++ b/kernel/irq/chip.c @@ -1516,7 +1516,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