lkml.org 
[lkml]   [2014]   [Nov]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
SubjectRe: [PATCH 1/8] of: Use vargs in __of_node_alloc
From
Date
On Fri, 2014-11-21 at 01:35 +0000, Grant Likely wrote:
> The overlay code needs to construct a new full_name from the parent name
> and the node name, but the current method has to allocate and then free
> an temporary string which is wasteful. Fix this problem by using vargs
> to pass in a format and arguments into __of_node_alloc().
[]
> diff --git a/drivers/of/of_private.h b/drivers/of/of_private.h
[]
> @@ -61,7 +61,7 @@ static inline int of_property_notify(int action, struct device_node *np,
> * own the devtree lock or work on detached trees only.
> */
> struct property *__of_prop_dup(const struct property *prop, gfp_t allocflags);
> -struct device_node *__of_node_alloc(const char *full_name, gfp_t allocflags);

Please add

__printf(1, 2)
> +struct device_node *__of_node_alloc(const char *fmt, ...);




\
 
 \ /
  Last update: 2014-11-21 03:21    [W:0.114 / U:0.412 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site