From patchwork Fri Jul 8 15:46:56 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 588585 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:bb16:0:0:0:0 with SMTP id jd22csp841268mab; Fri, 8 Jul 2022 10:02:43 -0700 (PDT) X-Google-Smtp-Source: AGRyM1tXqZy08vOmcgXpgEXdjpVZ8DOtqSSDdwhAhi0kQrbFnCQ1ywfcCzqaRqU47baPbfJMhMn9 X-Received: by 2002:ac8:5b15:0:b0:31d:ab7e:a63d with SMTP id m21-20020ac85b15000000b0031dab7ea63dmr3882186qtw.164.1657299763193; Fri, 08 Jul 2022 10:02:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657299763; cv=none; d=google.com; s=arc-20160816; b=PkW137A0ZfTCCwnvjh80Kd0Edewt5E6xbWlypPXPZcwXNih8Gr6DEfGBCRSpTqLGy3 xTq74kt4x+yVMM0JILUKz7yW9lpOYyCUNSKFq+ystbyNyIN0/dhl4qiAafMOQ2iTM4Ze 9aNti6tk6I4ifVQ+MfEQ2Hrgi9oJBD+I5oh2bgbLIP8Kixp1YZfqgQ1x5qyaC4MEgCjv shRc/uEJmPzhRQ3szXYK87trwQkToGbfZB9CiQ5BRsckkFC01tqOr3eBSLmociAh/f2x Rpayo1NNG32KJP25ces9brglte/jicY6N4VBsTxgjdiP2D9+N7+67vdThxn1po1f4LjN J91A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=KHCjODk+vnGajKdN8rNYoLNgAJ6Sd7+uxGwpqklP/xM=; b=nU6MYH7KQvvHFUWv+JfqX6qzl5Y/8eKyvA/QKLCKLbS9X5rmeHcAkQzBfY/BdVYzjh 7y6kEnYIUaaLMVkqA/EXLL0T7H1GDifedkGyd+8UrSyaHpu6hC6whATyrsU8XGBLDbSJ 0Hz16VxejVUK3ffI+yRL4548tQ12b0egAc9fe4KudbeEV3uPOD+Ea9zF3AJ5mXK4jJOO tecXCHH5O8gsqaNLhkLMyiKPuiqGboVynObgi8f/cdseEIs2k0p9J/o3Ms1lk4n6/1G4 rBeOBM+/99XGrCUjKFdFsEonK+8GcCvLEAv88+jNAgoddiBCL3F1dSjAMWQdhTMIOTlg H8Fg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=NMEfns2B; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id t14-20020a37ea0e000000b006b263cd9f07si10972158qkj.735.2022.07.08.10.02.43 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 08 Jul 2022 10:02:43 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=NMEfns2B; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:52968 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o9rNK-0000i8-Nr for patch@linaro.org; Fri, 08 Jul 2022 13:02:42 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45318) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o9qDQ-0006MG-DM for qemu-devel@nongnu.org; Fri, 08 Jul 2022 11:48:24 -0400 Received: from mail-pl1-x62c.google.com ([2607:f8b0:4864:20::62c]:35622) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1o9qDO-0002XV-Lu for qemu-devel@nongnu.org; Fri, 08 Jul 2022 11:48:24 -0400 Received: by mail-pl1-x62c.google.com with SMTP id y18so8656098plb.2 for ; Fri, 08 Jul 2022 08:48:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=KHCjODk+vnGajKdN8rNYoLNgAJ6Sd7+uxGwpqklP/xM=; b=NMEfns2BwCLb6OTZ9xSuMWVCZS6t/zVm7cN4YZ3Oqr8Hv6/XBGSA6h/dmCzS2cjtil 76WKGeB9oNxaW35tW10OgsV/Vcn8UVrkIG6vRmzmC2DkTHnS3vL32hnDxX4aaEH7riXU pHm1FQtgc927o+jITFmqg3Yk/J898pnJY0gR3yyTcpkhBBpE7lcFmSyKtGoJvhFcbqGP ahtLXhS+8wpXQJc8nUDvWC/ueOB5woZRb4IBokFk2+A5b+7GM3AVMz/GvJw2QW39yASL nU3DemIPREZauSulb4tnkYSh3RS1/snVkQBLAtA9DowmprN+3dTa7sFBiJI7gGjPo9V+ MwYA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=KHCjODk+vnGajKdN8rNYoLNgAJ6Sd7+uxGwpqklP/xM=; b=UIA/KrOS8ZSLt16UAzA5zZLDs9gf0KVNLmPF+lVHe4g5lNKvkKWrZbXLbAnQA9HSEk KLKC48rL3fhLM0Aj80OiMN7dW/w81wnrTsObeor5mgePw+39h7vxftLHeQOiDN9oorK4 XX4jY7hOf57YVYwMmNW4SoL3g1eJ123kYEW/EqSl0zuMFFenZ7KWxiX0Rqvu/cMe2jVH FEKOYEoMljakpTPtKnZoYhAWnV33FOuK/v+6FlyRNwzPd83pXE+wTWUlRCdwYjdrSIPl V2R6JOg2ybmCzI9bKEMUAEKgp9wS7dgQbHDpiueAvdJjx3Mk+EWCntuA9jdXVq2oD89h GKYQ== X-Gm-Message-State: AJIora/so5FGOBbFMRguZWBCEL9A9sPR5zkFmNicAyeShICehMqeSM2s CL5rrCLC7oLYKW3IzHaoVOuiy35H+FjKJwKz X-Received: by 2002:a17:90a:be0c:b0:1ef:accb:23a5 with SMTP id a12-20020a17090abe0c00b001efaccb23a5mr490128pjs.113.1657295301876; Fri, 08 Jul 2022 08:48:21 -0700 (PDT) Received: from stoup.. ([122.255.60.245]) by smtp.gmail.com with ESMTPSA id y3-20020a17090a390300b001ef81bac701sm1782089pjb.42.2022.07.08.08.48.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Jul 2022 08:48:21 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: qemu-arm@nongnu.org Subject: [RISU PATCH v4 25/29] Remove return value from reginfo_dump Date: Fri, 8 Jul 2022 21:16:56 +0530 Message-Id: <20220708154700.18682-26-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220708154700.18682-1-richard.henderson@linaro.org> References: <20220708154700.18682-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::62c; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x62c.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-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+patch=linaro.org@nongnu.org Sender: "Qemu-devel" No uses actually checked the error indication. Even if we wanted to check ferror on the stream, we should do that generically rather than per arch. Signed-off-by: Richard Henderson Reviewed-by: Peter Maydell --- risu.h | 4 ++-- risu_reginfo_aarch64.c | 8 +++----- risu_reginfo_arm.c | 6 ++---- risu_reginfo_i386.c | 6 ++---- risu_reginfo_m68k.c | 6 ++---- risu_reginfo_ppc64.c | 6 ++---- 6 files changed, 13 insertions(+), 23 deletions(-) diff --git a/risu.h b/risu.h index 99f0d8e..6eceb9f 100644 --- a/risu.h +++ b/risu.h @@ -120,8 +120,8 @@ void reginfo_init(struct reginfo *ri, ucontext_t *uc); /* return 1 if structs are equal, 0 otherwise. */ int reginfo_is_eq(struct reginfo *r1, struct reginfo *r2); -/* print reginfo state to a stream, returns 1 on success, 0 on failure */ -int reginfo_dump(struct reginfo *ri, FILE * f); +/* print reginfo state to a stream */ +void reginfo_dump(struct reginfo *ri, FILE *f); /* reginfo_dump_mismatch: print mismatch details to a stream */ void reginfo_dump_mismatch(struct reginfo *m, struct reginfo *a, FILE *f); diff --git a/risu_reginfo_aarch64.c b/risu_reginfo_aarch64.c index e0f80c0..b86864d 100644 --- a/risu_reginfo_aarch64.c +++ b/risu_reginfo_aarch64.c @@ -219,8 +219,8 @@ static void sve_dump_zreg_diff(FILE *f, int vq, const uint64_t *za, } } -/* reginfo_dump: print state to a stream, returns nonzero on success */ -int reginfo_dump(struct reginfo *ri, FILE * f) +/* reginfo_dump: print state to a stream */ +void reginfo_dump(struct reginfo *ri, FILE * f) { int i; fprintf(f, " faulting insn %08x\n", ri->faulting_insn); @@ -263,7 +263,7 @@ int reginfo_dump(struct reginfo *ri, FILE * f) sve_dump_preg(f, vq, p); fprintf(f, "\n"); } - return !ferror(f); + return; } for (i = 0; i < 32; i++) { @@ -271,8 +271,6 @@ int reginfo_dump(struct reginfo *ri, FILE * f) fprintf(f, " V%-2d : %016" PRIx64 "%016" PRIx64 "\n", i, v[1], v[0]); } - - return !ferror(f); } void reginfo_dump_mismatch(struct reginfo *m, struct reginfo *a, FILE * f) diff --git a/risu_reginfo_arm.c b/risu_reginfo_arm.c index ba1035e..09813c4 100644 --- a/risu_reginfo_arm.c +++ b/risu_reginfo_arm.c @@ -161,8 +161,8 @@ int reginfo_is_eq(struct reginfo *r1, struct reginfo *r2) return memcmp(r1, r2, sizeof(*r1)) == 0; /* ok since we memset 0 */ } -/* reginfo_dump: print the state to a stream, returns nonzero on success */ -int reginfo_dump(struct reginfo *ri, FILE *f) +/* reginfo_dump: print the state to a stream */ +void reginfo_dump(struct reginfo *ri, FILE *f) { int i; if (ri->faulting_insn_size == 2) { @@ -179,8 +179,6 @@ int reginfo_dump(struct reginfo *ri, FILE *f) i, (unsigned long long) ri->fpregs[i]); } fprintf(f, " fpscr: %08x\n", ri->fpscr); - - return !ferror(f); } void reginfo_dump_mismatch(struct reginfo *m, struct reginfo *a, FILE *f) diff --git a/risu_reginfo_i386.c b/risu_reginfo_i386.c index 57e4c00..37506fa 100644 --- a/risu_reginfo_i386.c +++ b/risu_reginfo_i386.c @@ -310,8 +310,8 @@ static char get_vecletter(uint64_t features) } } -/* reginfo_dump: print state to a stream, returns nonzero on success */ -int reginfo_dump(struct reginfo *ri, FILE *f) +/* reginfo_dump: print state to a stream */ +void reginfo_dump(struct reginfo *ri, FILE *f) { uint64_t features; int i, j, n, w; @@ -345,8 +345,6 @@ int reginfo_dump(struct reginfo *ri, FILE *f) fprintf(f, " k%-5d: %016" PRIx64 "\n", i, ri->kregs[i]); } } - - return !ferror(f); } void reginfo_dump_mismatch(struct reginfo *m, struct reginfo *a, FILE *f) diff --git a/risu_reginfo_m68k.c b/risu_reginfo_m68k.c index 29edce9..38d7dd3 100644 --- a/risu_reginfo_m68k.c +++ b/risu_reginfo_m68k.c @@ -92,8 +92,8 @@ int reginfo_is_eq(struct reginfo *m, struct reginfo *a) return 1; } -/* reginfo_dump: print state to a stream, returns nonzero on success */ -int reginfo_dump(struct reginfo *ri, FILE *f) +/* reginfo_dump: print state to a stream */ +void reginfo_dump(struct reginfo *ri, FILE *f) { int i; fprintf(f, " pc \e[1;101;37m0x%08x\e[0m\n", ri->pc); @@ -114,8 +114,6 @@ int reginfo_dump(struct reginfo *ri, FILE *f) } fprintf(f, "\n"); - - return !ferror(f); } void reginfo_dump_mismatch(struct reginfo *m, struct reginfo *a, FILE *f) diff --git a/risu_reginfo_ppc64.c b/risu_reginfo_ppc64.c index e96dc48..134a152 100644 --- a/risu_reginfo_ppc64.c +++ b/risu_reginfo_ppc64.c @@ -112,8 +112,8 @@ int reginfo_is_eq(struct reginfo *m, struct reginfo *a) return 1; } -/* reginfo_dump: print state to a stream, returns nonzero on success */ -int reginfo_dump(struct reginfo *ri, FILE * f) +/* reginfo_dump: print state to a stream */ +void reginfo_dump(struct reginfo *ri, FILE * f) { int i; @@ -152,8 +152,6 @@ int reginfo_dump(struct reginfo *ri, FILE * f) ri->vrregs.vrregs[i][0], ri->vrregs.vrregs[i][1], ri->vrregs.vrregs[i][2], ri->vrregs.vrregs[i][3]); } - - return !ferror(f); } void reginfo_dump_mismatch(struct reginfo *m, struct reginfo *a, FILE *f)