Skip to contentSkip to conversation

drivers: cpufreq: Remove unused function in cpufreq.c

PATCH In review Rashika Kheria 3 participants 6 messages Feb 26, 2014 CPU frequency scaling framework

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drivers: cpufreq: Remove unused function in cpufreq.c

Remove unused function show_boost() in drivers/cpufreq/cpufreq.c.

This eliminates the following warning in drivers/cpufreq/cpufreq.c:
drivers/cpufreq/cpufreq.c:355:9: warning: no previous prototype for ‘show_boost’ [-Wmissing-prototypes]

---
 drivers/cpufreq/cpufreq.c |    6 ------
 1 file changed, 6 deletions(-)
drivers/cpufreq/cpufreq.c +0 -6
index 08ca8c9..6dce474 100644
@@ -352,12 +352,6 @@ EXPORT_SYMBOL_GPL(cpufreq_notify_post_transition);
 /*********************************************************************
  *                          SYSFS INTERFACE                          *
  *********************************************************************/
-ssize_t show_boost(struct kobject *kobj,
-				 struct attribute *attr, char *buf)
-{
-	return sprintf(buf, "%d\n", cpufreq_driver->boost_enabled);
-}
-
 static ssize_t store_boost(struct kobject *kobj, struct attribute *attr,
 				  const char *buf, size_t count)
 {
Signature · 1 line
1.7.9.5
Reviewed-by on v1 1/1
#1 lore raw
Quoted 6 lines · Rashika Kheria

Remove unused function show_boost() in drivers/cpufreq/cpufreq.c.

This eliminates the following warning in drivers/cpufreq/cpufreq.c:
drivers/cpufreq/cpufreq.c:355:9: warning: no previous prototype for ‘show_boost’ [-Wmissing-prototypes]

Quoted 23 lines
 drivers/cpufreq/cpufreq.c |    6 ------
 1 file changed, 6 deletions(-)
drivers/cpufreq/cpufreq.c +0 -6
index 08ca8c9..6dce474 100644
@@ -352,12 +352,6 @@ EXPORT_SYMBOL_GPL(cpufreq_notify_post_transition);
 /*********************************************************************
  *                          SYSFS INTERFACE                          *
  *********************************************************************/
-ssize_t show_boost(struct kobject *kobj,
-				 struct attribute *attr, char *buf)
-{
-	return sprintf(buf, "%d\n", cpufreq_driver->boost_enabled);
-}
-
 static ssize_t store_boost(struct kobject *kobj, struct attribute *attr,
 				  const char *buf, size_t count)
 {
Signature · 1 line
1.7.9.5
#2 lore raw

PATCH v3 1/1 drivers: cpufreq: Mark function as static in cpufreq.c

In reply to Rashika Kheria

Mark function as static in cpufreq.c because it is not used outside this file.

This eliminates the following warning in cpufreq.c:
drivers/cpufreq/cpufreq.c:355:9: warning: no previous prototype for ‘show_boost’ [-Wmissing-prototypes]

---
Changes since v1:
Incorrect Fix
Changes since v2:
Show Changelog

 drivers/cpufreq/cpufreq.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/cpufreq/cpufreq.c +1 -1
index 08ca8c9..54fd670 100644
@@ -352,7 +352,7 @@ EXPORT_SYMBOL_GPL(cpufreq_notify_post_transition);
 /*********************************************************************
  *                          SYSFS INTERFACE                          *
  *********************************************************************/
-ssize_t show_boost(struct kobject *kobj,
+static ssize_t show_boost(struct kobject *kobj,
 				 struct attribute *attr, char *buf)
 {
 	return sprintf(buf, "%d\n", cpufreq_driver->boost_enabled);
Signature · 1 line
1.7.9.5
#3 lore raw

Re: [PATCH v3] drivers: cpufreq: Mark function as static in cpufreq.c

Quoted 7 lines · Rashika Kheria

Mark function as static in cpufreq.c because it is not used outside this file.

This eliminates the following warning in cpufreq.c:
drivers/cpufreq/cpufreq.c:355:9: warning: no previous prototype for ‘show_boost’ [-Wmissing-prototypes]

v2 has been Reviewed-by: Josh already, right?

Quoted 23 lines

---
Changes since v1:
Incorrect Fix
Changes since v2:
Show Changelog

 drivers/cpufreq/cpufreq.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/cpufreq/cpufreq.c +1 -1
index 08ca8c9..54fd670 100644
@@ -352,7 +352,7 @@ EXPORT_SYMBOL_GPL(cpufreq_notify_post_transition);
 /*********************************************************************
  *                          SYSFS INTERFACE                          *
  *********************************************************************/
-ssize_t show_boost(struct kobject *kobj,
+static ssize_t show_boost(struct kobject *kobj,
 				 struct attribute *attr, char *buf)
 {
 	return sprintf(buf, "%d\n", cpufreq_driver->boost_enabled);
Signature · 2 lines
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.
#4 lore raw

Re: [PATCH v3] drivers: cpufreq: Mark function as static in cpufreq.c

Quoted 10 lines · Rafael J. Wysocki
Quoted 7 lines · Rashika Kheria

Mark function as static in cpufreq.c because it is not used outside this file.

This eliminates the following warning in cpufreq.c:
drivers/cpufreq/cpufreq.c:355:9: warning: no previous prototype for ‘show_boost’ [-Wmissing-prototypes]

v2 has been Reviewed-by: Josh already, right?

Feel free to forward-propagate to v3 as well, if that helps.

Quoted 27 lines
Quoted 23 lines

---
Changes since v1:
Incorrect Fix
Changes since v2:
Show Changelog

 drivers/cpufreq/cpufreq.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/cpufreq/cpufreq.c +1 -1
index 08ca8c9..54fd670 100644
@@ -352,7 +352,7 @@ EXPORT_SYMBOL_GPL(cpufreq_notify_post_transition);
 /*********************************************************************
  *                          SYSFS INTERFACE                          *
  *********************************************************************/
-ssize_t show_boost(struct kobject *kobj,
+static ssize_t show_boost(struct kobject *kobj,
 				 struct attribute *attr, char *buf)
 {
 	return sprintf(buf, "%d\n", cpufreq_driver->boost_enabled);
Signature · 2 lines
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.
#5 lore raw

Re: [PATCH v3] drivers: cpufreq: Mark function as static in cpufreq.c

Quoted 5 lines · On Wednesday, February 26, 2014 02:16:51 PM [email protected] wrote:
Quoted 4 lines · Rafael J. Wysocki
Quoted 3 lines · Rashika Kheria

Mark function as static in cpufreq.c because it is not used outside this file.

Quoted 8 lines
Quoted 6 lines
Quoted 4 lines

This eliminates the following warning in cpufreq.c:
drivers/cpufreq/cpufreq.c:355:9: warning: no previous prototype for ‘show_boost’ [-Wmissing-prototypes]

v2 has been Reviewed-by: Josh already, right?

Feel free to forward-propagate to v3 as well, if that helps.

OK

Applied, thanks!

Quoted 28 lines
Quoted 9 lines
Quoted 9 lines

---
Changes since v1:
Incorrect Fix
Changes since v2:
Show Changelog

 drivers/cpufreq/cpufreq.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Quoted 15 lines
Quoted 6 lines
drivers/cpufreq/cpufreq.c +0 -0
index 08ca8c9..54fd670 100644

drivers/cpufreq/cpufreq.c EXPORT_SYMBOL_GPL(cpufreq_notify_post_transition); · line 358

Quoted 8 lines
drivers/cpufreq/cpufreq.c +1 -1
@@ -352,7 +352,7 @@ EXPORT_SYMBOL_GPL(cpufreq_notify_post_transition);
 /*********************************************************************
  *                          SYSFS INTERFACE                          *
  *********************************************************************/
-ssize_t show_boost(struct kobject *kobj,
+static ssize_t show_boost(struct kobject *kobj,
 				 struct attribute *attr, char *buf)
 {
 	return sprintf(buf, "%d\n", cpufreq_driver->boost_enabled);

--
To unsubscribe from this list: send the line "unsubscribe linux-pm" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

Signature · 2 lines
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.