diff options
author | Ahmad Fatoum <a.fatoum@pengutronix.de> | 2021-11-25 17:10:36 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2021-12-07 15:03:31 +0100 |
commit | 22d06d7d72d781d16db7f8292181d51752e2a860 (patch) | |
tree | e9763e924c6060a14c8879d86591d278bb29c9e7 /common/state/backend_format_raw.c | |
parent | c05ef729888d822348299913bdfd9743af2c3eed (diff) | |
download | barebox-22d06d7d72d781d16db7f8292181d51752e2a860.tar.gz barebox-22d06d7d72d781d16db7f8292181d51752e2a860.tar.xz |
state: mark state init errors specially
First boot with uninitialized state is needlessly verbose. As
preparation for making boot less noisy on fresh state, mark all the
error messages with newly introduced dev_err_state_init().
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Link: https://lore.barebox.org/20211125161042.3829996-2-a.fatoum@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'common/state/backend_format_raw.c')
-rw-r--r-- | common/state/backend_format_raw.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/common/state/backend_format_raw.c b/common/state/backend_format_raw.c index ea962606cc..aeee41d07c 100644 --- a/common/state/backend_format_raw.c +++ b/common/state/backend_format_raw.c @@ -116,9 +116,8 @@ static int backend_format_raw_verify(struct state_backend_format *format, header = (struct backend_raw_header *)buf; crc = crc32(0, header, sizeof(*header) - sizeof(uint32_t)); if (crc != header->header_crc) { - dev_err(backend_raw->dev, "Error, invalid header crc in raw format, calculated 0x%08x, found 0x%08x\n", + return dev_err_state_init(backend_raw->dev, -EINVAL, "header crc in raw format, calculated 0x%08x, found 0x%08x\n", crc, header->header_crc); - return -EINVAL; } if (magic && magic != header->magic) { |