diff options
author | Patrick Georgi <pgeorgi@google.com> | 2018-05-02 19:03:38 +0200 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2018-05-18 10:05:13 -0700 |
commit | 85ddb2ce533cb0276aab7780238ec98e1abec2fe (patch) | |
tree | b434418120801569b00af876c36b90080ca5f1f0 /common | |
parent | e5f3ee270a0e6d7ef8bc9965dad27b11cffda367 (diff) | |
download | chrome-ec-85ddb2ce533cb0276aab7780238ec98e1abec2fe.tar.gz |
Shuffle const around
gcc 8.1 complains about duplicate const, and while some of these really
are duplicate, others look like they were supposed to tighten the API
contract so that variables are "const pointer to const data", but didn't
have that effect.
BUG=b:65441143
BRANCH=none
TEST=building Chrome EC as part of upstream coreboot's build with a
gcc 8.1 compiler now works (better. there are other issues left)
Change-Id: I6016c5f282516471746f08d5714ea07ebdd10331
Signed-off-by: Patrick Georgi <pgeorgi@google.com>
Reviewed-on: https://chromium-review.googlesource.com/1039812
Commit-Ready: Patrick Georgi <pgeorgi@chromium.org>
Tested-by: Patrick Georgi <pgeorgi@chromium.org>
Reviewed-by: Stefan Reinauer <reinauer@google.com>
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
Diffstat (limited to 'common')
-rw-r--r-- | common/console.c | 2 | ||||
-rw-r--r-- | common/spi_flash.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/common/console.c b/common/console.c index 0a8fc3c679..f4bf0b5c39 100644 --- a/common/console.c +++ b/common/console.c @@ -149,7 +149,7 @@ static const struct console_command *find_command(char *name) } -static const char const *errmsgs[] = { +static const char *const errmsgs[] = { "OK", "Unknown error", "Unimplemented", diff --git a/common/spi_flash.c b/common/spi_flash.c index b9ba3538ac..2465a18830 100644 --- a/common/spi_flash.c +++ b/common/spi_flash.c @@ -275,7 +275,7 @@ int spi_flash_erase(unsigned int offset, unsigned int bytes) * @return EC_SUCCESS, or non-zero if any error. */ int spi_flash_write(unsigned int offset, unsigned int bytes, - const uint8_t const *data) + const uint8_t *data) { int rv, write_size; |