kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Huth <thuth@redhat.com>
To: Andrew Jones <drjones@redhat.com>, kvm@vger.kernel.org
Cc: lvivier@redhat.com, pbonzini@redhat.com
Subject: Re: [kvm-unit-tests PATCH v2 2/4] devicetree: don't cache #address/#size-cells
Date: Wed, 11 May 2016 17:31:37 +0200	[thread overview]
Message-ID: <57335059.8010407@redhat.com> (raw)
In-Reply-To: <1462973121-14548-3-git-send-email-drjones@redhat.com>

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@redhat.com>
> ---
>  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@redhat.com>


  reply	other threads:[~2016-05-11 15:31 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-11 13:25 [kvm-unit-tests PATCH v2 0/4] devicetree: use correct #address/#size cells Andrew Jones
2016-05-11 13:25 ` [kvm-unit-tests PATCH v2 1/4] devicetree: translate with parent node's #address/size-cells Andrew Jones
2016-05-11 15:30   ` Thomas Huth
2016-05-11 13:25 ` [kvm-unit-tests PATCH v2 2/4] devicetree: don't cache #address/#size-cells Andrew Jones
2016-05-11 15:31   ` Thomas Huth [this message]
2016-05-11 13:25 ` [kvm-unit-tests PATCH v2 3/4] devicetree: remove unused globals Andrew Jones
2016-05-11 15:38   ` Thomas Huth
2016-05-11 15:46     ` Paolo Bonzini
2016-05-11 16:10       ` Andrew Jones
2016-05-11 13:25 ` [kvm-unit-tests PATCH v2 4/4] devicetree: dt_get_nr_cells output robustness Andrew Jones
2016-05-11 15:36   ` Thomas Huth

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=57335059.8010407@redhat.com \
    --to=thuth@redhat.com \
    --cc=drjones@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=lvivier@redhat.com \
    --cc=pbonzini@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).