From patchwork Thu Feb 15 04:28:35 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 873617 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=2001:4830:134:3::11; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="DUxL/UV/"; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3zhk3H3zcrz9t2l for ; Thu, 15 Feb 2018 15:35:22 +1100 (AEDT) Received: from localhost ([::1]:37512 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1emBGR-0002nQ-KZ for incoming@patchwork.ozlabs.org; Wed, 14 Feb 2018 23:35:19 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34289) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1emBAm-0007WT-RF for qemu-devel@nongnu.org; Wed, 14 Feb 2018 23:29:29 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1emBAm-0003wF-3L for qemu-devel@nongnu.org; Wed, 14 Feb 2018 23:29:28 -0500 Received: from mail-qk0-x244.google.com ([2607:f8b0:400d:c09::244]:45465) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1emBAl-0003w9-V6 for qemu-devel@nongnu.org; Wed, 14 Feb 2018 23:29:28 -0500 Received: by mail-qk0-x244.google.com with SMTP id g2so8416536qkd.12 for ; Wed, 14 Feb 2018 20:29:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=ocW3RQ0XQqPT2TMsNw4J4nFD9E9TT226lkZ5ok2pzNM=; b=DUxL/UV/WEP6Lu8agRxfyMYH9dlzkZXpnJvQte8UQC75lOQ0/y2KBpHOmcQwjGKbHD BRjmmsara/2vA5Q6a75wlz23IzqmdUUSoYQ6930Gs7gKqVw8vyp2v73kYb+tISX9fvrq ZqbrbVOqbQMZXEs3PhXxKDPj/Lpv+pEsEM46o+WACiLp9bBKNtTfinEOf0NcT/OwD/Vo uygYhu3dR3bOW+MlXawVMZxViWkwUBDhd3tfyLsouTQc3kUZrO0uhlYzTZrteYyRzDaF 9EgFZ2kRu4wpEgIRfHcwgh3BgIBNxgRbE/2ZVE11jTCx+fUgSbYFvBfPf7nfs9sIHDGb Dy1Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=ocW3RQ0XQqPT2TMsNw4J4nFD9E9TT226lkZ5ok2pzNM=; b=hel7+fpqwOADQoOI74KIYb7JfehTNWKkxAu0lxiq+i1HCT34IPtbCBqlrrD0NXOhQx PoNPxrgBxEVFFzE06rdffhv/Rn0OE5u4ZQfSArZUqI5HzUNhVCBrEV2Ci3Jgj3fgUG5q Legqko9eaLpBlXu+kNKXtPrVzMMBZBOU+sTNo8x92bV0Wzl2+3aefCZFm4glh3Yta5vo ciKgYO6FEOtlv5MB1Xihgb9NUkeZRlYGnrXycn4u5nxc8w6vjktJaTiX4ljjZWggJMY8 NGpj/CHee3iYpWrAIytawFq5RN02dW++pghJfFfyePbYf3goc2Wbpybm4q1NQFg/KY/q r25A== X-Gm-Message-State: APf1xPC4a3f9nyUaXunYtGyCrZ8q0+dwm4jcryBRCj/LaDV5fG3ciBjm /SWaPRAUaZxdZd+VzQzJmqZvpVUC X-Google-Smtp-Source: AH8x227zwHnRnk7Puf5V2jqQDBd5ybxsFYsqi0yoAwNzym/JKMmpzkytCKkz8t8bktcoryBFR2LZ/w== X-Received: by 10.55.102.134 with SMTP id a128mr2253511qkc.122.1518668967375; Wed, 14 Feb 2018 20:29:27 -0800 (PST) Received: from x1.local ([138.117.48.219]) by smtp.gmail.com with ESMTPSA id t33sm10680312qtc.14.2018.02.14.20.29.25 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 14 Feb 2018 20:29:26 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Date: Thu, 15 Feb 2018 01:28:35 -0300 Message-Id: <20180215042900.16078-6-f4bug@amsat.org> X-Mailer: git-send-email 2.16.1 In-Reply-To: <20180215042900.16078-1-f4bug@amsat.org> References: <20180215042900.16078-1-f4bug@amsat.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400d:c09::244 Subject: [Qemu-devel] [PATCH 05/30] hw/mips/r4k: constify params_size X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Yongbok Kim , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?b?w6k=?= , Aurelien Jarno Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: Philippe Mathieu-Daudé --- hw/mips/mips_r4k.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/hw/mips/mips_r4k.c b/hw/mips/mips_r4k.c index 830ee7732c..5a74c44b9a 100644 --- a/hw/mips/mips_r4k.c +++ b/hw/mips/mips_r4k.c @@ -79,8 +79,9 @@ typedef struct ResetData { static int64_t load_kernel(void) { + const size_t params_size = 264; int64_t entry, kernel_high; - long kernel_size, initrd_size, params_size; + long kernel_size, initrd_size; ram_addr_t initrd_offset; uint32_t *params_buf; int big_endian; @@ -128,7 +129,6 @@ static int64_t load_kernel(void) } /* Store command line. */ - params_size = 264; params_buf = g_malloc(params_size); params_buf[0] = tswap32(ram_size); @@ -144,7 +144,6 @@ static int64_t load_kernel(void) rom_add_blob_fixed("params", params_buf, params_size, (16 << 20) - 264); - g_free(params_buf); return entry; }