common/console.c: discard volatile
authorHeinrich Schuchardt <xypron.glpk@gmx.de>
Wed, 12 Feb 2020 17:23:49 +0000 (18:23 +0100)
committerTom Rini <trini@konsulko.com>
Thu, 13 Feb 2020 15:10:50 +0000 (10:10 -0500)
commita3a9e046570ab6fb552ed7b5d04c3417e5debf91
tree94d5b0cc859b30cca2a2a4ed1ec137c7ebbc623a
parent58b209cf6060db60375a2ca9fb21febfae3b8f31
common/console.c: discard volatile

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.

Fixes: b612312816ff ("console: Add a function to read a line of the output / eof")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
common/console.c