* Re: [PATCH] Staging: vme: vme.c: fixed an EXPORT_SYMBOL warning
2010-05-25 14:19 ` Martyn Welch
@ 2010-05-25 14:58 ` Greg KH
2010-05-25 15:06 ` Nanakos Chrysostomos
2010-05-25 15:24 ` Martyn Welch
2 siblings, 0 replies; 6+ messages in thread
From: Greg KH @ 2010-05-25 14:58 UTC (permalink / raw)
To: Martyn Welch; +Cc: nanakos, wfp5p, devel, linux-kernel
On Tue, May 25, 2010 at 03:19:32PM +0100, Martyn Welch wrote:
> Greg KH wrote:
> > On Tue, May 25, 2010 at 01:09:17PM +0000, nanakos@wired-net.gr wrote:
> >
> >> From: Nanakos Chrysostomos <nanakos@wired-net.gr>
> >>
> >> Fixed an EXPORT_SYMBOL warning.
> >>
> >
> > What type of warning? a checkpatch.pl one? a gcc one? a sparse one?
> >
> > Please be more verbose.
> >
> >
> >> Signed-off-by: Nanakos Chrysostomos <nanakos@wired-net.gr>
> >> ---
> >> drivers/staging/vme/vme.c | 2 +-
> >> 1 files changed, 1 insertions(+), 1 deletions(-)
> >>
> >> diff --git a/drivers/staging/vme/vme.c b/drivers/staging/vme/vme.c
> >> index 093fbff..a0b63d5 100644
> >> --- a/drivers/staging/vme/vme.c
> >> +++ b/drivers/staging/vme/vme.c
> >> @@ -1519,7 +1519,6 @@ struct bus_type vme_bus_type = {
> >> .probe = vme_bus_probe,
> >> .remove = vme_bus_remove,
> >> };
> >> -EXPORT_SYMBOL(vme_bus_type);
> >>
> >> static int __init vme_init(void)
> >> {
> >> @@ -1530,6 +1529,7 @@ static void __exit vme_exit(void)
> >> {
> >> bus_unregister(&vme_bus_type);
> >> }
> >> +EXPORT_SYMBOL(vme_bus_type);
> >>
> >
> > This does not look correct, why move this away from where the structure
> > is defined?
> >
> >
>
> It's a checkpatch error:
>
> $ scripts/checkpatch.pl -f drivers/staging/vme/vme.c
> WARNING: EXPORT_SYMBOL(foo); should immediately follow its function/variable
> #1522: FILE: staging/vme/vme.c:1522:
> +EXPORT_SYMBOL(vme_bus_type);
We should fix checkpatch.pl, as this looks like a bug in it, not the
source code here.
thanks,
greg k-h
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [PATCH] Staging: vme: vme.c: fixed an EXPORT_SYMBOL warning
2010-05-25 14:19 ` Martyn Welch
2010-05-25 14:58 ` Greg KH
@ 2010-05-25 15:06 ` Nanakos Chrysostomos
2010-05-25 15:24 ` Martyn Welch
2 siblings, 0 replies; 6+ messages in thread
From: Nanakos Chrysostomos @ 2010-05-25 15:06 UTC (permalink / raw)
To: Martyn Welch; +Cc: Greg KH, wfp5p, devel, linux-kernel
On 25/5/2010 17:19, Martyn Welch wrote:
> Greg KH wrote:
>
>> On Tue, May 25, 2010 at 01:09:17PM +0000, nanakos@wired-net.gr wrote:
>>
>>
>>> From: Nanakos Chrysostomos <nanakos@wired-net.gr>
>>>
>>> Fixed an EXPORT_SYMBOL warning.
>>>
>>>
>> What type of warning? a checkpatch.pl one? a gcc one? a sparse one?
>>
>> Please be more verbose.
>>
>>
>>
>>> Signed-off-by: Nanakos Chrysostomos <nanakos@wired-net.gr>
>>> ---
>>> drivers/staging/vme/vme.c | 2 +-
>>> 1 files changed, 1 insertions(+), 1 deletions(-)
>>>
>>> diff --git a/drivers/staging/vme/vme.c b/drivers/staging/vme/vme.c
>>> index 093fbff..a0b63d5 100644
>>> --- a/drivers/staging/vme/vme.c
>>> +++ b/drivers/staging/vme/vme.c
>>> @@ -1519,7 +1519,6 @@ struct bus_type vme_bus_type = {
>>> .probe = vme_bus_probe,
>>> .remove = vme_bus_remove,
>>> };
>>> -EXPORT_SYMBOL(vme_bus_type);
>>>
>>> static int __init vme_init(void)
>>> {
>>> @@ -1530,6 +1529,7 @@ static void __exit vme_exit(void)
>>> {
>>> bus_unregister(&vme_bus_type);
>>> }
>>> +EXPORT_SYMBOL(vme_bus_type);
>>>
>>>
>> This does not look correct, why move this away from where the structure
>> is defined?
>>
>>
>>
> It's a checkpatch error:
>
> $ scripts/checkpatch.pl -f drivers/staging/vme/vme.c
> WARNING: EXPORT_SYMBOL(foo); should immediately follow its function/variable
> #1522: FILE: staging/vme/vme.c:1522:
> +EXPORT_SYMBOL(vme_bus_type);
>
> total: 0 errors, 1 warnings, 1539 lines checked
>
>
>
>> confused,
>>
>>
> Yup, confused me as well. :-)
>
> Martyn
>
>
>> greg k-h
>>
>>
>
>
Yes you are right, this is a checkpatch error as well.
Thanks for your time looking the patches.
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [PATCH] Staging: vme: vme.c: fixed an EXPORT_SYMBOL warning
2010-05-25 14:19 ` Martyn Welch
2010-05-25 14:58 ` Greg KH
2010-05-25 15:06 ` Nanakos Chrysostomos
@ 2010-05-25 15:24 ` Martyn Welch
2 siblings, 0 replies; 6+ messages in thread
From: Martyn Welch @ 2010-05-25 15:24 UTC (permalink / raw)
To: Andy Whitcroft; +Cc: Greg KH, devel, nanakos, linux-kernel
Martyn Welch wrote:
> Greg KH wrote:
>
>> On Tue, May 25, 2010 at 01:09:17PM +0000, nanakos@wired-net.gr wrote:
>>
>>
>>> From: Nanakos Chrysostomos <nanakos@wired-net.gr>
>>>
>>> Fixed an EXPORT_SYMBOL warning.
>>>
>>>
>> What type of warning? a checkpatch.pl one? a gcc one? a sparse one?
>>
>> Please be more verbose.
>>
>>
>>
>>> Signed-off-by: Nanakos Chrysostomos <nanakos@wired-net.gr>
>>> ---
>>> drivers/staging/vme/vme.c | 2 +-
>>> 1 files changed, 1 insertions(+), 1 deletions(-)
>>>
>>> diff --git a/drivers/staging/vme/vme.c b/drivers/staging/vme/vme.c
>>> index 093fbff..a0b63d5 100644
>>> --- a/drivers/staging/vme/vme.c
>>> +++ b/drivers/staging/vme/vme.c
>>> @@ -1519,7 +1519,6 @@ struct bus_type vme_bus_type = {
>>> .probe = vme_bus_probe,
>>> .remove = vme_bus_remove,
>>> };
>>> -EXPORT_SYMBOL(vme_bus_type);
>>>
>>> static int __init vme_init(void)
>>> {
>>> @@ -1530,6 +1529,7 @@ static void __exit vme_exit(void)
>>> {
>>> bus_unregister(&vme_bus_type);
>>> }
>>> +EXPORT_SYMBOL(vme_bus_type);
>>>
>>>
>> This does not look correct, why move this away from where the structure
>> is defined?
>>
>>
>>
>
> It's a checkpatch error:
>
> $ scripts/checkpatch.pl -f drivers/staging/vme/vme.c
> WARNING: EXPORT_SYMBOL(foo); should immediately follow its function/variable
> #1522: FILE: staging/vme/vme.c:1522:
> +EXPORT_SYMBOL(vme_bus_type);
>
> total: 0 errors, 1 warnings, 1539 lines checked
>
>
Andy, this looks like a miss detection in checkpatch.pl to me, and from
Greg's comment I get the impression he thinks the same. What do you think?
Martyn
>> confused,
>>
>>
>
> Yup, confused me as well. :-)
>
> Martyn
>
>
>> greg k-h
>>
>>
>
>
>
--
Martyn Welch (Principal Software Engineer) | Registered in England and
GE Intelligent Platforms | Wales (3828642) at 100
T +44(0)127322748 | Barbirolli Square, Manchester,
E martyn.welch@ge.com | M2 3AB VAT:GB 927559189
^ permalink raw reply [flat|nested] 6+ messages in thread