Re: [kvm-unit-tests PATCH v2 2/4] devicetree: don't cache #address/#size-cells

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 11.05.2016 15:25, Andrew Jones wrote:
> The bus structure allows caching of #address/#size-cells. This
> is an unnecessary complication, as we can always find that
> information in the FDT (and don't care about the overhead).
> Anyway, it's currently unused, so let's just remove the code.
> 
> Signed-off-by: Andrew Jones <drjones@xxxxxxxxxx>
> ---
>  lib/devicetree.c | 4 ----
>  lib/devicetree.h | 5 -----
>  2 files changed, 9 deletions(-)
> 
> diff --git a/lib/devicetree.c b/lib/devicetree.c
> index 7859968c7a8d2..2da7d22339a64 100644
> --- a/lib/devicetree.c
> +++ b/lib/devicetree.c
> @@ -278,7 +278,6 @@ int dt_get_default_console_node(void)
>  
>  int dt_init(const void *fdt_ptr)
>  {
> -	struct dt_bus *defbus = (struct dt_bus *)&dt_default_bus;
>  	int root, ret;
>  
>  	ret = fdt_check_header(fdt_ptr);
> @@ -295,8 +294,5 @@ int dt_init(const void *fdt_ptr)
>  	if (ret < 0)
>  		return ret;
>  
> -	defbus->nr_address_cells = root_nr_address_cells;
> -	defbus->nr_size_cells = root_nr_size_cells;
> -
>  	return 0;
>  }
> diff --git a/lib/devicetree.h b/lib/devicetree.h
> index d40243a603925..315ba948e7cc2 100644
> --- a/lib/devicetree.h
> +++ b/lib/devicetree.h
> @@ -66,9 +66,6 @@ struct dt_bus {
>  	 *  - a negative FDT_ERR_* value on failure
>  	 */
>  	int (*translate)(const struct dt_device *dev, int regidx, void *reg);
> -
> -	/* the bus #address-cells and #size-cells properties */
> -	u32 nr_address_cells, nr_size_cells;
>  };
>  
>  /* dt_bus_match_any matches any fdt node, i.e. it always returns true */
> @@ -125,8 +122,6 @@ static inline int dt_pbus_get_base(const struct dt_device *dev,
>   * dt_bus_init_defaults initializes @bus with
>   *  match		<- dt_bus_match_any
>   *  translate		<- dt_pbus_translate
> - *  nr_address_cells	<- #address-cells of the root node
> - *  nr_size_cells	<- #size-cells of the root node
>   */
>  extern void dt_bus_init_defaults(struct dt_bus *bus);
>  
> 

Reviewed-by: Thomas Huth <thuth@xxxxxxxxxx>

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux