hc
2024-12-19 9370bb92b2d16684ee45cf24e879c93c509162da
kernel/arch/powerpc/platforms/powernv/opal-sensor-groups.c
....@@ -1,12 +1,8 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /*
23 * PowerNV OPAL Sensor-groups interface
34 *
45 * Copyright 2017 IBM Corp.
5
- *
6
- * This program is free software; you can redistribute it and/or
7
- * modify it under the terms of the GNU General Public License
8
- * as published by the Free Software Foundation; either version
9
- * 2 of the License, or (at your option) any later version.
106 */
117
128 #define pr_fmt(fmt) "opal-sensor-groups: " fmt
....@@ -17,7 +13,7 @@
1713
1814 #include <asm/opal.h>
1915
20
-DEFINE_MUTEX(sg_mutex);
16
+static DEFINE_MUTEX(sg_mutex);
2117
2218 static struct kobject *sg_kobj;
2319
....@@ -214,9 +210,9 @@
214210 }
215211
216212 if (!of_property_read_u32(node, "ibm,chip-id", &chipid))
217
- sprintf(sgs[i].name, "%s%d", node->name, chipid);
213
+ sprintf(sgs[i].name, "%pOFn%d", node, chipid);
218214 else
219
- sprintf(sgs[i].name, "%s", node->name);
215
+ sprintf(sgs[i].name, "%pOFn", node);
220216
221217 sgs[i].sg.name = sgs[i].name;
222218 if (add_attr_group(ops, len, &sgs[i], sgid)) {