Received: by 2002:a05:6358:e9c4:b0:b2:91dc:71ab with SMTP id hc4csp4226344rwb; Sun, 7 Aug 2022 18:37:59 -0700 (PDT) X-Google-Smtp-Source: AA6agR787I+tdtXcFC0tkTPKul6gttZz24oD/ftvWL3ubEavbrQzwxgLtukDvzxJLzcU/caVwV3E X-Received: by 2002:a05:6402:3220:b0:43d:ca4f:d2b9 with SMTP id g32-20020a056402322000b0043dca4fd2b9mr16026132eda.177.1659922679488; Sun, 07 Aug 2022 18:37:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1659922679; cv=none; d=google.com; s=arc-20160816; b=NVqY6KP+U6JB26pSWx3jbUwNv3ZsICDe1n7RZNcGhVrZMxJqcv4m2Gh7hj2BZ+a/S8 zHQiseF+DYzRzf/UXHoUTUvmvBQgfXnfchvPwJARu3yMop+ZM52lcepWQMSy1om5AEnv QhoiLurDvVcVnaz1UD0ol3Yof66/Euqq6pYtZ7OWR8SOBTaSvqe8pPOgT34N3UiHKJ5e y/kfMixDATBKYfyUgE6/c8p4a1ftDHfjZB3gH9YTQwBGAA7UUNuXN+i3yq8tsGQVIGU2 3APl2/vvmsoKyMHjj9B84NHtKHgkH0EojmcNaWGA/Gn8Ua1dd1EZ6Qumucmpwj6iG1jk YVrw== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=dtSBEdRHwJcY4yO8OqBZW3ylevpzxarO2dRCL8Flb9g=; b=Afct42G2Z84jBUJORuK4LhrnZ0fT+PDL65tbcVo5XX/pKAgqsdOj8jy3j8+9SfHiNf falH3eW/9bus5F2IxdJQ7tIF7zyrDS7t18+TyPiRXEPRywLUA5B65Ji5BRyB1rSkG1wX uknEfhkoQ+LgS7FFOHkEdDae8cezFx3Evx3ZTfgjhvI8O+38mSaHQBPjbd1iQbT40qZS hF0HlVeZrCcYqv9Hp4J/NKrSN6HLISzLrbqZMy05mcV+4qZ17wKtaej8JwpEimkCMJ2d apEPDqB1j68588tVHAbc49yckFUZYWQes5wdlwLXMBNoskMBfqN2GvAb58pGvWwqBfPv q/Yg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=GklCFw00; 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=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z8-20020a05640240c800b0043dd143c124si6080903edb.4.2022.08.07.18.37.32; Sun, 07 Aug 2022 18:37:59 -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=@kernel.org header.s=k20201202 header.b=GklCFw00; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242239AbiHHBdq (ORCPT + 99 others); Sun, 7 Aug 2022 21:33:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57760 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241953AbiHHBdG (ORCPT ); Sun, 7 Aug 2022 21:33:06 -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 CB11AD129; Sun, 7 Aug 2022 18:32:31 -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 1C539B80DDE; Mon, 8 Aug 2022 01:32:30 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 371DFC43141; Mon, 8 Aug 2022 01:32:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1659922348; bh=1wM4Q9rJ9xMA7WhaqXWnCMx6OyRJaQeQCoVH70W1Y0I=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=GklCFw00AOxGuNyexqJpUnaHoNuUXoLWUmkwacMdbHmugSZOSac8TibxoO9JmZih9 D1eHmT4eX6kAQdvA2cP7w/D3KJgrZRfOfUAgDlxwUA5wmZP2EN+b35Na8WwPyd2N79 qBVtGSn/jE/ew2WUoQ8W7aqxI+F5Nxt0YkCnx+2IdCBOpWlV/tRBiuciDxzZjlnn74 mRiK7V3IwjSEokUoCxz07kOqrWumaiXlHqApN1imq9un9VLfLQN9pwi4zDu7H4oQYj M0SZRyFGDoOZ6fZvUDCOUw+3sut2ibt8OuFyK97Zt8dIvLX5NB6nau0yBLOj6HaqKI P5uzZvolTEB1A== 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.19 17/58] genirq: Don't return error on missing optional irq_request_resources() Date: Sun, 7 Aug 2022 21:30:35 -0400 Message-Id: <20220808013118.313965-17-sashal@kernel.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220808013118.313965-1-sashal@kernel.org> References: <20220808013118.313965-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.7 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