2014-07-10 13:53:54

by Jim Davis

[permalink] [raw]
Subject: randconfig build error with next-20140710, in sound/soc/rockchip/rockchip_i2s.c

Building with the attached random configuration file,

sound/soc/rockchip/rockchip_i2s.c:526:20: error: expected declaration specifiers
or ‘...’ before string constant
MODULE_DESCRIPTION("ROCKCHIP IIS ASoC Interface");
^
sound/soc/rockchip/rockchip_i2s.c:527:15: error: expected declaration specifiers
or ‘...’ before string constant
MODULE_AUTHOR("jianqun <[email protected]>");
^
sound/soc/rockchip/rockchip_i2s.c:528:16: error: expected declaration specifiers
or ‘...’ before string constant
MODULE_LICENSE("GPL v2");
^
sound/soc/rockchip/rockchip_i2s.c:529:14: error: expected declaration specifiers
or ‘...’ before string constant
MODULE_ALIAS("platform:" DRV_NAME);
^
sound/soc/rockchip/rockchip_i2s.c:530:1: warning: data definition has no type or
storage class [enabled by default]
MODULE_DEVICE_TABLE(of, rockchip_i2s_match);
^
sound/soc/rockchip/rockchip_i2s.c:530:1: error: type defaults to ‘int’
in declaration of ‘MODULE_DEVICE_TABLE’ [-Werror=implicit-int]
sound/soc/rockchip/rockchip_i2s.c:530:1: warning: parameter names (without types
) in function declaration [enabled by default]
cc1: some warnings being treated as errors
make[3]: *** [sound/soc/rockchip/rockchip_i2s.o] Error 1


Attachments:
randconfig-1404996676.txt (68.76 kB)

2014-07-11 00:07:30

by Jianqun

[permalink] [raw]
Subject: Re: randconfig build error with next-20140710, in sound/soc/rockchip/rockchip_i2s.c

Hi Heiko:

Is it caused by the headfile ?
#include <linux/module.h>

Adviced by the maintainers, I tried not to include the headfile one by one, then to compile
driver each time, I found that is success to compile it without module.h, of course
I just compiled driver with command "ARCH=arm".

Look up the codes, I found the functions like
MODULE_DESCRIPTION
will be defined as
#define MODULE_DESCRIPTION(x) /* x */
so the code in rockchip iis driver
"MODULE_DESCRIPTION("ROCKCHIP IIS ASoC Interface") "
will be defined as
"ROCKCHIP IIS ASoC Interface"
that should cause the error while robot to compile.

Am I right ?

If it is, do I need to make a new patch or just reply to the mail ? or how ...


On 2014年07月10日 21:53, Jim Davis wrote:
> Building with the attached random configuration file,
>
> sound/soc/rockchip/rockchip_i2s.c:526:20: error: expected declaration specifiers
> or ‘...’ before string constant
> MODULE_DESCRIPTION("ROCKCHIP IIS ASoC Interface");
> ^
> sound/soc/rockchip/rockchip_i2s.c:527:15: error: expected declaration specifiers
> or ‘...’ before string constant
> MODULE_AUTHOR("jianqun <[email protected]>");
> ^
> sound/soc/rockchip/rockchip_i2s.c:528:16: error: expected declaration specifiers
> or ‘...’ before string constant
> MODULE_LICENSE("GPL v2");
> ^
> sound/soc/rockchip/rockchip_i2s.c:529:14: error: expected declaration specifiers
> or ‘...’ before string constant
> MODULE_ALIAS("platform:" DRV_NAME);
> ^
> sound/soc/rockchip/rockchip_i2s.c:530:1: warning: data definition has no type or
> storage class [enabled by default]
> MODULE_DEVICE_TABLE(of, rockchip_i2s_match);
> ^
> sound/soc/rockchip/rockchip_i2s.c:530:1: error: type defaults to ‘int’
> in declaration of ‘MODULE_DEVICE_TABLE’ [-Werror=implicit-int]
> sound/soc/rockchip/rockchip_i2s.c:530:1: warning: parameter names (without types
> ) in function declaration [enabled by default]
> cc1: some warnings being treated as errors
> make[3]: *** [sound/soc/rockchip/rockchip_i2s.o] Error 1
>

--
-------------
许 剑 群 Jay
Rockchip Electronics Co.Ltd
****************************************************************************
*IMPORTANT NOTICE:*This email is from Fuzhou Rockchip Electronics Co.,
Ltd .The contents of this email and any attachments may contain
information that is privileged, confidential and/or exempt from
disclosure under applicable law and relevant NDA. If you are not the
intended recipient, you are hereby notified that any disclosure,
copying, distribution, or use of the information is STRICTLY PROHIBITED.
Please immediately contact the sender as soon as possible and destroy
the material in its entirety in any format. Thank you.
****************************************************************************

2014-07-11 00:13:19

by Jianqun

[permalink] [raw]
Subject: Re: randconfig build error with next-20140710, in sound/soc/rockchip/rockchip_i2s.c

Dear Heiko:

FYI

On 2014年07月11日 08:07, Jianqun wrote:
> Hi Heiko:
>
> Is it caused by the headfile ?
> #include <linux/module.h>
>
> Adviced by the maintainers, I tried not to include the headfile one by one, then to compile
> driver each time, I found that is success to compile it without module.h, of course
> I just compiled driver with command "ARCH=arm".
>
> Look up the codes, I found the functions like
> MODULE_DESCRIPTION
> will be defined as
> #define MODULE_DESCRIPTION(x) /* x */
> so the code in rockchip iis driver
> "MODULE_DESCRIPTION("ROCKCHIP IIS ASoC Interface") "
> will be defined as
> "ROCKCHIP IIS ASoC Interface"
> that should cause the error while robot to compile.
>
> Am I right ?
>
> If it is, do I need to make a new patch or just reply to the mail ? or how ...
>
>
> On 2014年07月10日 21:53, Jim Davis wrote:
>> Building with the attached random configuration file,
>>
>> sound/soc/rockchip/rockchip_i2s.c:526:20: error: expected declaration specifiers
>> or ‘...’ before string constant
>> MODULE_DESCRIPTION("ROCKCHIP IIS ASoC Interface");
>> ^
>> sound/soc/rockchip/rockchip_i2s.c:527:15: error: expected declaration specifiers
>> or ‘...’ before string constant
>> MODULE_AUTHOR("jianqun <[email protected]>");
>> ^
>> sound/soc/rockchip/rockchip_i2s.c:528:16: error: expected declaration specifiers
>> or ‘...’ before string constant
>> MODULE_LICENSE("GPL v2");
>> ^
>> sound/soc/rockchip/rockchip_i2s.c:529:14: error: expected declaration specifiers
>> or ‘...’ before string constant
>> MODULE_ALIAS("platform:" DRV_NAME);
>> ^
>> sound/soc/rockchip/rockchip_i2s.c:530:1: warning: data definition has no type or
>> storage class [enabled by default]
>> MODULE_DEVICE_TABLE(of, rockchip_i2s_match);
>> ^
>> sound/soc/rockchip/rockchip_i2s.c:530:1: error: type defaults to ‘int’
>> in declaration of ‘MODULE_DEVICE_TABLE’ [-Werror=implicit-int]
>> sound/soc/rockchip/rockchip_i2s.c:530:1: warning: parameter names (without types
>> ) in function declaration [enabled by default]
>> cc1: some warnings being treated as errors
>> make[3]: *** [sound/soc/rockchip/rockchip_i2s.o] Error 1
>>
>

--
-------------
许 剑 群 Jay
Rockchip Electronics Co.Ltd
****************************************************************************
*IMPORTANT NOTICE:*This email is from Fuzhou Rockchip Electronics Co.,
Ltd .The contents of this email and any attachments may contain
information that is privileged, confidential and/or exempt from
disclosure under applicable law and relevant NDA. If you are not the
intended recipient, you are hereby notified that any disclosure,
copying, distribution, or use of the information is STRICTLY PROHIBITED.
Please immediately contact the sender as soon as possible and destroy
the material in its entirety in any format. Thank you.
****************************************************************************

2014-07-11 00:32:31

by Stephen Rothwell

[permalink] [raw]
Subject: Re: randconfig build error with next-20140710, in sound/soc/rockchip/rockchip_i2s.c

Hi Jianqun,

On Fri, 11 Jul 2014 08:07:20 +0800 Jianqun <[email protected]> wrote:
>
> Is it caused by the headfile ?
> #include <linux/module.h>
>
> Adviced by the maintainers, I tried not to include the headfile one by one, then to compile
> driver each time, I found that is success to compile it without module.h, of course

Who ever gave you that advice is wrong. You should always (except in
very rare circumstances) include every header file that your code
references things from. We have over 20 architectures and many, many
possible configurations in the kernel build system and the fact that a
file builds for one is not guarantee that it will build for another
combination if you depend on implicit includes.

See Rule 1 in Documentation/SubmitChecklist.

> I just compiled driver with command "ARCH=arm".

Which just proves my point.

--
Cheers,
Stephen Rothwell [email protected]


Attachments:
signature.asc (819.00 B)

2014-07-11 13:04:10

by Mark Brown

[permalink] [raw]
Subject: Re: randconfig build error with next-20140710, in sound/soc/rockchip/rockchip_i2s.c

On Fri, Jul 11, 2014 at 10:32:21AM +1000, Stephen Rothwell wrote:

> Who ever gave you that advice is wrong. You should always (except in
> very rare circumstances) include every header file that your code
> references things from. We have over 20 architectures and many, many
> possible configurations in the kernel build system and the fact that a
> file builds for one is not guarantee that it will build for another
> combination if you depend on implicit includes.

Right, I suspect this is coming from the header minimisation efforts :/


Attachments:
(No filename) (545.00 B)
signature.asc (836.00 B)
Digital signature
Download all attachments