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 X-Spam-Level: X-Spam-Status: No, score=-14.0 required=3.0 tests=BAYES_00,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B1BA8C4361B for ; Fri, 18 Dec 2020 19:00:04 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 6451223B83 for ; Fri, 18 Dec 2020 19:00:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732895AbgLRTAD (ORCPT ); Fri, 18 Dec 2020 14:00:03 -0500 Received: from mail.kernel.org ([198.145.29.99]:60748 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726876AbgLRTAC (ORCPT ); Fri, 18 Dec 2020 14:00:02 -0500 Received: from disco-boy.misterjones.org (disco-boy.misterjones.org [51.254.78.96]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 2088123B83; Fri, 18 Dec 2020 18:59:22 +0000 (UTC) Received: from 78.163-31-62.static.virginmediabusiness.co.uk ([62.31.163.78] helo=wait-a-minute.misterjones.org) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94) (envelope-from ) id 1kqKyF-002MOH-UQ; Fri, 18 Dec 2020 18:59:20 +0000 Date: Fri, 18 Dec 2020 18:59:19 +0000 Message-ID: <87sg83q6t4.wl-maz@kernel.org> From: Marc Zyngier To: Christophe JAILLET Cc: tglx@linutronix.de, mripard@kernel.org, dan.carpenter@oracle.com, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org Subject: Re: [PATCH] irqdomain: Add documentation for irq_create_of_mapping() In-Reply-To: <20201215200747.148439-1-christophe.jaillet@wanadoo.fr> References: <20201215200747.148439-1-christophe.jaillet@wanadoo.fr> 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 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: 62.31.163.78 X-SA-Exim-Rcpt-To: christophe.jaillet@wanadoo.fr, tglx@linutronix.de, mripard@kernel.org, dan.carpenter@oracle.com, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Christophe, On Tue, 15 Dec 2020 20:07:47 +0000, Christophe JAILLET wrote: > > Add a description for 'irq_create_of_mapping()' and make explicit the fact > that the resources allocated by this function can be freed by calling > 'irq_dispose_mapping()' when needed (i.e. error handling path, remove > function, ...) > > Signed-off-by: Christophe JAILLET > --- > The wording can certainly be improved. > > My goal is only to make clear if patches such as: > https://lore.kernel.org/lkml/20201214202117.146293-1-christophe.jaillet@wanadoo.fr/ > are needed or not. > --- > kernel/irq/irqdomain.c | 9 +++++++++ > 1 file changed, 9 insertions(+) > > diff --git a/kernel/irq/irqdomain.c b/kernel/irq/irqdomain.c > index 6aacd342cd14..d761ece8d43e 100644 > --- a/kernel/irq/irqdomain.c > +++ b/kernel/irq/irqdomain.c > @@ -858,6 +858,15 @@ unsigned int irq_create_fwspec_mapping(struct irq_fwspec *fwspec) > } > EXPORT_SYMBOL_GPL(irq_create_fwspec_mapping); > > +/** > + * irq_create_of_mapping() - Map an interrupt I think this deserves a bit more work. My immediate questions when reading this are "map where? and to what?". > + * @irq_data: structure of_phandle_args returned by a previous > + * of_irq_parse_xxx() call That's not strictly true. A of_phandle_args structure can be created from scratch (and numerous drivers do that). > + * > + * The resources allocated by this function should be freed by > + * calling irq_dispose_mapping() when the mapping if not useful > + * anymore. This really is a bit of documentation for irq_dispose_mapping(), isn't it? > + */ > unsigned int irq_create_of_mapping(struct of_phandle_args *irq_data) > { > struct irq_fwspec fwspec; Thanks, M. -- Without deviation from the norm, progress is not possible.