Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp6686291rdb; Fri, 15 Dec 2023 05:55:02 -0800 (PST) X-Google-Smtp-Source: AGHT+IGXAVhv/FIJlrpx0H1+d0YALQCsHw/3iyw+qnVcekbFqsx2SUuwJQaobTzrS2cn73shp4/k X-Received: by 2002:a05:6871:522b:b0:203:781c:629d with SMTP id ht43-20020a056871522b00b00203781c629dmr507348oac.112.1702648502659; Fri, 15 Dec 2023 05:55:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702648502; cv=none; d=google.com; s=arc-20160816; b=kIAmW9tN7j4F8Gxp7saiotsLX0w9oTYqHwSYbvrGJvJ6o+5cr0iq2Ijxhb8obmifuZ P6i38X0zbnJagECa7MIqPSQH2IFDuyC4Ct9/HdbwVtPn3RiZsEABhUUqywI84Ro8xp/3 c9Y+p52Zr51ovbvbV1achB3wa71WdkSR5oWAfxDEHonR8GhZHc7BAE3+VVVAsZCatSL8 wTDx2hhKLQ485tF8m9USILTsTwJUX9jJQZbWcADtaDaB7yN6r925qEdXshnX1voEZfAR gPg/K8MIe8zlplhOBzfIupNIGNCrtrDaZhsapb9lb3tZpU5KmtzKkpcIZYWwFvNAcS7j jIUA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id; bh=AJ2Q8+oOAqxnNO9azCESIlmtZ931Ue5Vu0U893vNZ8Y=; fh=LrzVOhTAwD+cBo9TSquPJyeKSNG6LE3kkUXvC2SIuio=; b=i/fyaDjePLT55YBHKgiA+gZPk7Zv8ue2YBzf9AF2vs4uwUQmUp6fL8Dgt1ABTcd/KP rnlr0pmyj5nqu/5yvSv9qdDWhwb8kEGfXWV2LLV6/rZPdfJle0DaseAUdBpfTsOyA4Df pOXiEuQnzy3qXbL4zBbv8yUsjrEWI3YuxZsWd2XIRGHxv+hePiDJQ/niFr2jki0DzK/C cJwxEDGEL2lBvMM/sCkT5ZDbxSuoQPgaJibdimBqQFj+CaUmK5YL0HfIPTjzRlVTUDYw 8PlMCBepFpFQa3d+IHNEn8b8+oe7+ysTkbjw2nPVnrzbYsvDY7GFaCE8mjDI4R5X4y2o jHHQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-1047-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-1047-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id w185-20020a6362c2000000b005c6bab570b4si12900935pgb.822.2023.12.15.05.55.02 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Dec 2023 05:55:02 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-1047-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-1047-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-1047-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 35CFA285CA9 for ; Fri, 15 Dec 2023 13:55:02 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2B03B2E65C; Fri, 15 Dec 2023 13:54:56 +0000 (UTC) X-Original-To: linux-kernel@vger.kernel.org Received: from relay6-d.mail.gandi.net (relay6-d.mail.gandi.net [217.70.183.198]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B53503033B; Fri, 15 Dec 2023 13:54:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ghiti.fr Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ghiti.fr Received: by mail.gandi.net (Postfix) with ESMTPSA id 7E41BC0012; Fri, 15 Dec 2023 13:54:48 +0000 (UTC) Message-ID: <28128de4-d65e-4358-9224-7c7b840126b4@ghiti.fr> Date: Fri, 15 Dec 2023 14:54:48 +0100 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 2/5] tools: selftests: riscv: Fix compile warnings in cbo Content-Language: en-US To: Christoph Muellner , linux-riscv@lists.infradead.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, Palmer Dabbelt , Paul Walmsley , Albert Ou , Shuah Khan Cc: Philipp Tomsich , Andrew Jones , Evan Green , Xiao Wang , Alexandre Ghiti , Andy Chiu , =?UTF-8?B?QmrDtnJuIFTDtnBlbA==?= , Charlie Jenkins References: <20231123185821.2272504-1-christoph.muellner@vrull.eu> <20231123185821.2272504-3-christoph.muellner@vrull.eu> From: Alexandre Ghiti In-Reply-To: <20231123185821.2272504-3-christoph.muellner@vrull.eu> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-GND-Sasl: alex@ghiti.fr On 23/11/2023 19:58, Christoph Muellner wrote: > From: Christoph Müllner > > GCC prints a couple of format string warnings when compiling > the cbo test. Let's follow the recommendation in > Documentation/printk-formats.txt to fix these warnings. > > Signed-off-by: Christoph Müllner > --- > tools/testing/selftests/riscv/hwprobe/cbo.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/tools/testing/selftests/riscv/hwprobe/cbo.c b/tools/testing/selftests/riscv/hwprobe/cbo.c > index 50a2cc8aef38..c6a83ab11e22 100644 > --- a/tools/testing/selftests/riscv/hwprobe/cbo.c > +++ b/tools/testing/selftests/riscv/hwprobe/cbo.c > @@ -97,7 +97,7 @@ static void test_zicboz(void *arg) > block_size = pair.value; > ksft_test_result(rc == 0 && pair.key == RISCV_HWPROBE_KEY_ZICBOZ_BLOCK_SIZE && > is_power_of_2(block_size), "Zicboz block size\n"); > - ksft_print_msg("Zicboz block size: %ld\n", block_size); > + ksft_print_msg("Zicboz block size: %llu\n", block_size); > > illegal_insn = false; > cbo_zero(&mem[block_size]); > @@ -121,7 +121,7 @@ static void test_zicboz(void *arg) > for (j = 0; j < block_size; ++j) { > if (mem[i * block_size + j] != expected) { > ksft_test_result_fail("cbo.zero check\n"); > - ksft_print_msg("cbo.zero check: mem[%d] != 0x%x\n", > + ksft_print_msg("cbo.zero check: mem[%llu] != 0x%x\n", > i * block_size + j, expected); > return; > } > @@ -201,7 +201,7 @@ int main(int argc, char **argv) > pair.key = RISCV_HWPROBE_KEY_IMA_EXT_0; > rc = riscv_hwprobe(&pair, 1, sizeof(cpu_set_t), (unsigned long *)&cpus, 0); > if (rc < 0) > - ksft_exit_fail_msg("hwprobe() failed with %d\n", rc); > + ksft_exit_fail_msg("hwprobe() failed with %ld\n", rc); > assert(rc == 0 && pair.key == RISCV_HWPROBE_KEY_IMA_EXT_0); > > if (pair.value & RISCV_HWPROBE_EXT_ZICBOZ) { You can add: Reviewed-by: Alexandre Ghiti Thanks! Alex