From: Rob Herring <robh-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
To: Qun-Wei Lin <qun-wei.lin-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org>
Cc: david-xT8FGy+AXnRB3Ne2BGzF6laj5H9X9Tb+@public.gmane.org,
devicetree-compiler-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
casper.li-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org,
chinwen.chang-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org,
kuan-ying.lee-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org,
ivan.tseng-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org,
ladon.huang-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org
Subject: Re: [PATCH] checks: Update #{size,address}-cells check for 'dma-ranges'
Date: Thu, 12 Jan 2023 13:47:03 -0600 [thread overview]
Message-ID: <CAL_JsqKkE_Aytd_7WOV3iM+pipjnwDWR7yt=L+xE8+cyjL8b9w@mail.gmail.com> (raw)
In-Reply-To: <20230112125654.13390-1-qun-wei.lin-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org>
On Thu, Jan 12, 2023 at 6:59 AM Qun-Wei Lin <qun-wei.lin-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org> wrote:
>
> The "dma-ranges" property value is a sequence of
> child-address parent-address child-size
>
> The size of each field is determined by taking the child's
> "#address-cells" value, the parent's "#address-cells" value,
> and the child's "#size-cells" value.
>
> However, in the following example, it gives a false alarm:
> +-----------------------------------+---------------------------------------+
> | ranges.dts | dma-ranges.dts |
> +-----------------------------------+---------------------------------------+
> | /dts-v1/; | /dts-v1/; |
> | | |
> | /{ | /{ |
> | #address-cells = <1>; | #address-cells = <1>; |
> | | |
> | parent { | parent { |
> | #address-cells = <1>; | #address-cells = <1>; |
> | #size-cells = <1>; | #size-cells = <1>; |
> | ranges = <0x0 0xe000 0x1000>; | dma-ranges = <0x0 0xe000 0x1000>; |
> | child { | child { |
> | ... | ... |
> | }; | }; |
> | }; | }; |
> | }; | }; |
> +-----------------------------------+---------------------------------------+
> | no warning | Warning (avoid_unnecessary_addr_size) |
> +-----------------------------------+---------------------------------------+
>
> Same as "ranges", it should not be reported in this check.
Except that dma-ranges only makes sense if there is a ranges property.
Rob
next prev parent reply other threads:[~2023-01-12 19:47 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-12 12:56 [PATCH] checks: Update #{size,address}-cells check for 'dma-ranges' Qun-Wei Lin
[not found] ` <20230112125654.13390-1-qun-wei.lin-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org>
2023-01-12 19:47 ` Rob Herring [this message]
[not found] ` <CAL_JsqKkE_Aytd_7WOV3iM+pipjnwDWR7yt=L+xE8+cyjL8b9w-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2023-02-02 6:49 ` David Gibson
2023-02-02 6:48 ` David Gibson
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='CAL_JsqKkE_Aytd_7WOV3iM+pipjnwDWR7yt=L+xE8+cyjL8b9w@mail.gmail.com' \
--to=robh-dgejt+ai2ygdnm+yrofe0a@public.gmane.org \
--cc=casper.li-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org \
--cc=chinwen.chang-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org \
--cc=david-xT8FGy+AXnRB3Ne2BGzF6laj5H9X9Tb+@public.gmane.org \
--cc=devicetree-compiler-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=ivan.tseng-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org \
--cc=kuan-ying.lee-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org \
--cc=ladon.huang-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org \
--cc=qun-wei.lin-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org \
/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 read-only IMAP folder(s) and NNTP newsgroup(s).