linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Petr Mladek <pmladek@suse.com>
To: Sakari Ailus <sakari.ailus@linux.intel.com>
Cc: linux-kernel@vger.kernel.org, rafael@kernel.org,
	Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
	linux-acpi@vger.kernel.org, devicetree@vger.kernel.org
Subject: Re: [PATCH 4/5] lib/vsprintf: Make use of fwnode API to obtain node names and separators
Date: Wed, 27 Mar 2019 13:53:56 +0100	[thread overview]
Message-ID: <20190327125356.s7hockgf5yfyhx52@pathway.suse.cz> (raw)
In-Reply-To: <20190322152930.16642-5-sakari.ailus@linux.intel.com>

On Fri 2019-03-22 17:29:29, Sakari Ailus wrote:
> Instead of implementing our own means of discovering parent nodes, node
> names or counting how many parents a node has, use the newly added
> functions in the fwnode API to obtain that information.
> 
> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
> ---
>  lib/vsprintf.c | 37 +++++++++++++++----------------------
>  1 file changed, 15 insertions(+), 22 deletions(-)
> 
> diff --git a/lib/vsprintf.c b/lib/vsprintf.c
> index 5f60b8d41277..91f2a3e4892e 100644
> --- a/lib/vsprintf.c
> +++ b/lib/vsprintf.c
> @@ -37,6 +37,7 @@
>  #include <net/addrconf.h>
>  #include <linux/siphash.h>
>  #include <linux/compiler.h>
> +#include <linux/property.h>
>  #ifdef CONFIG_BLOCK
>  #include <linux/blkdev.h>
>  #endif
> @@ -1720,32 +1721,23 @@ char *flags_string(char *buf, char *end, void *flags_ptr, const char *fmt)
>  	return format_flags(buf, end, flags, names);
>  }
>  
> -static const char *device_node_name_for_depth(const struct device_node *np, int depth)
> -{
> -	for ( ; np && depth; depth--)
> -		np = np->parent;
> -
> -	return kbasename(np->full_name);
> -}
> -
>  static noinline_for_stack
> -char *device_node_gen_full_name(const struct device_node *np, char *buf, char *end)
> +char *fwnode_gen_full_name(struct fwnode_handle *fwnode, char *buf, char *end)

I first read this as fwnode_get_full_name(), see "get" vs. "gen".
I guess that it was because there is used also fwnode_get_name().

Please, rename it to fwnode_full_name_string() or so ;-)

Best Regards,
Petr

  reply	other threads:[~2019-03-27 12:53 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-22 15:29 [PATCH 0/5] Device property improvements, add %pfw format specifier Sakari Ailus
2019-03-22 15:29 ` [PATCH 1/5] device property: Add functions for accessing node's parents Sakari Ailus
2019-03-22 15:29 ` [PATCH 2/5] device property: Add fwnode_get_name for returning the name of a node Sakari Ailus
2019-03-24 17:21   ` Randy Dunlap
2019-03-24 18:19     ` Sakari Ailus
2019-03-22 15:29 ` [PATCH 3/5] device property: Add a function to obtain a node's prefix Sakari Ailus
2019-03-22 15:29 ` [PATCH 4/5] lib/vsprintf: Make use of fwnode API to obtain node names and separators Sakari Ailus
2019-03-27 12:53   ` Petr Mladek [this message]
2019-03-27 13:49     ` Sakari Ailus
2019-03-22 15:29 ` [PATCH 5/5] lib/vsprintf: Add %pfw conversion specifier for printing fwnode names Sakari Ailus
2019-03-22 17:21   ` Andy Shevchenko
2019-03-24 18:17     ` Sakari Ailus
2019-03-26 13:13       ` Andy Shevchenko
2019-03-26 13:39         ` Sakari Ailus
2019-03-26 13:55           ` Andy Shevchenko
2019-03-26 14:09             ` Sakari Ailus
2019-03-26 15:21             ` Petr Mladek
2019-03-26 14:06         ` Heikki Krogerus
2019-03-26 14:12           ` Sakari Ailus
2019-03-26 14:30             ` Andy Shevchenko
2019-03-26 15:50               ` Petr Mladek
2019-03-26 14:30             ` Heikki Krogerus
2019-03-26 15:13   ` Petr Mladek
2019-03-27 14:10     ` Sakari Ailus
2019-03-28 14:35       ` Petr Mladek

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=20190327125356.s7hockgf5yfyhx52@pathway.suse.cz \
    --to=pmladek@suse.com \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=devicetree@vger.kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rafael@kernel.org \
    --cc=sakari.ailus@linux.intel.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).