Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp3025192rwb; Mon, 15 Aug 2022 16:23:11 -0700 (PDT) X-Google-Smtp-Source: AA6agR6k5PzYHuU4ajVnhR79hAFoE4dosKqlfhGl+JLG/uE6J5uD3SD5fMLYbKnwlhNPl3CUEg47 X-Received: by 2002:a05:6402:b88:b0:442:5d35:2133 with SMTP id cf8-20020a0564020b8800b004425d352133mr16308961edb.53.1660605791514; Mon, 15 Aug 2022 16:23:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660605791; cv=none; d=google.com; s=arc-20160816; b=wMmKeV06hGXdlmfD87eY8jNjF1UV5+dSJIRwfgR33QaeNW5WmTzLobOl51Xc+fILje rI7C+xqGpNmiLezO30Fr/xD87d64TmHXGcsczIs+x281Ts7ImkVz/4S6k/bI3nF0gu3L 0hZsUQtUyvH4I/DbF+w5R79SSFmLVFt3ozcKsfuiRtYYsRosc+SrBmVyztCn6Fei7dAE rBCioXSuwaVuA5p+CAp7KuIcgz08OnVNfPrWDJ3hWIbpE8/ANhh7WhwKUtOKQfnVBMe5 xnRz84Sl7Kc271Y42CrHkvoN7SUuUVlXjSnUhSw4lH7a6MT88wU1eH724KZJy46NTUdY P4Hg== 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=dtSBEdRHwJcY4yO8OqBZW3ylevpzxarO2dRCL8Flb9g=; b=sIOK3atDp6xzjmTDAqlE4jP6voliFT7hZglpHaJZFlms/SClFAG2TxfDT6feXRoTGl sqtarnsijQ3OmZpvy63wpBsfMew8BGZg9pCHj/Rp05p92zxE36Q4J2nah299sXTxCFau rBxKiuaQr55QfualEtHroVzNC5rYuFfzQkIqw8J4o+YmPScSh85eEAw/aw+QR5c+F4DZ o2dlYc+MRFelVyHND9wk0V+c17NIxR5juBeTHlmaoIqVUf+eAtk5/KE6g/61QsiEq0aF Q/V9esuPU4+YzSOQlY+zKufDeKFNout0NpY8qc/ZF6u7MKJKKIzmFL6NAIX8BcPvf8Qq 6nJg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=SCn+yZkS; 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 gy19-20020a170906f25300b0073097bd94ebsi7015902ejb.473.2022.08.15.16.22.46; Mon, 15 Aug 2022 16:23:11 -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=SCn+yZkS; 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 S1349012AbiHOWc0 (ORCPT + 99 others); Mon, 15 Aug 2022 18:32:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39452 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1350708AbiHOW1I (ORCPT ); Mon, 15 Aug 2022 18:27:08 -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 D75E03AE60; Mon, 15 Aug 2022 12:45:38 -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 73BF2B81144; Mon, 15 Aug 2022 19:45:37 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B82D4C433D6; Mon, 15 Aug 2022 19:45:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660592736; bh=1wM4Q9rJ9xMA7WhaqXWnCMx6OyRJaQeQCoVH70W1Y0I=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=SCn+yZkSW/E0lg9YArIRT4A1Jjdbu3LjBoD+pToguMgvtougjnNuWlHmdRGYsHkiF g+ArpRCyNbP9DbUoSHX/U+qgyomL/jnnLV6F63OhM2Z6ykjfUpFX9gyjHF8hmSt46V Yq8McxXA5l2okj6phfq+rTwII8Hs+vONjIcWD4To= 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.19 0157/1157] genirq: Dont return error on missing optional irq_request_resources() Date: Mon, 15 Aug 2022 19:51:53 +0200 Message-Id: <20220815180445.971343460@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: 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 886789dcee43..c19040530789 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