Skip to contentSkip to conversation

thermal: Rename generate_netlink_event

PATCH Rafael J. Wysocki 1 participant 2 messages Aug 18, 2011 1 message not in the archive ACPI

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

Rafael J. Wysocki

author Acked-by
#1 lore raw
Quoted 9 lines · Jean Delvare

It doesn't seem right for the thermal subsystem to export a symbol named generate_netlink_event. This function is thermal-specific and its name should reflect that fact. Rename it to thermal_generate_netlink_event.

Cc Rafael J. Wysocki <[email protected]>
Cc R.Durgadoss <[email protected]>
Cc Len Brown <[email protected]>
Quoted 54 lines
---
 Documentation/thermal/sysfs-api.txt |    2 +-
 drivers/thermal/thermal_sys.c       |    4 ++--
 include/linux/thermal.h             |    4 ++--
 3 files changed, 5 insertions(+), 5 deletions(-)
Documentation/thermal/sysfs-api.txt +1 -1
@@ -284,7 +284,7 @@ method, the sys I/F structure will be bu
 The framework includes a simple notification mechanism, in the form of a
 netlink event. Netlink socket initialization is done during the _init_
 of the framework. Drivers which intend to use the notification mechanism
-just need to call generate_netlink_event() with two arguments viz
+just need to call thermal_generate_netlink_event() with two arguments viz
 (originator, event). Typically the originator will be an integer assigned
 to a thermal_zone_device when it registers itself with the framework. The
 event will be one of:{THERMAL_AUX0, THERMAL_AUX1, THERMAL_CRITICAL,
drivers/thermal/thermal_sys.c +2 -2
@@ -1304,7 +1304,7 @@ static struct genl_multicast_group therm
 	.name = THERMAL_GENL_MCAST_GROUP_NAME,
 };
 
-int generate_netlink_event(u32 orig, enum events event)
+int thermal_generate_netlink_event(u32 orig, enum events event)
 {
 	struct sk_buff *skb;
 	struct nlattr *attr;
@@ -1363,7 +1363,7 @@ int generate_netlink_event(u32 orig, enu
 
 	return result;
 }
-EXPORT_SYMBOL(generate_netlink_event);
+EXPORT_SYMBOL(thermal_generate_netlink_event);
 
 static int genetlink_init(void)
 {
include/linux/thermal.h +2 -2
@@ -152,9 +152,9 @@ struct thermal_cooling_device *thermal_c
 void thermal_cooling_device_unregister(struct thermal_cooling_device *);
 
 #ifdef CONFIG_NET
-extern int generate_netlink_event(u32 orig, enum events event);
+extern int thermal_generate_netlink_event(u32 orig, enum events event);
 #else
-static inline int generate_netlink_event(u32 orig, enum events event)
+static inline int thermal_generate_netlink_event(u32 orig, enum events event)
 {
 	return 0;
 }
author Acked-by
#2 lore raw
In reply to a message not in the archive
Quoted 9 lines · Jean Delvare

It doesn't seem right for the thermal subsystem to export a symbol named generate_netlink_event. This function is thermal-specific and its name should reflect that fact. Rename it to thermal_generate_netlink_event.

Cc Rafael J. Wysocki <[email protected]>
Cc R.Durgadoss <[email protected]>
Cc Len Brown <[email protected]>
Quoted 54 lines
---
 Documentation/thermal/sysfs-api.txt |    2 +-
 drivers/thermal/thermal_sys.c       |    4 ++--
 include/linux/thermal.h             |    4 ++--
 3 files changed, 5 insertions(+), 5 deletions(-)
Documentation/thermal/sysfs-api.txt +1 -1
@@ -284,7 +284,7 @@ method, the sys I/F structure will be bu
 The framework includes a simple notification mechanism, in the form of a
 netlink event. Netlink socket initialization is done during the _init_
 of the framework. Drivers which intend to use the notification mechanism
-just need to call generate_netlink_event() with two arguments viz
+just need to call thermal_generate_netlink_event() with two arguments viz
 (originator, event). Typically the originator will be an integer assigned
 to a thermal_zone_device when it registers itself with the framework. The
 event will be one of:{THERMAL_AUX0, THERMAL_AUX1, THERMAL_CRITICAL,
drivers/thermal/thermal_sys.c +2 -2
@@ -1304,7 +1304,7 @@ static struct genl_multicast_group therm
 	.name = THERMAL_GENL_MCAST_GROUP_NAME,
 };
 
-int generate_netlink_event(u32 orig, enum events event)
+int thermal_generate_netlink_event(u32 orig, enum events event)
 {
 	struct sk_buff *skb;
 	struct nlattr *attr;
@@ -1363,7 +1363,7 @@ int generate_netlink_event(u32 orig, enu
 
 	return result;
 }
-EXPORT_SYMBOL(generate_netlink_event);
+EXPORT_SYMBOL(thermal_generate_netlink_event);
 
 static int genetlink_init(void)
 {
include/linux/thermal.h +2 -2
@@ -152,9 +152,9 @@ struct thermal_cooling_device *thermal_c
 void thermal_cooling_device_unregister(struct thermal_cooling_device *);
 
 #ifdef CONFIG_NET
-extern int generate_netlink_event(u32 orig, enum events event);
+extern int thermal_generate_netlink_event(u32 orig, enum events event);
 #else
-static inline int generate_netlink_event(u32 orig, enum events event)
+static inline int thermal_generate_netlink_event(u32 orig, enum events event)
 {
 	return 0;
 }