From 3f8752b4e5a3871f0d2963ab889be937d9a4226a Mon Sep 17 00:00:00 2001 From: "Gabriel L. Somlo" Date: Thu, 5 Nov 2015 09:32:49 -0500 Subject: fw_cfg: remove offset argument from callback prototype MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Read callbacks are now only invoked at item selection, before any data is read. As such, the value of the offset argument passed to the callback will always be 0. Also, the two callback instances currently in use both leave their offset argument unused. This patch removes the offset argument from the fw_cfg read callback prototype, and from the currently available instances. The unused (write) callback prototype is also removed (write support was removed earlier, in commit 023e3148). Cc: Laszlo Ersek Cc: Gerd Hoffmann Cc: Marc MarĂ­ Signed-off-by: Gabriel Somlo Reviewed-by: Laszlo Ersek Message-id: 1446733972-1602-4-git-send-email-somlo@cmu.edu Signed-off-by: Gerd Hoffmann --- hw/nvram/fw_cfg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'hw/nvram/fw_cfg.c') diff --git a/hw/nvram/fw_cfg.c b/hw/nvram/fw_cfg.c index 6e6414b723..c2d3a0a548 100644 --- a/hw/nvram/fw_cfg.c +++ b/hw/nvram/fw_cfg.c @@ -266,7 +266,7 @@ static int fw_cfg_select(FWCfgState *s, uint16_t key) arch = !!(key & FW_CFG_ARCH_LOCAL); e = &s->entries[arch][key & FW_CFG_ENTRY_MASK]; if (e->read_callback) { - e->read_callback(e->callback_opaque, s->cur_offset); + e->read_callback(e->callback_opaque); } } -- cgit v1.2.3