Received: from eggs.gnu.org ([2001:4830:134:3::10]:54030) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vftxk-00068V-CC for qemu-devel@nongnu.org; Mon, 11 Nov 2013 11:03:45 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Vftxd-00052J-5d for qemu-devel@nongnu.org; Mon, 11 Nov 2013 11:03:40 -0500 Date: Mon, 11 Nov 2013 18:06:25 +0200 From: "Michael S. Tsirkin" Message-ID: <1384159176-31662-5-git-send-email-mst@redhat.com> References: <1384159176-31662-1-git-send-email-mst@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1384159176-31662-1-git-send-email-mst@redhat.com> Subject: [Qemu-devel] [PULL 4/6] loader: drop return value for rom_add_blob_fixed List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: qemu-ppc@nongnu.org, Alexander Graf rom_add_blob never fails, and neither does rom_add_blob_fixed, so there's no need to return value from it. In fact, rom_add_blob_fixed was erroneously returning -1 unconditionally which made the only system that checked the return value -M bamboo fail to start. Drop the return value and drop checks from ppc440_bamboo to fix this failure. Reported-by: Alexander Graf Signed-off-by: Michael S. Tsirkin --- include/hw/loader.h | 2 +- hw/ppc/ppc440_bamboo.c | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/include/hw/loader.h b/include/hw/loader.h index 58eca98..7a23d6b 100644 --- a/include/hw/loader.h +++ b/include/hw/loader.h @@ -55,7 +55,7 @@ void do_info_roms(Monitor *mon, const QDict *qdict); #define rom_add_file_fixed(_f, _a, _i) \ rom_add_file(_f, NULL, _a, _i) #define rom_add_blob_fixed(_f, _b, _l, _a) \ - (rom_add_blob(_f, _b, _l, _a, NULL, NULL, NULL) ? 0 : -1) + rom_add_blob(_f, _b, _l, _a, NULL, NULL, NULL) #define PC_ROM_MIN_VGA 0xc0000 #define PC_ROM_MIN_OPTION 0xc8000 diff --git a/hw/ppc/ppc440_bamboo.c b/hw/ppc/ppc440_bamboo.c index 655e499..67597df 100644 --- a/hw/ppc/ppc440_bamboo.c +++ b/hw/ppc/ppc440_bamboo.c @@ -110,8 +110,9 @@ static int bamboo_load_device_tree(hwaddr addr, qemu_devtree_setprop_cell(fdt, "/cpus/cpu@0", "timebase-frequency", tb_freq); - ret = rom_add_blob_fixed(BINARY_DEVICE_TREE_FILE, fdt, fdt_size, addr); + rom_add_blob_fixed(BINARY_DEVICE_TREE_FILE, fdt, fdt_size, addr); g_free(fdt); + return 0; out: -- MST