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] [day] [month] [year] [list]
Date:	Fri, 29 May 2015 10:00:02 -0500
From:	Rob Herring <robherring2@...il.com>
To:	Geert Uytterhoeven <geert+renesas@...der.be>
Cc:	Grant Likely <grant.likely@...aro.org>,
	Rob Herring <robh+dt@...nel.org>,
	Pantelis Antoniou <pantelis.antoniou@...sulko.com>,
	"devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] of/fdt: Make fdt blob input parameters of unflatten
 functions const

On Wed, May 13, 2015 at 9:33 AM, Geert Uytterhoeven
<geert+renesas@...der.be> wrote:
> Operations to unflatten fdt blobs never modify the input blobs, hence
> make them const. Now we no longer need to cast arbitrary const data to
> "void *" when calling of_fdt_unflatten_tree().
>
> Signed-off-by: Geert Uytterhoeven <geert+renesas@...der.be>

Applied, thanks.

Rob

> ---
>  drivers/of/fdt.c       | 6 +++---
>  include/linux/of_fdt.h | 2 +-
>  2 files changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c
> index caa6bc447165636f..5e83687c090f7ee2 100644
> --- a/drivers/of/fdt.c
> +++ b/drivers/of/fdt.c
> @@ -168,7 +168,7 @@ static void *unflatten_dt_alloc(void **mem, unsigned long size,
>   * @dad: Parent struct device_node
>   * @fpsize: Size of the node path up at the current depth.
>   */
> -static void * unflatten_dt_node(void *blob,
> +static void * unflatten_dt_node(const void *blob,
>                                 void *mem,
>                                 int *poffset,
>                                 struct device_node *dad,
> @@ -378,7 +378,7 @@ static void * unflatten_dt_node(void *blob,
>   * @dt_alloc: An allocator that provides a virtual address to memory
>   * for the resulting tree
>   */
> -static void __unflatten_device_tree(void *blob,
> +static void __unflatten_device_tree(const void *blob,
>                              struct device_node **mynodes,
>                              void * (*dt_alloc)(u64 size, u64 align))
>  {
> @@ -441,7 +441,7 @@ static void *kernel_tree_alloc(u64 size, u64 align)
>   * pointers of the nodes so the normal device-tree walking functions
>   * can be used.
>   */
> -void of_fdt_unflatten_tree(unsigned long *blob,
> +void of_fdt_unflatten_tree(const unsigned long *blob,
>                         struct device_node **mynodes)
>  {
>         __unflatten_device_tree(blob, mynodes, &kernel_tree_alloc);
> diff --git a/include/linux/of_fdt.h b/include/linux/of_fdt.h
> index 587ee507965d78a1..0cf217d404ce4660 100644
> --- a/include/linux/of_fdt.h
> +++ b/include/linux/of_fdt.h
> @@ -37,7 +37,7 @@ extern bool of_fdt_is_big_endian(const void *blob,
>                                  unsigned long node);
>  extern int of_fdt_match(const void *blob, unsigned long node,
>                         const char *const *compat);
> -extern void of_fdt_unflatten_tree(unsigned long *blob,
> +extern void of_fdt_unflatten_tree(const unsigned long *blob,
>                                struct device_node **mynodes);
>
>  /* TBD: Temporary export of fdt globals - remove when code fully merged */
> --
> 1.9.1
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ