[PATCH 1/1] common/console.c: discard volatile

Simon Glass sjg at chromium.org
Tue Feb 11 18:14:30 CET 2020


On Tue, 11 Feb 2020 at 05:05, Heinrich Schuchardt <xypron.glpk at gmx.de> wrote:
>
> Avoid errors of like
>
> common/console.c: In function ‘console_record_reset’:
> common/console.c:615:16: error: passing argument 1 of ‘membuff_purge’
> discards ‘volatile’ qualifier from pointer target type
> [-Werror=discarded-qualifiers]
>   615 |  membuff_purge(&gd->console_out);
>       |                ^~~~~~~~~~~~~~~~
>
> by casting to non-volatile.
>
> The volatile property stems from declarations like
>
> arch/arm/include/asm/global_data.h:114:
>
> But there is no need to treat gd->console_out and gd->console_in as
> volatile in the context of common/console.c.
>
> Signed-off-by: Heinrich Schuchardt <xypron.glpk at gmx.de>
> ---
>  common/console.c | 18 ++++++++++--------
>  1 file changed, 10 insertions(+), 8 deletions(-)

Reviewed-by: Simon Glass <sjg at chromium.org>


More information about the U-Boot mailing list