From: Rob Herring <robh@kernel.org>
To: lijiazi <jqqlijiazi@gmail.com>
Cc: Frank Rowand <frowand.list@gmail.com>,
Sergey Senozhatsky <sergey.senozhatsky@gmail.com>,
lijiazi <lijiazi@xiaomi.com>,
devicetree@vger.kernel.org
Subject: Re: [PATCH] of: Use enum instead of macro to define flag
Date: Mon, 3 Feb 2020 11:53:06 +0000 [thread overview]
Message-ID: <20200203115306.GA20133@bogus> (raw)
In-Reply-To: <00a5abf82a735ff0de442c28c25a60ff4b408a66.1579603361.git.lijiazi@xiaomi.com>
On Tue, Jan 21, 2020 at 07:52:36PM +0800, lijiazi wrote:
> Use enum instead of macro to define device node flag.
> And it seems that no need start with 1, so let's start with 0.
Yes, the diff tells me all this. What's missing is why?
I assume this has something to do with the vsprintf changes? Is this a
dependency?
On it's own, this seems like needless churn.
>
> Suggested-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
> Signed-off-by: lijiazi <lijiazi@xiaomi.com>
Need a full name here.
> ---
> include/linux/of.h | 14 ++++++++------
> 1 file changed, 8 insertions(+), 6 deletions(-)
>
> diff --git a/include/linux/of.h b/include/linux/of.h
> index c669c0a..b90936c0 100644
> --- a/include/linux/of.h
> +++ b/include/linux/of.h
> @@ -140,12 +140,14 @@ extern raw_spinlock_t devtree_lock;
> * struct device_node flag descriptions
> * (need to be visible even when !CONFIG_OF)
> */
> -#define OF_DYNAMIC 1 /* (and properties) allocated via kmalloc */
> -#define OF_DETACHED 2 /* detached from the device tree */
> -#define OF_POPULATED 3 /* device already created */
> -#define OF_POPULATED_BUS 4 /* platform bus created for children */
> -#define OF_OVERLAY 5 /* allocated for an overlay */
> -#define OF_OVERLAY_FREE_CSET 6 /* in overlay cset being freed */
> +enum of_device_node_flag {
> + OF_DYNAMIC = 0, /* (and properties) allocated via kmalloc */
> + OF_DETACHED, /* detached from the device tree */
> + OF_POPULATED, /* device already created */
> + OF_POPULATED_BUS, /* platform bus created for children */
> + OF_OVERLAY, /* allocated for an overlay */
> + OF_OVERLAY_FREE_CSET, /* in overlay cset being freed */
> +};
>
> #define OF_BAD_ADDR ((u64)-1)
>
> --
> 2.7.4
>
prev parent reply other threads:[~2020-02-03 11:53 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-21 11:52 [PATCH] of: Use enum instead of macro to define flag lijiazi
2020-02-03 11:53 ` Rob Herring [this message]
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=20200203115306.GA20133@bogus \
--to=robh@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=frowand.list@gmail.com \
--cc=jqqlijiazi@gmail.com \
--cc=lijiazi@xiaomi.com \
--cc=sergey.senozhatsky@gmail.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