From nobody Tue Nov 26 06:37:51 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1709705584; cv=none; d=zohomail.com; s=zohoarc; b=VPq813hIYo4NH/QtjJYFyV+Hgzdf2gzxA3Ribf8qjfmz74pv+IlLlLvo8U43k+f5bm6v+nVEVqaL46a8bBFRni+IPdWVF3I/q8o8oWZ88ovWI5bvKp1rtyO5Jg0j1MmWFsoYS8e6UFcXIoHV/9mJO7rCDvtIL74E8rqKhq+1A94= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1709705584; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=A243LVbp1AwfUXsMdD+blJLZP6SXZ8l0TiQS7QSUs3I=; b=GvL6qLMQenT60tp0id7FPRcGDELyw4KRN7dls4mDTgeJZ7jxOJ8lS8bGGZbdLZSBwieYHm+InCYt+A+00APYunWYw1YDBZavdq3XyO5O8UuQL8X0IfRCQmLvFv36CIYcabo6CwjTAQ9uoeeQOx38zqqgwW6Ro4H5+Lbjad8ng5w= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1709705584316495.3623581070882; Tue, 5 Mar 2024 22:13:04 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rhkW9-0004uU-4U; Wed, 06 Mar 2024 01:12:42 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rhkVv-0004sl-Vm for qemu-devel@nongnu.org; Wed, 06 Mar 2024 01:12:30 -0500 Received: from mail-ot1-x32b.google.com ([2607:f8b0:4864:20::32b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rhkVu-0006Es-0g for qemu-devel@nongnu.org; Wed, 06 Mar 2024 01:12:27 -0500 Received: by mail-ot1-x32b.google.com with SMTP id 46e09a7af769-6e4f8f140c1so544025a34.2 for ; Tue, 05 Mar 2024 22:12:25 -0800 (PST) Received: from localhost ([157.82.206.27]) by smtp.gmail.com with UTF8SMTPSA id b22-20020a63cf56000000b005dc884e9f5bsm10328337pgj.38.2024.03.05.22.12.23 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 05 Mar 2024 22:12:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=daynix-com.20230601.gappssmtp.com; s=20230601; t=1709705544; x=1710310344; darn=nongnu.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=A243LVbp1AwfUXsMdD+blJLZP6SXZ8l0TiQS7QSUs3I=; b=0ey7GjYD8BO8VBFAWirzUhGeZBZ/g8MJ51yCQX24p7Fd927WCwnUSMY05nLb8WCQj1 yfxPIervzMHyHMx/DDl48yCEqlMM5v+siiuVUQCZ/PeAvlxY7tolL0VLeXfcXZPCv0S1 q1Uoyq4g0kJxYKPMs5bckO+jCGJkxIfL78aY1KjTd4X/E2RTNUQvCvckAwxt6PVtW4n4 80NwJZuf2/hcSE2ETsUsIa+25yBhE+2HoyImig8o683m1NAq7pcAIA9IXoXVbcV/IXLB 6HR9LQhI1xhHpVHGeX9ToQeLrG+HumfITVHpk3rmEt5vnJBiyLGMhMXa7xKsflL0w6gL ec0g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709705544; x=1710310344; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=A243LVbp1AwfUXsMdD+blJLZP6SXZ8l0TiQS7QSUs3I=; b=ROul20OUhvuqhcZ0sxMsTPZL9FNCkyqR4r9MVXXzMkIX42CBRU6K+BnnDjEXzqyNAn hJOha8vgblYKDpgFNjBdPMXdrnH5c6a88XZ0cxV5QmrPsP/GxDuKUdfbOq16KgJPvXTe yu7aU9qzcqYBlkq35j0HaHv6TCkrGGQoLezgcW9RjK8Q8pmdjKi4Y/olGvqe0qfcOVso cfxN8d6rBam0YXlZ//z2b9Af0WmPTe8nQJ7TtHbH/Lhl+xD7+HGBSK2pYYB5/yVEGggt EB+RqVJgur3XO95QryelTEcCE7KDt42ppM37+miPnh0ElWE3CIV7s//V8Joi5bI13Qwg hMKA== X-Gm-Message-State: AOJu0YztLm3rDVvngSzspTTrgM6FuFK9SNh7/lLEEILR8VmhlRyOZhvb P2U3anmegbalJ0GqU7IsgsW+dBMqvln49khp0C0CRhbyNEq34MhuzfNzC88llUg= X-Google-Smtp-Source: AGHT+IGIuNTAzeTjpTyz4eoSmNr4CNTwQROCJ7aTf8C06E27X0rBrChP7GI38YwD+YE4BxFZAKo95A== X-Received: by 2002:a05:6830:61b:b0:6e4:b891:c9eb with SMTP id w27-20020a056830061b00b006e4b891c9ebmr4685323oti.30.1709705544507; Tue, 05 Mar 2024 22:12:24 -0800 (PST) From: Akihiko Odaki Date: Wed, 06 Mar 2024 15:12:10 +0900 Subject: [PATCH v3 04/19] contrib/elf2dmp: Change pa_space_create() signature MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20240306-elf2dmp-v3-4-d74e6c3da49c@daynix.com> References: <20240306-elf2dmp-v3-0-d74e6c3da49c@daynix.com> In-Reply-To: <20240306-elf2dmp-v3-0-d74e6c3da49c@daynix.com> To: Viktor Prutyanov , Peter Maydell Cc: qemu-devel@nongnu.org, Akihiko Odaki X-Mailer: b4 0.12.3 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: none client-ip=2607:f8b0:4864:20::32b; envelope-from=akihiko.odaki@daynix.com; helo=mail-ot1-x32b.google.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_NONE=0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @daynix-com.20230601.gappssmtp.com) X-ZM-MESSAGEID: 1709705585171100003 pa_space_create() used to return an integer to propagate error, but it never fails so let it return void. Signed-off-by: Akihiko Odaki --- contrib/elf2dmp/addrspace.h | 2 +- contrib/elf2dmp/addrspace.c | 4 +--- contrib/elf2dmp/main.c | 5 +---- 3 files changed, 3 insertions(+), 8 deletions(-) diff --git a/contrib/elf2dmp/addrspace.h b/contrib/elf2dmp/addrspace.h index 039c70c5b079..c868d6473873 100644 --- a/contrib/elf2dmp/addrspace.h +++ b/contrib/elf2dmp/addrspace.h @@ -33,7 +33,7 @@ struct va_space { struct pa_space *ps; }; =20 -int pa_space_create(struct pa_space *ps, QEMU_Elf *qemu_elf); +void pa_space_create(struct pa_space *ps, QEMU_Elf *qemu_elf); void pa_space_destroy(struct pa_space *ps); =20 void va_space_create(struct va_space *vs, struct pa_space *ps, uint64_t dt= b); diff --git a/contrib/elf2dmp/addrspace.c b/contrib/elf2dmp/addrspace.c index 6f608a517b1e..4c127c9b1ec4 100644 --- a/contrib/elf2dmp/addrspace.c +++ b/contrib/elf2dmp/addrspace.c @@ -57,7 +57,7 @@ static void pa_block_align(struct pa_block *b) b->paddr +=3D low_align; } =20 -int pa_space_create(struct pa_space *ps, QEMU_Elf *qemu_elf) +void pa_space_create(struct pa_space *ps, QEMU_Elf *qemu_elf) { Elf64_Half phdr_nr =3D elf_getphdrnum(qemu_elf->map); Elf64_Phdr *phdr =3D elf64_getphdr(qemu_elf->map); @@ -87,8 +87,6 @@ int pa_space_create(struct pa_space *ps, QEMU_Elf *qemu_e= lf) } =20 ps->block_nr =3D block_i; - - return 0; } =20 void pa_space_destroy(struct pa_space *ps) diff --git a/contrib/elf2dmp/main.c b/contrib/elf2dmp/main.c index 86e709e6da3a..8a71e2efd281 100644 --- a/contrib/elf2dmp/main.c +++ b/contrib/elf2dmp/main.c @@ -543,10 +543,7 @@ int main(int argc, char *argv[]) return 1; } =20 - if (pa_space_create(&ps, &qemu_elf)) { - eprintf("Failed to initialize physical address space\n"); - goto out_elf; - } + pa_space_create(&ps, &qemu_elf); =20 state =3D qemu_elf.state[0]; printf("CPU #0 CR3 is 0x%016"PRIx64"\n", state->cr[3]); --=20 2.44.0