* [PATCH 1/1 linux-next] PNP: move EXPORT_SYMBOL after functions
@ 2015-05-02 16:01 Fabian Frederick
2015-05-04 21:30 ` Rafael J. Wysocki
0 siblings, 1 reply; 3+ messages in thread
From: Fabian Frederick @ 2015-05-02 16:01 UTC (permalink / raw)
To: linux-kernel; +Cc: Fabian Frederick, Rafael J. Wysocki
EXPORT macro must be placed directly after functions.
See Documentation/CodingStyle Chapter 6
Signed-off-by: Fabian Frederick <fabf@skynet.be>
---
drivers/pnp/driver.c | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/drivers/pnp/driver.c b/drivers/pnp/driver.c
index 153a493..b690e6b 100644
--- a/drivers/pnp/driver.c
+++ b/drivers/pnp/driver.c
@@ -67,6 +67,7 @@ int pnp_device_attach(struct pnp_dev *pnp_dev)
mutex_unlock(&pnp_lock);
return 0;
}
+EXPORT_SYMBOL(pnp_device_attach);
void pnp_device_detach(struct pnp_dev *pnp_dev)
{
@@ -76,6 +77,7 @@ void pnp_device_detach(struct pnp_dev *pnp_dev)
mutex_unlock(&pnp_lock);
pnp_disable_dev(pnp_dev);
}
+EXPORT_SYMBOL(pnp_device_detach);
static int pnp_device_probe(struct device *dev)
{
@@ -266,11 +268,13 @@ int pnp_register_driver(struct pnp_driver *drv)
return driver_register(&drv->driver);
}
+EXPORT_SYMBOL(pnp_register_driver);
void pnp_unregister_driver(struct pnp_driver *drv)
{
driver_unregister(&drv->driver);
}
+EXPORT_SYMBOL(pnp_unregister_driver);
/**
* pnp_add_id - adds an EISA id to the specified device
@@ -305,8 +309,3 @@ struct pnp_id *pnp_add_id(struct pnp_dev *dev, const char *id)
return dev_id;
}
-
-EXPORT_SYMBOL(pnp_register_driver);
-EXPORT_SYMBOL(pnp_unregister_driver);
-EXPORT_SYMBOL(pnp_device_attach);
-EXPORT_SYMBOL(pnp_device_detach);
--
1.9.1
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH 1/1 linux-next] PNP: move EXPORT_SYMBOL after functions
2015-05-02 16:01 [PATCH 1/1 linux-next] PNP: move EXPORT_SYMBOL after functions Fabian Frederick
@ 2015-05-04 21:30 ` Rafael J. Wysocki
2015-05-05 17:39 ` Fabian Frederick
0 siblings, 1 reply; 3+ messages in thread
From: Rafael J. Wysocki @ 2015-05-04 21:30 UTC (permalink / raw)
To: Fabian Frederick; +Cc: linux-kernel, Rafael J. Wysocki
On Saturday, May 02, 2015 06:01:21 PM Fabian Frederick wrote:
> EXPORT macro must be placed directly after functions.
> See Documentation/CodingStyle Chapter 6
Well, why is this change an improvement?
Yes, it makes an old file follow the new(er) Documentation/CodingStyl,
but what exactly is the benefit?
Mind you, there are more files with EXPORT_SYMBOL(_GPL) at the end.
Are you going to hunt for them now or something?
--
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH 1/1 linux-next] PNP: move EXPORT_SYMBOL after functions
2015-05-04 21:30 ` Rafael J. Wysocki
@ 2015-05-05 17:39 ` Fabian Frederick
0 siblings, 0 replies; 3+ messages in thread
From: Fabian Frederick @ 2015-05-05 17:39 UTC (permalink / raw)
To: Rafael J. Wysocki; +Cc: Rafael J. Wysocki, linux-kernel
> On 04 May 2015 at 23:30 "Rafael J. Wysocki" <rjw@rjwysocki.net> wrote:
>
>
> On Saturday, May 02, 2015 06:01:21 PM Fabian Frederick wrote:
> > EXPORT macro must be placed directly after functions.
> > See Documentation/CodingStyle Chapter 6
>
> Well, why is this change an improvement?
>
> Yes, it makes an old file follow the new(er) Documentation/CodingStyl,
> but what exactly is the benefit?
>
> Mind you, there are more files with EXPORT_SYMBOL(_GPL) at the end.
> Are you going to hunt for them now or something?
Hi Rafael,
AFAIK it just brings more readability. I sent you this one while fixing
warnings in 2 PNPACPI patches but of course you can ignore it :)
Fortunately, I don't plan to send a patch for each EXPORT_SYMBOL(_GPL) "problem"
:)
Regards,
Fabian
>
>
> --
> I speak only for myself.
> Rafael J. Wysocki, Intel Open Source Technology Center.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-05-05 17:39 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-05-02 16:01 [PATCH 1/1 linux-next] PNP: move EXPORT_SYMBOL after functions Fabian Frederick
2015-05-04 21:30 ` Rafael J. Wysocki
2015-05-05 17:39 ` Fabian Frederick
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®