Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp2894253rwb; Mon, 15 Aug 2022 13:29:47 -0700 (PDT) X-Google-Smtp-Source: AA6agR5crde2q1ekSzrVO8o8hH2fGcNQkuXarLXBElqrQheYdJhUt9K8ETZIt1lE+DyE/ZthcN8m X-Received: by 2002:a05:6402:424d:b0:43e:95d8:eb46 with SMTP id g13-20020a056402424d00b0043e95d8eb46mr16264722edb.306.1660595387678; Mon, 15 Aug 2022 13:29:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660595387; cv=none; d=google.com; s=arc-20160816; b=trtVcLIPlfvt0WVoDw1TtGeD9Np9DLnxtc9VWQXTbnD+OqUmoHkzoIYN5n4U1314rR 9d3fREyeUH8Af3/qtIkusgyNbi1vk3nl45BduN3z9PKQZ/dY/N5WXm+LfB70qZKy6X0z oUclKd+hOwEm24GOOuTyHHcjCeVMdswc6vgSPF9h0aA1JGBrUCMNBUiJ7h67DccGWYJI XEuidrk0qtSJJ6L3OANUMW4rjI48OQQGaOQnA2g/rKPy/MM9uBiv1Ro9QiaIYkY+jftb afp42eOel/BsMVDf21Rq3QCWxIi9Yiw1QacKieHUatFfhB/PEUOun+vrRM+4YgJlndMj 09Yw== 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=DB593gQqRf2rp5RwFStAK+r+KhIGeNecNVhuGrRqECo=; b=ra40Nrg+vAVsVmFlRVOMdOj3vcLEuOKeMnWgauOeFX49GxJbuWDIM1/XPExAfIMM7n xs4Iag+O9xM7vAqQDHrnpi91LRAVdJ7ZRlLgybV7H8UXYxNLzgFZD61b5SKoXSS2Bizi 5M5w8jWkbXJvEbRGZFnhz1EGmt0VKGzGWHjU8dcKnhfF0ZzeH31s1VKgi5EMYGSarGBC njlkGR+qc7au5Wr55vDjQGFif7xAWZHGK54+0s15GeV9V/jMWn6efMeDbm7TgN6MDC+Y TxiI/yUHAoeSFdiPWdZUpiK9GDhUdOxYnuJsboJdDGtqTDi+qGGLrcBlxd7KX8zuUZBo bD8Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=cNYnvalN; 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 hd14-20020a170907968e00b00702d8b7438csi9204267ejc.326.2022.08.15.13.29.16; Mon, 15 Aug 2022 13:29:47 -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=cNYnvalN; 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 S1347882AbiHOU0q (ORCPT + 99 others); Mon, 15 Aug 2022 16:26:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52492 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1347184AbiHOUWB (ORCPT ); Mon, 15 Aug 2022 16:22:01 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 18CF833417; Mon, 15 Aug 2022 12:01:14 -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 2FAA561299; Mon, 15 Aug 2022 19:01:14 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 350C1C433C1; Mon, 15 Aug 2022 19:01:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660590073; bh=dL0Ydp8evCTHHeruYxpd94EwuBGQvyrxTcjrzl+PG+k=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=cNYnvalNY1Hn21oB+J7U8AJZq+2W0bKB3TQG0BzzVZjaJ2PabWTBlFVwBX1x37lpD 1RN3waSnaCu0pAU9gAeiBA1U7dqM0Rzc6e3iFiSiICZIiqmCtkjaYPbvKow/1dAXbh zfv1Qlgb81s+2+6ZVzvpnjxDCqWZoMRqhb0ho1CI= 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.18 0143/1095] genirq: Dont return error on missing optional irq_request_resources() Date: Mon, 15 Aug 2022 19:52:22 +0200 Message-Id: <20220815180435.501857120@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220815180429.240518113@linuxfoundation.org> References: <20220815180429.240518113@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 54af0deb239b..eb921485930f 100644 --- a/kernel/irq/chip.c +++ b/kernel/irq/chip.c @@ -1513,7 +1513,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