Skip to content

Commit 72d1c18

Browse files
zijun-hurobherring
authored andcommitted
of: Do not expose of_alias_scan() and correct its comments
of_alias_scan() has no external callers and returns void. Do not expose it and delete return value descriptions in its comments. Signed-off-by: Zijun Hu <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Rob Herring (Arm) <[email protected]>
1 parent 1b09363 commit 72d1c18

File tree

4 files changed

+5
-3
lines changed

4 files changed

+5
-3
lines changed

drivers/of/base.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1812,8 +1812,7 @@ static void of_alias_add(struct alias_prop *ap, struct device_node *np,
18121812
* for storing the resulting tree
18131813
*
18141814
* The function scans all the properties of the 'aliases' node and populates
1815-
* the global lookup table with the properties. It returns the
1816-
* number of alias properties found, or an error code in case of failure.
1815+
* the global lookup table with the properties.
18171816
*/
18181817
void of_alias_scan(void * (*dt_alloc)(u64 size, u64 align))
18191818
{

drivers/of/of_private.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,8 @@ extern void *__unflatten_device_tree(const void *blob,
119119
void *(*dt_alloc)(u64 size, u64 align),
120120
bool detached);
121121

122+
void of_alias_scan(void * (*dt_alloc)(u64 size, u64 align));
123+
122124
/**
123125
* General utilities for working with live trees.
124126
*

drivers/of/pdt.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@
1919
#include <linux/of.h>
2020
#include <linux/of_pdt.h>
2121

22+
#include "of_private.h"
23+
2224
static struct of_pdt_ops *of_pdt_prom_ops __initdata;
2325

2426
#if defined(CONFIG_SPARC)

include/linux/of.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -398,7 +398,6 @@ extern int of_phandle_iterator_args(struct of_phandle_iterator *it,
398398
uint32_t *args,
399399
int size);
400400

401-
extern void of_alias_scan(void * (*dt_alloc)(u64 size, u64 align));
402401
extern int of_alias_get_id(const struct device_node *np, const char *stem);
403402
extern int of_alias_get_highest_id(const char *stem);
404403

0 commit comments

Comments
 (0)