[PATCH 03/42] state: backend: remove .get_packed_len

Sascha Hauer s.hauer at pengutronix.de
Fri Mar 31 00:03:07 PDT 2017


.get_packed_len isn't implemented by any backend, so remove the
hook and its potential caller.

Signed-off-by: Sascha Hauer <s.hauer at pengutronix.de>
---
 common/state/backend.c | 3 ---
 common/state/state.h   | 2 --
 2 files changed, 5 deletions(-)

diff --git a/common/state/backend.c b/common/state/backend.c
index 5235bb0283..6b06c845f0 100644
--- a/common/state/backend.c
+++ b/common/state/backend.c
@@ -74,9 +74,6 @@ int state_load(struct state *state)
 	int ret;
 	struct state_backend *backend = &state->backend;
 
-	if (backend->format->get_packed_len)
-		len_hint = backend->format->get_packed_len(backend->format,
-							   state);
 	ret = state_storage_read(&backend->storage, backend->format,
 				 state->magic, &buf, &len, len_hint);
 	if (ret) {
diff --git a/common/state/state.h b/common/state/state.h
index bc6917de61..0197cb839a 100644
--- a/common/state/state.h
+++ b/common/state/state.h
@@ -53,8 +53,6 @@ struct state_backend_format {
 		     uint8_t ** buf, ssize_t * len);
 	int (*unpack) (struct state_backend_format * format,
 		       struct state * state, const uint8_t * buf, ssize_t len);
-	ssize_t(*get_packed_len) (struct state_backend_format * format,
-				   struct state * state);
 	void (*free) (struct state_backend_format * format);
 	const char *name;
 };
-- 
2.11.0




More information about the barebox mailing list