* Re: [PATCH -next] bcma: needs export.h
2011-09-20 18:45 ` Rafał Miłecki
@ 2011-09-20 20:43 ` Randy Dunlap
2011-09-20 20:51 ` [PATCH -next v2] bcma: driver_chipcommon_pmu.c needs linux/export.h Randy Dunlap
2011-09-20 22:40 ` [PATCH -next] bcma: needs export.h Andrew Morton
2 siblings, 0 replies; 12+ messages in thread
From: Randy Dunlap @ 2011-09-20 20:43 UTC (permalink / raw)
To: Rafał Miłecki
Cc: Andrew Morton, Stephen Rothwell, linux-next, LKML,
linux-wireless@vger.kernel.org
On 09/20/2011 11:45 AM, Rafał Miłecki wrote:
> 2011/9/20 Randy Dunlap <rdunlap@xenotime.net>:
>> From: Randy Dunlap <rdunlap@xenotime.net>
>>
>> bcma/driver_chipcommon_pmu.c needs to include <linux/export.h>,
>> so add it to the headers that are included by bcma_private.h.
>
> Please take a look at discussion in:
> [PATCH -next] bcma: main.c needs to include <linux/slab.h>
> thread (by Andrew).
>
> I believe that according to the discussion, such a includes should be
> done in .c files.
>
> Andrew: can you comment? Am I right?
Sure, I'll resubmit the patch.
Is there already a patch to remove <linux/delay.h> from bcma_private.h ?
bcma_private.h uses __init & __exit, so it should #include <linux/init.h> ...
--
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***
^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH -next v2] bcma: driver_chipcommon_pmu.c needs linux/export.h
2011-09-20 18:45 ` Rafał Miłecki
2011-09-20 20:43 ` Randy Dunlap
@ 2011-09-20 20:51 ` Randy Dunlap
2011-09-20 21:11 ` Stephen Rothwell
2011-09-21 6:45 ` Rafał Miłecki
2011-09-20 22:40 ` [PATCH -next] bcma: needs export.h Andrew Morton
2 siblings, 2 replies; 12+ messages in thread
From: Randy Dunlap @ 2011-09-20 20:51 UTC (permalink / raw)
To: Rafał Miłecki
Cc: Andrew Morton, Stephen Rothwell, linux-next, LKML,
linux-wireless@vger.kernel.org
From: Randy Dunlap <rdunlap@xenotime.net>
bcma/driver_chipcommon_pmu.c needs to include <linux/export.h>
to fix these warnings:
drivers/bcma/driver_chipcommon_pmu.c:27:1: warning: data definition has no type or storage class
drivers/bcma/driver_chipcommon_pmu.c:27:1: warning: type defaults to 'int' in declaration of 'EXPORT_SYMBOL_GPL'
drivers/bcma/driver_chipcommon_pmu.c:27:1: warning: parameter names (without types) in function declaration
drivers/bcma/driver_chipcommon_pmu.c:36:1: warning: data definition has no type or storage class
drivers/bcma/driver_chipcommon_pmu.c:36:1: warning: type defaults to 'int' in declaration of 'EXPORT_SYMBOL_GPL'
drivers/bcma/driver_chipcommon_pmu.c:36:1: warning: parameter names (without types) in function declaration
drivers/bcma/driver_chipcommon_pmu.c:45:1: warning: data definition has no type or storage class
drivers/bcma/driver_chipcommon_pmu.c:45:1: warning: type defaults to 'int' in declaration of 'EXPORT_SYMBOL_GPL'
drivers/bcma/driver_chipcommon_pmu.c:45:1: warning: parameter names (without types) in function declaration
drivers/bcma/driver_chipcommon_pmu.c:54:1: warning: data definition has no type or storage class
drivers/bcma/driver_chipcommon_pmu.c:54:1: warning: type defaults to 'int' in declaration of 'EXPORT_SYMBOL_GPL'
drivers/bcma/driver_chipcommon_pmu.c:54:1: warning: parameter names (without types) in function declaration
Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
---
drivers/bcma/driver_chipcommon_pmu.c | 1 +
1 file changed, 1 insertion(+)
--- next-2011-0920.orig/drivers/bcma/driver_chipcommon_pmu.c
+++ next-2011-0920/drivers/bcma/driver_chipcommon_pmu.c
@@ -9,6 +9,7 @@
*/
#include "bcma_private.h"
+#include <linux/export.h>
#include <linux/bcma/bcma.h>
static u32 bcma_chipco_pll_read(struct bcma_drv_cc *cc, u32 offset)
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH -next v2] bcma: driver_chipcommon_pmu.c needs linux/export.h
2011-09-20 20:51 ` [PATCH -next v2] bcma: driver_chipcommon_pmu.c needs linux/export.h Randy Dunlap
@ 2011-09-20 21:11 ` Stephen Rothwell
2011-09-21 6:45 ` Rafał Miłecki
1 sibling, 0 replies; 12+ messages in thread
From: Stephen Rothwell @ 2011-09-20 21:11 UTC (permalink / raw)
To: Randy Dunlap
Cc: Rafał Miłecki, Andrew Morton, linux-next, LKML,
linux-wireless@vger.kernel.org, Paul Gortmaker
[-- Attachment #1: Type: text/plain, Size: 1849 bytes --]
Hi Randy,
On Tue, 20 Sep 2011 13:51:39 -0700 Randy Dunlap <rdunlap@xenotime.net> wrote:
>
> From: Randy Dunlap <rdunlap@xenotime.net>
>
> bcma/driver_chipcommon_pmu.c needs to include <linux/export.h>
> to fix these warnings:
>
> drivers/bcma/driver_chipcommon_pmu.c:27:1: warning: data definition has no type or storage class
> drivers/bcma/driver_chipcommon_pmu.c:27:1: warning: type defaults to 'int' in declaration of 'EXPORT_SYMBOL_GPL'
> drivers/bcma/driver_chipcommon_pmu.c:27:1: warning: parameter names (without types) in function declaration
> drivers/bcma/driver_chipcommon_pmu.c:36:1: warning: data definition has no type or storage class
> drivers/bcma/driver_chipcommon_pmu.c:36:1: warning: type defaults to 'int' in declaration of 'EXPORT_SYMBOL_GPL'
> drivers/bcma/driver_chipcommon_pmu.c:36:1: warning: parameter names (without types) in function declaration
> drivers/bcma/driver_chipcommon_pmu.c:45:1: warning: data definition has no type or storage class
> drivers/bcma/driver_chipcommon_pmu.c:45:1: warning: type defaults to 'int' in declaration of 'EXPORT_SYMBOL_GPL'
> drivers/bcma/driver_chipcommon_pmu.c:45:1: warning: parameter names (without types) in function declaration
> drivers/bcma/driver_chipcommon_pmu.c:54:1: warning: data definition has no type or storage class
> drivers/bcma/driver_chipcommon_pmu.c:54:1: warning: type defaults to 'int' in declaration of 'EXPORT_SYMBOL_GPL'
> drivers/bcma/driver_chipcommon_pmu.c:54:1: warning: parameter names (without types) in function declaration
>
> Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
I have added this to my collection of merge fixups for the moduleh tree
(since linux/export.h doesn't exist in Linus' tree, yet).
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/
[-- Attachment #2: Type: application/pgp-signature, Size: 490 bytes --]
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH -next v2] bcma: driver_chipcommon_pmu.c needs linux/export.h
2011-09-20 20:51 ` [PATCH -next v2] bcma: driver_chipcommon_pmu.c needs linux/export.h Randy Dunlap
2011-09-20 21:11 ` Stephen Rothwell
@ 2011-09-21 6:45 ` Rafał Miłecki
2011-09-21 15:52 ` Randy Dunlap
1 sibling, 1 reply; 12+ messages in thread
From: Rafał Miłecki @ 2011-09-21 6:45 UTC (permalink / raw)
To: Randy Dunlap
Cc: Andrew Morton, Stephen Rothwell, linux-next, LKML,
linux-wireless@vger.kernel.org
W dniu 20 września 2011 22:51 użytkownik Randy Dunlap
<rdunlap@xenotime.net> napisał:
> From: Randy Dunlap <rdunlap@xenotime.net>
>
> bcma/driver_chipcommon_pmu.c needs to include <linux/export.h>
> to fix these warnings:
>
> drivers/bcma/driver_chipcommon_pmu.c:27:1: warning: data definition has no type or storage class
> drivers/bcma/driver_chipcommon_pmu.c:27:1: warning: type defaults to 'int' in declaration of 'EXPORT_SYMBOL_GPL'
> drivers/bcma/driver_chipcommon_pmu.c:27:1: warning: parameter names (without types) in function declaration
Don't you get the same warning for core.c? Weird...
--
Rafał
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH -next v2] bcma: driver_chipcommon_pmu.c needs linux/export.h
2011-09-21 6:45 ` Rafał Miłecki
@ 2011-09-21 15:52 ` Randy Dunlap
2011-09-21 18:00 ` Rafał Miłecki
0 siblings, 1 reply; 12+ messages in thread
From: Randy Dunlap @ 2011-09-21 15:52 UTC (permalink / raw)
To: Rafał Miłecki
Cc: Andrew Morton, Stephen Rothwell, linux-next, LKML,
linux-wireless@vger.kernel.org
On 09/20/2011 11:45 PM, Rafał Miłecki wrote:
> W dniu 20 września 2011 22:51 użytkownik Randy Dunlap
> <rdunlap@xenotime.net> napisał:
>> From: Randy Dunlap <rdunlap@xenotime.net>
>>
>> bcma/driver_chipcommon_pmu.c needs to include <linux/export.h>
>> to fix these warnings:
>>
>> drivers/bcma/driver_chipcommon_pmu.c:27:1: warning: data definition has no type or storage class
>> drivers/bcma/driver_chipcommon_pmu.c:27:1: warning: type defaults to 'int' in declaration of 'EXPORT_SYMBOL_GPL'
>> drivers/bcma/driver_chipcommon_pmu.c:27:1: warning: parameter names (without types) in function declaration
>
> Don't you get the same warning for core.c? Weird...
No, I don't. Stranger things have happened, I'm sure.
Feel free to add export.h to other files, or do you want me
to do that?
--
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH -next v2] bcma: driver_chipcommon_pmu.c needs linux/export.h
2011-09-21 15:52 ` Randy Dunlap
@ 2011-09-21 18:00 ` Rafał Miłecki
2011-09-21 21:07 ` [PATCH -next] bcma: main.c and driver_mips.c need linux/export.h Randy Dunlap
0 siblings, 1 reply; 12+ messages in thread
From: Rafał Miłecki @ 2011-09-21 18:00 UTC (permalink / raw)
To: Randy Dunlap
Cc: Andrew Morton, Stephen Rothwell, linux-next, LKML,
linux-wireless@vger.kernel.org
W dniu 21 września 2011 17:52 użytkownik Randy Dunlap
<rdunlap@xenotime.net> napisał:
> On 09/20/2011 11:45 PM, Rafał Miłecki wrote:
>> W dniu 20 września 2011 22:51 użytkownik Randy Dunlap
>> <rdunlap@xenotime.net> napisał:
>>> From: Randy Dunlap <rdunlap@xenotime.net>
>>>
>>> bcma/driver_chipcommon_pmu.c needs to include <linux/export.h>
>>> to fix these warnings:
>>>
>>> drivers/bcma/driver_chipcommon_pmu.c:27:1: warning: data definition has no type or storage class
>>> drivers/bcma/driver_chipcommon_pmu.c:27:1: warning: type defaults to 'int' in declaration of 'EXPORT_SYMBOL_GPL'
>>> drivers/bcma/driver_chipcommon_pmu.c:27:1: warning: parameter names (without types) in function declaration
>>
>> Don't you get the same warning for core.c? Weird...
>
> No, I don't. Stranger things have happened, I'm sure.
>
> Feel free to add export.h to other files, or do you want me
> to do that?
Please do that while you're hacking that include anyway.
--
Rafał
^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH -next] bcma: main.c and driver_mips.c need linux/export.h
2011-09-21 18:00 ` Rafał Miłecki
@ 2011-09-21 21:07 ` Randy Dunlap
2011-09-21 21:42 ` Larry Finger
0 siblings, 1 reply; 12+ messages in thread
From: Randy Dunlap @ 2011-09-21 21:07 UTC (permalink / raw)
To: Rafał Miłecki
Cc: Andrew Morton, Stephen Rothwell, linux-next, LKML,
linux-wireless@vger.kernel.org
From: Randy Dunlap <rdunlap@xenotime.net>
main.c and driver_mips.c use EXPORT_SYMBOL() etc.
so they should include <linux/export.h>.
Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
---
drivers/bcma/driver_mips.c | 1 +
drivers/bcma/main.c | 1 +
2 files changed, 2 insertions(+)
--- next-2011-0921.orig/drivers/bcma/driver_mips.c
+++ next-2011-0921/drivers/bcma/driver_mips.c
@@ -14,6 +14,7 @@
#include <linux/bcma/bcma.h>
+#include <linux/export.h>
#include <linux/serial.h>
#include <linux/serial_core.h>
#include <linux/serial_reg.h>
--- next-2011-0921.orig/drivers/bcma/main.c
+++ next-2011-0921/drivers/bcma/main.c
@@ -7,6 +7,7 @@
#include "bcma_private.h"
#include <linux/module.h>
+#include <linux/export.h>
#include <linux/bcma/bcma.h>
#include <linux/slab.h>
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH -next] bcma: main.c and driver_mips.c need linux/export.h
2011-09-21 21:07 ` [PATCH -next] bcma: main.c and driver_mips.c need linux/export.h Randy Dunlap
@ 2011-09-21 21:42 ` Larry Finger
2011-09-21 21:49 ` Randy Dunlap
0 siblings, 1 reply; 12+ messages in thread
From: Larry Finger @ 2011-09-21 21:42 UTC (permalink / raw)
To: Randy Dunlap
Cc: Rafał Miłecki, Andrew Morton, Stephen Rothwell,
linux-next, LKML, linux-wireless@vger.kernel.org
On 09/21/2011 04:07 PM, Randy Dunlap wrote:
> From: Randy Dunlap<rdunlap@xenotime.net>
>
> main.c and driver_mips.c use EXPORT_SYMBOL() etc.
> so they should include<linux/export.h>.
>
> Signed-off-by: Randy Dunlap<rdunlap@xenotime.net>
From this commit message, it appears that every routine that uses
EXPORT_SYMBOL() will need to include this header. I looked at modifying rtlwifi
and friends to include this header, but found that include/linux/export.h does
not exist in any of my source trees. From that I assume that the change will
happen in 3.2.
I have prepared a patch, but cannot use it at the moment. Is there somewhere
that I should send it?
Larry
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH -next] bcma: main.c and driver_mips.c need linux/export.h
2011-09-21 21:42 ` Larry Finger
@ 2011-09-21 21:49 ` Randy Dunlap
0 siblings, 0 replies; 12+ messages in thread
From: Randy Dunlap @ 2011-09-21 21:49 UTC (permalink / raw)
To: Larry Finger
Cc: Rafał Miłecki, Andrew Morton, Stephen Rothwell,
linux-next, LKML, linux-wireless@vger.kernel.org, Paul Gortmaker
On 09/21/2011 02:42 PM, Larry Finger wrote:
> On 09/21/2011 04:07 PM, Randy Dunlap wrote:
>> From: Randy Dunlap<rdunlap@xenotime.net>
>>
>> main.c and driver_mips.c use EXPORT_SYMBOL() etc.
>> so they should include<linux/export.h>.
>>
>> Signed-off-by: Randy Dunlap<rdunlap@xenotime.net>
>
> From this commit message, it appears that every routine that uses EXPORT_SYMBOL() will need to include this header. I looked at modifying rtlwifi and friends to include this header, but found that include/linux/export.h does not exist in any of my source trees. From that I assume that the change will happen in 3.2.
>
> I have prepared a patch, but cannot use it at the moment. Is there somewhere that I should send it?
Hi Larry,
linux/export.h is only in linux-next. I think that you should just prepare
a linux-next patch for rtlwifi and then push it after Paul Gortmaker's
module.h-split git tree has been merged (it splits module.h into module.h
and export.h), or maybe you could ask Paul to merge your patch into his tree.
[I added Paul to the cc: list.]
--
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH -next] bcma: needs export.h
2011-09-20 18:45 ` Rafał Miłecki
2011-09-20 20:43 ` Randy Dunlap
2011-09-20 20:51 ` [PATCH -next v2] bcma: driver_chipcommon_pmu.c needs linux/export.h Randy Dunlap
@ 2011-09-20 22:40 ` Andrew Morton
2 siblings, 0 replies; 12+ messages in thread
From: Andrew Morton @ 2011-09-20 22:40 UTC (permalink / raw)
To: Rafał Miłecki
Cc: Randy Dunlap, Stephen Rothwell, linux-next, LKML,
linux-wireless@vger.kernel.org
On Tue, 20 Sep 2011 20:45:57 +0200
Rafa__ Mi__ecki <zajec5@gmail.com> wrote:
> 2011/9/20 Randy Dunlap <rdunlap@xenotime.net>:
> > From: Randy Dunlap <rdunlap@xenotime.net>
> >
> > bcma/driver_chipcommon_pmu.c needs to include <linux/export.h>,
> > so add it to the headers that are included by bcma_private.h.
>
> Please take a look at discussion in:
> [PATCH -next] bcma: main.c needs to include <linux/slab.h>
> thread (by Andrew).
>
> I believe that according to the discussion, such a includes should be
> done in .c files.
>
> Andrew: can you comment? Am I right?
Ordinarily, yes, it is preferable to include the needed .h files from
within the .c files. However quite a mumber of kernel subsystems do
take the #include "everything.h" approach.
However, drivers/bcma is a bit odd in that it has bcma_private.h which
includes delay.h (the everything.h approach) but most .c files
explicitly include other things, including export.h.
There's no real pattern here and yes, I agree that the minimal and more
typical approach is better.
--- a/drivers/bcma/driver_chipcommon_pmu.c~bcma-needs-exporth
+++ a/drivers/bcma/driver_chipcommon_pmu.c
@@ -10,6 +10,7 @@
#include "bcma_private.h"
#include <linux/bcma/bcma.h>
+#include <linux/export.h>
static u32 bcma_chipco_pll_read(struct bcma_drv_cc *cc, u32 offset)
{
_
^ permalink raw reply [flat|nested] 12+ messages in thread