Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

of: Constify safe_name() kobject arg

The kobject is not modified by safe_name() function, so make it const.

Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20241010-dt-const-v1-6-87a51f558425@kernel.org
Signed-off-by: Rob Herring (Arm) <robh@kernel.org>

+1 -1
+1 -1
drivers/of/kobj.c
··· 37 37 } 38 38 39 39 /* always return newly allocated name, caller must free after use */ 40 - static const char *safe_name(struct kobject *kobj, const char *orig_name) 40 + static const char *safe_name(const struct kobject *kobj, const char *orig_name) 41 41 { 42 42 const char *name = orig_name; 43 43 struct kernfs_node *kn;