提交 c0a05bf0 编写于 作者: S Steffen Trumtrar 提交者: Grant Likely

of: add 'const' to of_node_full_name parameter

As the function just returns the np->full_name or the string "<no-node>", the
passed device_node pointer is not changed in any way.

The passed parameter can therefore be a const pointer.

Also, fix the following error from checkpatch.pl:

ERROR: "foo* bar" should be "foo *bar"
+static inline const char* of_node_full_name(const struct device_node *np)
Signed-off-by: NSteffen Trumtrar <s.trumtrar@pengutronix.de>
Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
上级 ced4eec9
...@@ -160,7 +160,7 @@ static inline unsigned long of_read_ulong(const __be32 *cell, int size) ...@@ -160,7 +160,7 @@ static inline unsigned long of_read_ulong(const __be32 *cell, int size)
#define OF_BAD_ADDR ((u64)-1) #define OF_BAD_ADDR ((u64)-1)
static inline const char* of_node_full_name(struct device_node *np) static inline const char *of_node_full_name(const struct device_node *np)
{ {
return np ? np->full_name : "<no-node>"; return np ? np->full_name : "<no-node>";
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册