From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id C09C7C433EF for ; Tue, 10 May 2022 18:45:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Subject:Cc:To:From:Message-ID:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=F7tEwRA/nS0M2kdISxC7A2nTpgBj7QlJ29Xsw064ZSc=; b=fdGY+CEwnNcL2D vsDhpbiB+ACySORcce0NPCzy8IdInma77ulGW194D4HfFa8S0zwkeuZnJP8JThkuUJOt5SxvMj5x4 ec+F5kd6R+O5FED4kzbEl7MJTORDef63KTixgBRI8ORYYc2dIW5wSme53iQcrXWpha/oeeJBH9CXB 7CEtON9dZZdX3dgj1ybgmgeHrP9rTZJygJrmNODrS73crvDQ2+KHOeBeSeDydX0fDUSMRwgbcktOw WVRsgu5BbWOhGTSt8jpJnU6Xdux3yJNS22FkOgw526rCiXPVQ4y0z0Qv74sx+m0BqmcvktY4viCnM zC/dYyQlFmR+EDM4l0rA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1noUqN-003hQn-Dz; Tue, 10 May 2022 18:44:23 +0000 Received: from ams.source.kernel.org ([2604:1380:4601:e00::1]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1noUqJ-003hPC-6q for linux-arm-kernel@lists.infradead.org; Tue, 10 May 2022 18:44:20 +0000 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 83F93B81D0B; Tue, 10 May 2022 18:44:17 +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") 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-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220510_114419_585936_BAACB613 X-CRM114-Status: GOOD ( 25.49 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.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. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel