Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp6297763iob; Tue, 10 May 2022 15:14:37 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxTwHsqEIzv74EPXMpw7YCFZbxbvz+LY+R7UTOt9v+/yTyfw80Qilbmu2lqwIfzg6h4LmqH X-Received: by 2002:a17:903:11d0:b0:155:c240:a2c0 with SMTP id q16-20020a17090311d000b00155c240a2c0mr22352765plh.143.1652220877129; Tue, 10 May 2022 15:14:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652220877; cv=none; d=google.com; s=arc-20160816; b=FpbgSL+bxPXXycfRRiL8LBLcwFoq8Mhnlr383E+xoANimG22GrNgbuFvuzVHpITuQz 0V5QYz0hqNJyo9D1EyEPRgu4g3u30BORVV+4Js9WBJ26FICs2eBuzrIoSAUTc9zWNAof 0nBRjNINXP37Tp3okmP3zi1vT7Sq1MnaMu5TCk9CV/iAWKZQrRTwk0NB2UQNI3ZbkjKi A9bKYAjdRpmvZ8TTI3q0QWtmXM938qDtAJeFtOtngahEyiWoDq3+rXaemzqnknMqpocw SIKRvNWl5k+S+rg0RnRNGdNZ2I91e/fCmiqxiPEOaeaHmV5W+fhsgC7dDfhz42bKtvh0 JATQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:references:in-reply-to :subject:cc:to:from:message-id:date:dkim-signature; bh=pnZMF2W0TP86vzfWnvgUxPzv4Es9ur/I18gxo3yLPwQ=; b=ARs83ZfuAvM5szvMBmBXb1AVx4q7cRUMcwcvmhdnT0IVui6YQIn1fGrvkWMMP8RMYk mrDr2ys9L1NtIerM1oFSQcoykFDbYZyEYNGdKw+XJzmN2KOA2EvItkFEyZU0snJogPU4 luf8sBMZ8skGGTURcL9fR4xUbROezrwKIedkkGIvjggIDCngapl5UkofR0SGw+snzwhY LN7VYfpBetlsXGzZ6UoteRj6kXW1Oi6nxwPT+BxWnhOdRyU4meBhYWHqGEtngM8StI/u Pno5CWGZMegz3Cy3QhkerwxWWJEr9nOpHik6DH3sIVrqeOrzNq7AmkYRmSY2CVbq9cfL mBHQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=c8ITZL1d; 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 h8-20020a056a00170800b0050d2ac6b8b6si121958pfc.226.2022.05.10.15.14.24; Tue, 10 May 2022 15:14:37 -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=c8ITZL1d; 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 S1349048AbiEJSoW (ORCPT + 99 others); Tue, 10 May 2022 14:44:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49266 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243632AbiEJSoS (ORCPT ); Tue, 10 May 2022 14:44:18 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3AEF62A1898 for ; Tue, 10 May 2022 11:44:17 -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 E140160F2E for ; Tue, 10 May 2022 18:44:16 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 43472C385A6; Tue, 10 May 2022 18:44:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1652208256; bh=nteh6AJ0r/mVoLGErlwN08kpu+PDPyjBwrscK6E6gMM=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=c8ITZL1dSmm+7KIcn1BE2SWdv4gJmLG8b4yxs8UnXP3SxRmmJ9JRnsJbtwL3EyMkg fa5VyY2+UtEZWLnnlmKodN5xfltqzKp4Cd2HOIMxY0ImV2CrpCBm0IWkwPyXxeqaKu MeZy8laibpfybPOPGyyHLsAKsXzmLV9FEFogAetD6ugOzI4yVKrO7zwSoZDxVMmrah pBR7974MbvYolLWeTyvL/1JH2hej+mIX2J8z7iausKwb7czjJrDS3VPlVItgicsZVj 846XtbM3YYldPLoAOkDe15V3LDCT+ry/jPfufEPWnMM8SL+bsXpWce7U0SMiqik3u8 TcaQq8tZhXrBw== Received: from sofa.misterjones.org ([185.219.108.64] helo=why.misterjones.org) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1noUqD-00AMwc-NU; Tue, 10 May 2022 19:44:13 +0100 Date: Tue, 10 May 2022 19:44:13 +0100 Message-ID: <875ymd6xdu.wl-maz@kernel.org> From: Marc Zyngier To: Antonio Borneo Cc: Thomas Gleixner , Maxime Coquelin , Alexandre Torgue , , , , Pascal Paillet , Ludovic Barre , Loic Pallardy Subject: Re: [PATCH 4/7] irqchip/stm32-exti: forward irq_request_resources to parent In-Reply-To: <20220510164123.557921-4-antonio.borneo@foss.st.com> References: <20220510164123.557921-1-antonio.borneo@foss.st.com> <20220510164123.557921-4-antonio.borneo@foss.st.com> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/27.1 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII X-SA-Exim-Connect-IP: 185.219.108.64 X-SA-Exim-Rcpt-To: antonio.borneo@foss.st.com, tglx@linutronix.de, mcoquelin.stm32@gmail.com, alexandre.torgue@foss.st.com, linux-kernel@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, p.paillet@foss.st.com, ludovic.barre@foss.st.com, loic.pallardy@foss.st.com X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false 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 On Tue, 10 May 2022 17:41:20 +0100, Antonio Borneo wrote: > > From: Pascal Paillet > > Enhance stm32-exti driver to forward request_resources and > release_resources_parent operations to parent. > Do not use irq_request_resources_parent because it returns > an error when the parent does not implement irq_request_resources. > > Signed-off-by: Pascal Paillet > Signed-off-by: Antonio Borneo > --- > drivers/irqchip/irq-stm32-exti.c | 14 ++++++++++++++ > 1 file changed, 14 insertions(+) > > diff --git a/drivers/irqchip/irq-stm32-exti.c b/drivers/irqchip/irq-stm32-exti.c > index c8003f4f0457..3f6d524a87fe 100644 > --- a/drivers/irqchip/irq-stm32-exti.c > +++ b/drivers/irqchip/irq-stm32-exti.c > @@ -550,6 +550,16 @@ static void stm32_exti_h_unmask(struct irq_data *d) > irq_chip_unmask_parent(d); > } > > +static int stm32_exti_h_request_resources(struct irq_data *data) > +{ > + data = data->parent_data; > + > + if (data->chip->irq_request_resources) > + return data->chip->irq_request_resources(data); > + > + return 0; > +} Why do you need to reinvent the whole thing? Why isn't it just: static int stm32_exti_h_request_resources(struct irq_data *data) { irq_chip_request_resources_parent(data); return 0; } And this really deserves a comment. I also wonder whether we should change this behaviour to always return 0. M. -- Without deviation from the norm, progress is not possible.