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: <87lfb2zsab.wl-maz@kernel.org>
Date:   Thu, 04 Mar 2021 18:29:32 +0000
From:   Marc Zyngier <maz@...nel.org>
To:     Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
Cc:     Linus Walleij <linus.walleij@...aro.org>,
        Mika Westerberg <mika.westerberg@...ux.intel.com>,
        linux-doc@...r.kernel.org, linux-kernel@...r.kernel.org,
        linux-gpio@...r.kernel.org, linux-acpi@...r.kernel.org,
        Jonathan Corbet <corbet@....net>,
        Bartosz Golaszewski <bgolaszewski@...libre.com>,
        Thomas Gleixner <tglx@...utronix.de>,
        "Rafael J. Wysocki" <rafael@...nel.org>
Subject: Re: [PATCH v2 1/5] irqdomain: Introduce irq_domain_create_simple() API

Andy,

On Thu, 04 Mar 2021 15:02:11 +0000,
Andy Shevchenko <andriy.shevchenko@...ux.intel.com> wrote:
> 
> Linus Walleij pointed out that ird_domain_add_simple() gained
> additional functionality and can't be anymore replaced with
> a simple conditional. In preparation to upgrade GPIO library
> to use fwnode, introduce irq_domain_create_simple() API which is
> functional equivalent to the existing irq_domain_add_simple(),
> but takes a pointer to the struct fwnode_handle as a parameter.
> 
> While at it, amend documentation to mention irq_domain_create_*()
> functions where it makes sense.
> 
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>

[...]

> diff --git a/include/linux/irqdomain.h b/include/linux/irqdomain.h
> index 42d196805f58..1d4a8e7c5d5f 100644
> --- a/include/linux/irqdomain.h
> +++ b/include/linux/irqdomain.h
> @@ -265,6 +265,11 @@ struct irq_domain *irq_domain_add_simple(struct device_node *of_node,
>  					 unsigned int first_irq,
>  					 const struct irq_domain_ops *ops,
>  					 void *host_data);
> +struct irq_domain *irq_domain_create_simple(struct fwnode_handle *fwnode,
> +					    unsigned int size,
> +					    unsigned int first_irq,
> +					    const struct irq_domain_ops *ops,
> +					    void *host_data);
>  struct irq_domain *irq_domain_add_legacy(struct device_node *of_node,
>  					 unsigned int size,
>  					 unsigned int first_irq,
> diff --git a/kernel/irq/irqdomain.c b/kernel/irq/irqdomain.c
> index 288151393a06..418548ea13cf 100644
> --- a/kernel/irq/irqdomain.c
> +++ b/kernel/irq/irqdomain.c
> @@ -317,10 +317,20 @@ struct irq_domain *irq_domain_add_simple(struct device_node *of_node,
>  					 unsigned int first_irq,
>  					 const struct irq_domain_ops *ops,
>  					 void *host_data)
> +{
> +	return irq_domain_create_simple(of_node_to_fwnode(of_node), size, first_irq, ops, host_data);
> +}
> +EXPORT_SYMBOL_GPL(irq_domain_add_simple);

Please move this as an inline helper in linux/irqdomain.h, so that we
can drop this export altogether.

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