Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1253892 > unrolled thread
| Started by | Arnd Bergmann <arnd@arndb.de> |
|---|---|
| First post | 2015-10-22 17:00 +0200 |
| Last post | 2015-10-22 18:20 +0200 |
| Articles | 3 — 3 participants |
Back to article view | Back to linux.kernel
[PATCH] pstore: remove __exit annotation for ramoops_remove Arnd Bergmann <arnd@arndb.de> - 2015-10-22 17:00 +0200
RE: [PATCH] pstore: remove __exit annotation for ramoops_remove "Luck, Tony" <tony.luck@intel.com> - 2015-10-22 18:10 +0200
Re: [PATCH] pstore: remove __exit annotation for ramoops_remove Geliang Tang <geliangtang@163.com> - 2015-10-22 18:20 +0200
| From | Arnd Bergmann <arnd@arndb.de> |
|---|---|
| Date | 2015-10-22 17:00 +0200 |
| Subject | [PATCH] pstore: remove __exit annotation for ramoops_remove |
| Message-ID | <qmpvs-5FV-15@gated-at.bofh.it> |
The remove function of a device driver should not be marked
__exit, because that section gets discarded for built-in drivers,
and it is still possible to manually unbind a driver from a
device, which would result in a runtime error.
The kernel also produces a link error for this when the module
is built-in:
`ramoops_remove' referenced in section `.data' of fs/built-in.o: defined in discarded section `.exit.text' of fs/built-in.o
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Fixes: 2adb611ef932 ("pstore: add pstore unregister")
diff --git a/fs/pstore/ram.c b/fs/pstore/ram.c
index 68889a727bc7..319c3a60cfa5 100644
--- a/fs/pstore/ram.c
+++ b/fs/pstore/ram.c
@@ -578,7 +578,7 @@ fail_out:
return err;
}
-static int __exit ramoops_remove(struct platform_device *pdev)
+static int ramoops_remove(struct platform_device *pdev)
{
struct ramoops_context *cxt = &oops_cxt;
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [next] | [standalone]
| From | "Luck, Tony" <tony.luck@intel.com> |
|---|---|
| Date | 2015-10-22 18:10 +0200 |
| Message-ID | <qmqBd-7uM-35@gated-at.bofh.it> |
| In reply to | #1253892 |
-static int __exit ramoops_remove(struct platform_device *pdev) +static int ramoops_remove(struct platform_device *pdev) Arnd, Thanks. I folded that fix into the commit that made the error and rebased (I don't believe anyone is foolish enough to base work on my "next" branch) -Tony -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Geliang Tang <geliangtang@163.com> |
|---|---|
| Date | 2015-10-22 18:20 +0200 |
| Message-ID | <qmqKS-7G4-19@gated-at.bofh.it> |
| In reply to | #1253892 |
On Thu, Oct 22, 2015 at 04:52:33PM +0200, Arnd Bergmann wrote:
> The remove function of a device driver should not be marked
> __exit, because that section gets discarded for built-in drivers,
> and it is still possible to manually unbind a driver from a
> device, which would result in a runtime error.
>
> The kernel also produces a link error for this when the module
> is built-in:
>
> `ramoops_remove' referenced in section `.data' of fs/built-in.o: defined in discarded section `.exit.text' of fs/built-in.o
I can't see why it wasn't reported as an error on my machine.
But I think you are right. __exit should't be there.
Acked-by: Geliang Tang <geliangtang@163.com>
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> Fixes: 2adb611ef932 ("pstore: add pstore unregister")
>
> diff --git a/fs/pstore/ram.c b/fs/pstore/ram.c
> index 68889a727bc7..319c3a60cfa5 100644
> --- a/fs/pstore/ram.c
> +++ b/fs/pstore/ram.c
> @@ -578,7 +578,7 @@ fail_out:
> return err;
> }
>
> -static int __exit ramoops_remove(struct platform_device *pdev)
> +static int ramoops_remove(struct platform_device *pdev)
> {
> struct ramoops_context *cxt = &oops_cxt;
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web