Re: module: Remove const attribute from alias for MODULE_DEVICE_TABLE

2017-08-28 Thread Stefan Agner
On 2017-08-28 10:41, Kees Cook wrote: > On Mon, Aug 28, 2017 at 10:38 AM, Nick Desaulniers > wrote: >> I think Kees' proposal is a better solution; rather than require all >> usage of device table to remember to add const, have the macro add it >> for all users.

Re: module: Remove const attribute from alias for MODULE_DEVICE_TABLE

2017-08-28 Thread Stefan Agner
On 2017-08-28 10:41, Kees Cook wrote: > On Mon, Aug 28, 2017 at 10:38 AM, Nick Desaulniers > wrote: >> I think Kees' proposal is a better solution; rather than require all >> usage of device table to remember to add const, have the macro add it >> for all users. Otherwise if you require caller's

Re: module: Remove const attribute from alias for MODULE_DEVICE_TABLE

2017-08-28 Thread Kees Cook
On Mon, Aug 28, 2017 at 10:38 AM, Nick Desaulniers wrote: > I think Kees' proposal is a better solution; rather than require all > usage of device table to remember to add const, have the macro add it > for all users. Otherwise if you require caller's to add it, they may

Re: module: Remove const attribute from alias for MODULE_DEVICE_TABLE

2017-08-28 Thread Kees Cook
On Mon, Aug 28, 2017 at 10:38 AM, Nick Desaulniers wrote: > I think Kees' proposal is a better solution; rather than require all > usage of device table to remember to add const, have the macro add it > for all users. Otherwise if you require caller's to add it, they may > forget. And with the

Re: module: Remove const attribute from alias for MODULE_DEVICE_TABLE

2017-08-28 Thread Nick Desaulniers
I think Kees' proposal is a better solution; rather than require all usage of device table to remember to add const, have the macro add it for all users. Otherwise if you require caller's to add it, they may forget. On Mon, Aug 28, 2017 at 10:20 AM, Kees Cook wrote: > On

Re: module: Remove const attribute from alias for MODULE_DEVICE_TABLE

2017-08-28 Thread Nick Desaulniers
I think Kees' proposal is a better solution; rather than require all usage of device table to remember to add const, have the macro add it for all users. Otherwise if you require caller's to add it, they may forget. On Mon, Aug 28, 2017 at 10:20 AM, Kees Cook wrote: > On Sun, Aug 27, 2017 at

Re: module: Remove const attribute from alias for MODULE_DEVICE_TABLE

2017-08-28 Thread Kees Cook
On Sun, Aug 27, 2017 at 4:52 PM, Stefan Agner wrote: > On 2017-07-24 18:27, Matthias Kaehlcke wrote: >> MODULE_DEVICE_TABLE(type, name) creates an alias of type 'extern const >> typeof(name)'. If 'name' is already constant the 'const' attribute is >> specified twice, which is not

Re: module: Remove const attribute from alias for MODULE_DEVICE_TABLE

2017-08-28 Thread Kees Cook
On Sun, Aug 27, 2017 at 4:52 PM, Stefan Agner wrote: > On 2017-07-24 18:27, Matthias Kaehlcke wrote: >> MODULE_DEVICE_TABLE(type, name) creates an alias of type 'extern const >> typeof(name)'. If 'name' is already constant the 'const' attribute is >> specified twice, which is not allowed in C89

Re: module: Remove const attribute from alias for MODULE_DEVICE_TABLE

2017-08-27 Thread Stefan Agner
On 2017-07-24 18:27, Matthias Kaehlcke wrote: > MODULE_DEVICE_TABLE(type, name) creates an alias of type 'extern const > typeof(name)'. If 'name' is already constant the 'const' attribute is > specified twice, which is not allowed in C89 (see discussion at > https://lkml.org/lkml/2017/5/23/1440).

Re: module: Remove const attribute from alias for MODULE_DEVICE_TABLE

2017-08-27 Thread Stefan Agner
On 2017-07-24 18:27, Matthias Kaehlcke wrote: > MODULE_DEVICE_TABLE(type, name) creates an alias of type 'extern const > typeof(name)'. If 'name' is already constant the 'const' attribute is > specified twice, which is not allowed in C89 (see discussion at > https://lkml.org/lkml/2017/5/23/1440).

Re: module: Remove const attribute from alias for MODULE_DEVICE_TABLE

2017-07-29 Thread Jessica Yu
+++ Matthias Kaehlcke [24/07/17 18:27 -0700]: MODULE_DEVICE_TABLE(type, name) creates an alias of type 'extern const typeof(name)'. If 'name' is already constant the 'const' attribute is specified twice, which is not allowed in C89 (see discussion at https://lkml.org/lkml/2017/5/23/1440). Since

Re: module: Remove const attribute from alias for MODULE_DEVICE_TABLE

2017-07-29 Thread Jessica Yu
+++ Matthias Kaehlcke [24/07/17 18:27 -0700]: MODULE_DEVICE_TABLE(type, name) creates an alias of type 'extern const typeof(name)'. If 'name' is already constant the 'const' attribute is specified twice, which is not allowed in C89 (see discussion at https://lkml.org/lkml/2017/5/23/1440). Since

[PATCH] module: Remove const attribute from alias for MODULE_DEVICE_TABLE

2017-07-24 Thread Matthias Kaehlcke
MODULE_DEVICE_TABLE(type, name) creates an alias of type 'extern const typeof(name)'. If 'name' is already constant the 'const' attribute is specified twice, which is not allowed in C89 (see discussion at https://lkml.org/lkml/2017/5/23/1440). Since the kernel is built with -std=gnu89 clang

[PATCH] module: Remove const attribute from alias for MODULE_DEVICE_TABLE

2017-07-24 Thread Matthias Kaehlcke
MODULE_DEVICE_TABLE(type, name) creates an alias of type 'extern const typeof(name)'. If 'name' is already constant the 'const' attribute is specified twice, which is not allowed in C89 (see discussion at https://lkml.org/lkml/2017/5/23/1440). Since the kernel is built with -std=gnu89 clang