Received: from eggs.gnu.org ([2001:4830:134:3::10]:41280) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a9URn-00073G-EX for qemu-devel@nongnu.org; Thu, 17 Dec 2015 04:02:07 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a9URm-0000Nu-8s for qemu-devel@nongnu.org; Thu, 17 Dec 2015 04:02:03 -0500 From: Gerd Hoffmann Date: Thu, 17 Dec 2015 10:01:47 +0100 Message-Id: <1450342910-26827-4-git-send-email-kraxel@redhat.com> In-Reply-To: <1450342910-26827-1-git-send-email-kraxel@redhat.com> References: <1450342910-26827-1-git-send-email-kraxel@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] [PULL 3/6] fw_cfg: remove offset argument from callback prototype List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Peter Maydell , Eduardo Habkost , "Michael S. Tsirkin" , "Gabriel L. Somlo" , Paolo Bonzini , Gerd Hoffmann , "open list:ARM ACPI Subsystem" , Shannon Zhao , Igor Mammedov , =?UTF-8?q?Marc=20Mar=C3=AD?= , Laszlo Ersek , Richard Henderson From: "Gabriel L. Somlo" 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=C3=AD 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/arm/virt-acpi-build.c | 2 +- hw/i386/acpi-build.c | 2 +- hw/nvram/fw_cfg.c | 2 +- include/hw/nvram/fw_cfg.h | 3 +-- 4 files changed, 4 insertions(+), 5 deletions(-) diff --git a/hw/arm/virt-acpi-build.c b/hw/arm/virt-acpi-build.c index 3c2c5d6..8fd0b1c 100644 --- a/hw/arm/virt-acpi-build.c +++ b/hw/arm/virt-acpi-build.c @@ -631,7 +631,7 @@ static void acpi_ram_update(MemoryRegion *mr, GArray = *data) memory_region_set_dirty(mr, 0, size); } =20 -static void virt_acpi_build_update(void *build_opaque, uint32_t offset) +static void virt_acpi_build_update(void *build_opaque) { AcpiBuildState *build_state =3D build_opaque; AcpiBuildTables tables; diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c index 95e0c65..29e30ce 100644 --- a/hw/i386/acpi-build.c +++ b/hw/i386/acpi-build.c @@ -1818,7 +1818,7 @@ static void acpi_ram_update(MemoryRegion *mr, GArra= y *data) memory_region_set_dirty(mr, 0, size); } =20 -static void acpi_build_update(void *build_opaque, uint32_t offset) +static void acpi_build_update(void *build_opaque) { AcpiBuildState *build_state =3D build_opaque; AcpiBuildTables tables; diff --git a/hw/nvram/fw_cfg.c b/hw/nvram/fw_cfg.c index 6e6414b..c2d3a0a 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 =3D !!(key & FW_CFG_ARCH_LOCAL); e =3D &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); } } =20 diff --git a/include/hw/nvram/fw_cfg.h b/include/hw/nvram/fw_cfg.h index a1cfaa4..664eaf6 100644 --- a/include/hw/nvram/fw_cfg.h +++ b/include/hw/nvram/fw_cfg.h @@ -70,8 +70,7 @@ typedef struct FWCfgDmaAccess { uint64_t address; } QEMU_PACKED FWCfgDmaAccess; =20 -typedef void (*FWCfgCallback)(void *opaque, uint8_t *data); -typedef void (*FWCfgReadCallback)(void *opaque, uint32_t offset); +typedef void (*FWCfgReadCallback)(void *opaque); =20 /** * fw_cfg_add_bytes: --=20 1.8.3.1