From: khali@linux-fr.org (Jean Delvare)
To: Ralf Baechle <ralf@linux-mips.org>
Cc: Andrew Morton <akpm@osdl.org>,
linux-kernel@vger.kernel.org, lm-sensors@lm-sensors.org
Subject: [lm-sensors] [PATCH] Make lm70_remove a __devexit function
Date: Sun, 17 Dec 2006 19:16:12 +0000 [thread overview]
Message-ID: <20061217201612.1c7ba106.khali@linux-fr.org> (raw)
In-Reply-To: <20061210192151.GA32262@linux-mips.org>
Hi Ralf,
On Sun, 10 Dec 2006 19:21:51 +0000, Ralf Baechle wrote:
> Saves a few bytes on the module.
>
> Signed-off-by: Ralf Baechle <ralf at linux-mips.org>
>
> diff --git a/drivers/hwmon/lm70.c b/drivers/hwmon/lm70.c
> index 6ba8473..7eaae38 100644
> --- a/drivers/hwmon/lm70.c
> +++ b/drivers/hwmon/lm70.c
> @@ -126,7 +126,7 @@ out_dev_reg_failed:
> return status;
> }
>
> -static int __exit lm70_remove(struct spi_device *spi)
> +static int __devexit lm70_remove(struct spi_device *spi)
> {
> struct lm70 *p_lm70 = dev_get_drvdata(&spi->dev);
>
You're not actually saving memory with this change, as __devexit is
resolved to either __exit (i.e. nothing changes) or nothing (i.e. the
code is now always compiled in.) This is a bugfix though as currently
the code may be striped away while the driver still holds a pointer to
it.
Good catch, applied (with a different header comment), thanks.
--
Jean Delvare
WARNING: multiple messages have this Message-ID (diff)
From: Jean Delvare <khali@linux-fr.org>
To: Ralf Baechle <ralf@linux-mips.org>
Cc: Andrew Morton <akpm@osdl.org>,
linux-kernel@vger.kernel.org, lm-sensors@lm-sensors.org
Subject: Re: [lm-sensors] [PATCH] Make lm70_remove a __devexit function
Date: Sun, 17 Dec 2006 20:16:12 +0100 [thread overview]
Message-ID: <20061217201612.1c7ba106.khali@linux-fr.org> (raw)
In-Reply-To: <20061210192151.GA32262@linux-mips.org>
Hi Ralf,
On Sun, 10 Dec 2006 19:21:51 +0000, Ralf Baechle wrote:
> Saves a few bytes on the module.
>
> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
>
> diff --git a/drivers/hwmon/lm70.c b/drivers/hwmon/lm70.c
> index 6ba8473..7eaae38 100644
> --- a/drivers/hwmon/lm70.c
> +++ b/drivers/hwmon/lm70.c
> @@ -126,7 +126,7 @@ out_dev_reg_failed:
> return status;
> }
>
> -static int __exit lm70_remove(struct spi_device *spi)
> +static int __devexit lm70_remove(struct spi_device *spi)
> {
> struct lm70 *p_lm70 = dev_get_drvdata(&spi->dev);
>
You're not actually saving memory with this change, as __devexit is
resolved to either __exit (i.e. nothing changes) or nothing (i.e. the
code is now always compiled in.) This is a bugfix though as currently
the code may be striped away while the driver still holds a pointer to
it.
Good catch, applied (with a different header comment), thanks.
--
Jean Delvare
next prev parent reply other threads:[~2006-12-17 19:16 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-12-10 19:21 [lm-sensors] [PATCH] Make lm70_remove a __devexit function Ralf Baechle
2006-12-10 19:21 ` Ralf Baechle
2006-12-17 19:16 ` Jean Delvare [this message]
2006-12-17 19:16 ` [lm-sensors] " Jean Delvare
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20061217201612.1c7ba106.khali@linux-fr.org \
--to=khali@linux-fr.org \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lm-sensors@lm-sensors.org \
--cc=ralf@linux-mips.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.