public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] hwmon coretemp: Remove bogus __cpuinitdata etc cleanup
@ 2007-08-23  3:44 Satyam Sharma
  2007-08-24 21:22 ` Rudolf Marek
  2007-09-02 15:41 ` Mark M. Hoffman
  0 siblings, 2 replies; 4+ messages in thread
From: Satyam Sharma @ 2007-08-23  3:44 UTC (permalink / raw)
  To: Rudolf Marek; +Cc: Mark Hoffman, Andrew Morton, Linux Kernel Mailing List


The CPU hotplug notifier_block coretemp_cpu_notifier is already defined
inside an #ifdef HOTPLUG_CPU, therefore marking it as __cpuinitdata is
quite a pointless thing to do.

Also, remove duplicate prototype of function coretemp_update_device()
at the top of this file (another one already exists barely 10 lines
above this one :-)

Signed-off-by: Satyam Sharma <satyam@infradead.org>

---

[ Rudolf, Mark, would it be acceptable to you to remove all the open
  #ifdef HOTPLUG_CPU from this file and replace them with __cpuinit{data}
  instead? That could increase size of modular builds, but would remain
  consistent with rest of kernel, and make the file #ifdef-clean ... ]

 drivers/hwmon/coretemp.c |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)

diff --git a/drivers/hwmon/coretemp.c b/drivers/hwmon/coretemp.c
index 7c17952..f7b0ef4 100644
--- a/drivers/hwmon/coretemp.c
+++ b/drivers/hwmon/coretemp.c
@@ -58,8 +58,6 @@ struct coretemp_data {
 	u8 alarm;
 };
 
-static struct coretemp_data *coretemp_update_device(struct device *dev);
-
 /*
  * Sysfs stuff
  */
@@ -350,7 +348,7 @@ static int coretemp_cpu_callback(struct notifier_block *nfb,
 	return NOTIFY_OK;
 }
 
-static struct notifier_block __cpuinitdata coretemp_cpu_notifier = {
+static struct notifier_block coretemp_cpu_notifier = {
 	.notifier_call = coretemp_cpu_callback,
 };
 #endif				/* !CONFIG_HOTPLUG_CPU */

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] hwmon coretemp: Remove bogus __cpuinitdata etc cleanup
  2007-08-23  3:44 [PATCH] hwmon coretemp: Remove bogus __cpuinitdata etc cleanup Satyam Sharma
@ 2007-08-24 21:22 ` Rudolf Marek
  2007-09-02 15:41 ` Mark M. Hoffman
  1 sibling, 0 replies; 4+ messages in thread
From: Rudolf Marek @ 2007-08-24 21:22 UTC (permalink / raw)
  To: Satyam Sharma; +Cc: Mark Hoffman, Andrew Morton, Linux Kernel Mailing List

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

> The CPU hotplug notifier_block coretemp_cpu_notifier is already defined
> inside an #ifdef HOTPLUG_CPU, therefore marking it as __cpuinitdata is
> quite a pointless thing to do.

Yep true.

> Also, remove duplicate prototype of function coretemp_update_device()

Good catch. Thanks for the fixes.

Acked-by: Rudolf Marek <r.marek@assembler.cz>

Rudolf
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGz0wO3J9wPJqZRNURAnerAKDiDMzqqvymSbvVuVzuvA+dkF8p8gCdGyq7
spqOnJ6YD8NxNgTNSBW8okY=
=/u3Y
-----END PGP SIGNATURE-----

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] hwmon coretemp: Remove bogus __cpuinitdata etc cleanup
  2007-08-23  3:44 [PATCH] hwmon coretemp: Remove bogus __cpuinitdata etc cleanup Satyam Sharma
  2007-08-24 21:22 ` Rudolf Marek
@ 2007-09-02 15:41 ` Mark M. Hoffman
  2007-09-02 18:34   ` Rudolf Marek
  1 sibling, 1 reply; 4+ messages in thread
From: Mark M. Hoffman @ 2007-09-02 15:41 UTC (permalink / raw)
  To: Satyam Sharma; +Cc: Rudolf Marek, Andrew Morton, Linux Kernel Mailing List

Hi Satyam:

* Satyam Sharma <satyam@infradead.org> [2007-08-23 09:14:25 +0530]:
> 
> The CPU hotplug notifier_block coretemp_cpu_notifier is already defined
> inside an #ifdef HOTPLUG_CPU, therefore marking it as __cpuinitdata is
> quite a pointless thing to do.
> 
> Also, remove duplicate prototype of function coretemp_update_device()
> at the top of this file (another one already exists barely 10 lines
> above this one :-)
> 
> Signed-off-by: Satyam Sharma <satyam@infradead.org>

Applied to hwmon-2.6.git/testing, thanks.

> [ Rudolf, Mark, would it be acceptable to you to remove all the open
>   #ifdef HOTPLUG_CPU from this file and replace them with __cpuinit{data}
>   instead? That could increase size of modular builds, but would remain
>   consistent with rest of kernel, and make the file #ifdef-clean ... ]

I am not automatically repulsed by #ifdefs as some are, and in this case the
usage is pretty clear and easy to read (not to mention useful).

I would prefer to leave it.

>  drivers/hwmon/coretemp.c |    4 +---
>  1 files changed, 1 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/hwmon/coretemp.c b/drivers/hwmon/coretemp.c
> index 7c17952..f7b0ef4 100644
> --- a/drivers/hwmon/coretemp.c
> +++ b/drivers/hwmon/coretemp.c
> @@ -58,8 +58,6 @@ struct coretemp_data {
>  	u8 alarm;
>  };
>  
> -static struct coretemp_data *coretemp_update_device(struct device *dev);
> -
>  /*
>   * Sysfs stuff
>   */
> @@ -350,7 +348,7 @@ static int coretemp_cpu_callback(struct notifier_block *nfb,
>  	return NOTIFY_OK;
>  }
>  
> -static struct notifier_block __cpuinitdata coretemp_cpu_notifier = {
> +static struct notifier_block coretemp_cpu_notifier = {
>  	.notifier_call = coretemp_cpu_callback,
>  };
>  #endif				/* !CONFIG_HOTPLUG_CPU */

-- 
Mark M. Hoffman
mhoffman@lightlink.com


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] hwmon coretemp: Remove bogus __cpuinitdata etc cleanup
  2007-09-02 15:41 ` Mark M. Hoffman
@ 2007-09-02 18:34   ` Rudolf Marek
  0 siblings, 0 replies; 4+ messages in thread
From: Rudolf Marek @ 2007-09-02 18:34 UTC (permalink / raw)
  To: Satyam Sharma; +Cc: Mark M. Hoffman, Andrew Morton, Linux Kernel Mailing List

>> [ Rudolf, Mark, would it be acceptable to you to remove all the open
>>   #ifdef HOTPLUG_CPU from this file and replace them with __cpuinit{data}
>>   instead? That could increase size of modular builds, but would remain
>>   consistent with rest of kernel, and make the file #ifdef-clean ... ]

Well I dont have any strong preference. I agree with Mark that that #ifdef is
easy to read.

Rudolf

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2007-09-02 18:53 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-08-23  3:44 [PATCH] hwmon coretemp: Remove bogus __cpuinitdata etc cleanup Satyam Sharma
2007-08-24 21:22 ` Rudolf Marek
2007-09-02 15:41 ` Mark M. Hoffman
2007-09-02 18:34   ` Rudolf Marek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox