From patchwork Thu Nov 23 18:58:18 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Christoph_M=C3=BCllner?= X-Patchwork-Id: 13466611 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 13494C636D3 for ; Thu, 23 Nov 2023 18:58:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=2FkC0AcdZ55EBbqEoVuJu5no0TK8mrBabjaIlONz9Ow=; b=M1DA/BgmVk6uVK h+secEy853WcTdpv73q+aiIUfQlSeYIGqybXxcjGck0iNJN/rpc7bbyI7upm1m65XLfcTck6k+H8r zd3DvgbseaG1trfZOMjKGoA8o3xdK4TLJhPs1xGp882Bh/swoLVsa1puuPVpRmyU3SsaOHWnvtuSb a6EQHVO508x4RCvJpASVPPgYv+T8QKTKd4WsMSQv0/EdqMEE4HFNd7zaQ5vJAPLSX9BD+rdcB32+A Fvbrwp36EEV/f5Q2T3BGRCldBSyp5OMyIwOyConsLKge92MYS3aXXuhE14R6AOOejOEd5WFpScq3j HJeK/K0r1gkHJH6gva9A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1r6EuL-005YIz-0V; Thu, 23 Nov 2023 18:58:37 +0000 Received: from mail-ed1-x52b.google.com ([2a00:1450:4864:20::52b]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1r6EuF-005YGH-1x for linux-riscv@lists.infradead.org; Thu, 23 Nov 2023 18:58:32 +0000 Received: by mail-ed1-x52b.google.com with SMTP id 4fb4d7f45d1cf-548f6f3cdc9so1774162a12.2 for ; Thu, 23 Nov 2023 10:58:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vrull.eu; s=google; t=1700765910; x=1701370710; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=D52mho4bbVBLhO1MqSHLzeH5mafSEJrrR5dOy4gDBr8=; b=PmHuRPfq2cz9/E3USBWR1xv0+3wjMi+iEiihnUIvHI8FdsI3iyJrbZAhhwlIyYdL3Z efULM2dm//7fz92KTJUtT1iwXIw7cDC6kJdszkM8aJpqOKcUR7LCj5MGuN5bmcbkSZGa h0GlxPJ9JDJH9DGo/kE+65Sg3N6HCioMPdyv31zgkjrPQQMLg4ISIwdZLMVbSSY/MfUn YPGJ3iZHZ6Bw5K0lsPEJy++1o/u+5YkFmUtL4+ZchdybK6+Fw+rtM8gyKhd7Fa+Qe+jd 8rSlyxPVWJxbOyn5YO5SbMRWLUMcNWg16r5TTipT1kpbk8BhJEt5ilB8GBiK1prP57GD W2rw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700765910; x=1701370710; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=D52mho4bbVBLhO1MqSHLzeH5mafSEJrrR5dOy4gDBr8=; b=hpT9v0LMcVi+/iQUC/vZ3p8mXwIldE8XiT/SxfB0XcuOsS6o5ueNtsfrkuyOKtNSj/ Xr1t2wRq+lMjrbUa+Y5DhbA8JIzezSwfpwRdUuB+OnqgcK+b3xvz0ZUYqhuN4VdI9Glm 6TWZTumXdy4e5/rF1Aau9On8el7AslfCQpGcToNvoNJbGHGzeNumyUh5juPgJSeHjL6j vj8VdUt69SAz+FZe0dbYVMHM9hQ1oQr6wOYhTHnSol3GgIuPD4Gfid02OsGEJmPe1w+D Z1VB62GXXWHkfSANzILdHsRR9qKjy6/D5HMiNVeWc+NotaiBcqkJ3RwuWhlw7x0vB7xt UMaQ== X-Gm-Message-State: AOJu0Yw6B9jaZi2+gDZnCfBd3HfRsrKCxpML33rkw/6mw11avht+I0TP wxidiWjN4AqESURY0hghzNeRkquinzcUdjwIk9+b3A7K X-Google-Smtp-Source: AGHT+IFVVpG1Z6gxPdaL7IaaTFJinrPmrgoX6cwu9dsiRja9dZsbaJhr6jSoHE3EsEV83YZM2drU6A== X-Received: by 2002:a17:906:738b:b0:9f8:2f30:d74f with SMTP id f11-20020a170906738b00b009f82f30d74fmr185134ejl.7.1700765909911; Thu, 23 Nov 2023 10:58:29 -0800 (PST) Received: from beast.fritz.box (62-178-148-172.cable.dynamic.surfer.at. [62.178.148.172]) by smtp.gmail.com with ESMTPSA id l23-20020a170906231700b009ff1997ce86sm1115944eja.149.2023.11.23.10.58.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 Nov 2023 10:58:29 -0800 (PST) From: Christoph Muellner To: 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 , =?utf-8?q?Christoph_M=C3=BCllner?= Subject: [PATCH 2/5] tools: selftests: riscv: Fix compile warnings in cbo Date: Thu, 23 Nov 2023 19:58:18 +0100 Message-ID: <20231123185821.2272504-3-christoph.muellner@vrull.eu> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20231123185821.2272504-1-christoph.muellner@vrull.eu> References: <20231123185821.2272504-1-christoph.muellner@vrull.eu> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231123_105831_647004_25F759B3 X-CRM114-Status: GOOD ( 10.70 ) X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org 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 Reviewed-by: Alexandre Ghiti --- 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) {