Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp1856831rwb; Fri, 19 Aug 2022 10:31:30 -0700 (PDT) X-Google-Smtp-Source: AA6agR5ceMO+Wlt4+vzhVJM6wvuSxUDTiq6GzYlUWAgpXhGoiSOkW2UJXWMFm3KWf2qfO3ObJThb X-Received: by 2002:a05:6a00:27a9:b0:531:cec:5d2 with SMTP id bd41-20020a056a0027a900b005310cec05d2mr8866679pfb.42.1660930290665; Fri, 19 Aug 2022 10:31:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660930290; cv=none; d=google.com; s=arc-20160816; b=SNeamwgK6Lw4bAZ8+5bHjVBMICQac7puw3EzEvV1Jqm19omDI4kG2xlbzLxPVVTmyx uJtojBBg7ID1QMi8KCSLqXMaf310+ViwyAfc2tMM6R5Fv/cU9D1FrSLZWSH1scT/zH3A ADQ27i4z5wzRGVGUfmvwNHqjacnYHZiezsOZOa29HVB27vGrH+I+6UbTF67XywaSmdVr D53hBfI+NdxyS9JXkaV/sxX4NdqZqjQeztvkk3y6YOiFicM5/DWz10uFH0XLnIoD25pL nFLWA8D/c6Gp+6Nb/BR8F3vpQdu61b2x03ac05nFA5vqKLy4jKL+f7iEac+5q0Aw2vqO 0GBQ== 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=5IMAQ3BwAGRWNj0aShD/NpKqjMMwhCauHQaDiC4Yk3Y=; b=wHt6LQZxETDd8ZdNK1KFUkcLsDCrZFknKLHMYf4m0TAdCZ96YIK9op1aYJOpT6c7ic SN8HjLDuEBtNuRXx73LQfWcclKnfOMzZgAo9GZRSVs1+awGxP179xJAw4QIj/0/Duo5v S+b/QVYRWA7fN9AvTRbiPlUb3Ov1hMdz0dWnie0k5HfyW1y04FhBqVGhjOxGSRZwe1dg DMw3hIO69AlvM/lV7Mnpb3BciY87UW2WtpsdjvoHWqsKsYobIQGgLGQqPseIV78jqThU r0u9ZwZI/fjGGDkrF3miCA/fPzV/hvk7rASClFI5Mn7gePtNlCxiwETtywtyrsO308HZ vTWA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=mQH0E71S; 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 b17-20020a170903229100b001586190b7c1si2091824plh.528.2022.08.19.10.31.19; Fri, 19 Aug 2022 10:31:30 -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=mQH0E71S; 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 S1350656AbiHSP4o (ORCPT + 99 others); Fri, 19 Aug 2022 11:56:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40046 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1350554AbiHSPzJ (ORCPT ); Fri, 19 Aug 2022 11:55:09 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5875A107D90; Fri, 19 Aug 2022 08:49:57 -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 dfw.source.kernel.org (Postfix) with ESMTPS id 5F78761736; Fri, 19 Aug 2022 15:49:56 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6E3E4C43470; Fri, 19 Aug 2022 15:49:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660924195; bh=9LjwY+T4K0WpW3gEj2ZZaN8kTnJt6JPVShGg+3jjePY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=mQH0E71SDFP4wg4QvyybSuvuL2f6KATJNZx3jiz21BdKpWW9aOWAvlR/H/EXj6spt Iwdj9Cz1/BoSkw6sTpu1c/N90MjkGnQKmieVjl2LfNbhg8THdX+Bqa/wUAq2/UiagP cSwcIV+r7ZcepzTVp3+LIw+9O9L0Eli3fBxfxKu4= 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.10 081/545] genirq: Dont return error on missing optional irq_request_resources() Date: Fri, 19 Aug 2022 17:37:31 +0200 Message-Id: <20220819153832.881766941@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220819153829.135562864@linuxfoundation.org> References: <20220819153829.135562864@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 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