lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87sg83q6t4.wl-maz@kernel.org>
Date:   Fri, 18 Dec 2020 18:59:19 +0000
From:   Marc Zyngier <maz@...nel.org>
To:     Christophe JAILLET <christophe.jaillet@...adoo.fr>
Cc:     tglx@...utronix.de, mripard@...nel.org, dan.carpenter@...cle.com,
        linux-kernel@...r.kernel.org, kernel-janitors@...r.kernel.org
Subject: Re: [PATCH] irqdomain: Add documentation for irq_create_of_mapping()

Hi Christophe,

On Tue, 15 Dec 2020 20:07:47 +0000,
Christophe JAILLET <christophe.jaillet@...adoo.fr> 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 <christophe.jaillet@...adoo.fr>
> ---
> 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.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ