[U-Boot] unused-const-variable warnings in FSL DDR driver

york sun york.sun at nxp.com
Sat Mar 25 15:34:39 UTC 2017


On 02/10/2017 02:00 AM, Thomas Schaefer wrote:
>> On Thu, Feb 09, 2017 at 05:51:36PM +0000, york sun wrote:
>>> On 02/09/2017 09:46 AM, Thomas Schaefer wrote:
>>>>>>
>>>>>>> On 02/09/2017 02:32 AM, Thomas Schaefer wrote:
>>>>>>>> Hi York,

<snip>

>
> I've built u-boot for T1042RDB with and without the above patch applied. Actually, binary images
> created are the same (with the exception of build timestamp of course), so GCC actually removes
> the unused variables.
>
> When adding __maybe_unsued attribute to the variable definitions, warnings don't show up anymore:
>
> diff --git a/drivers/ddr/fsl/options.c b/drivers/ddr/fsl/options.c
> index d6a8fcb216..64aaa77047 100644
> --- a/drivers/ddr/fsl/options.c
> +++ b/drivers/ddr/fsl/options.c

Thomas,

Can you put your patch together with proper commit message and 
signature? I prefer your solution than this one 
http://patchwork.ozlabs.org/patch/726353/

York


More information about the U-Boot mailing list