Re: [PATCH] be2net: fix adapter->big_page_size miscaculation

From: David Miller
Date: Thu Jul 18 2019 - 19:29:31 EST


From: Qian Cai <cai@xxxxxx>
Date: Thu, 18 Jul 2019 19:26:47 -0400

>
>
>> On Jul 18, 2019, at 5:21 PM, Bill Wendling <morbo@xxxxxxxxxx> wrote:
>>
>> [My previous response was marked as spam...]
>>
>> Top-of-tree clang says that it's const:
>>
>> $ gcc a.c -O2 && ./a.out
>> a is a const.
>>
>> $ clang a.c -O2 && ./a.out
>> a is a const.
>
>
> I used clang-7.0.1. So, this is getting worse where both GCC and clang will start to suffer the
> same problem.

Then rewrite the module parameter macros such that the non-constness
is evident to all compilers regardless of version.

That is the place to fix this, otherwise we will just be adding hacks
all over the place rather than in just one spot.

Thanks.