Received: by 2002:ac0:e350:0:0:0:0:0 with SMTP id g16csp447210imn; Wed, 3 Aug 2022 10:34:17 -0700 (PDT) X-Google-Smtp-Source: AGRyM1tiYk93R5HtH4QLXeZY8tt70krwoqXF7hr815YfOh1ZFs/SxkWzpbGuQoAUyn1D0Y/X9jk5 X-Received: by 2002:a63:65c2:0:b0:419:8146:b1a7 with SMTP id z185-20020a6365c2000000b004198146b1a7mr21998177pgb.210.1659548056744; Wed, 03 Aug 2022 10:34:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1659548056; cv=none; d=google.com; s=arc-20160816; b=yDb5Y0Hvtj/nyN+HU3O4xlGh0Fv8Mx2mDWDKM8HMBwKCgpKt/WSB24tbmhFiMAXry1 xg+nGDu4tPhw8w+Mo+Dvje7ituyWpNAo/fmtM3v6WIfrk44mxEeThD0TLbWoTl0djGXE xugF2ranMUJ97VTdVWGVL1tZoTePoN/KZ+D2Gnx3n+5zAcP//IG3lutx5+qNRd2JIvgb h0SLzyPjBKFENvyuScRGMv1ZMe+7/IIqNg0piwoeiLfZSNOHx4Ja/VLfHTecFzpxmDCY K0fostytZCN9Qt2g9lCGaS5BuhDLZ+ePA17tdi8Tal8bF/Ee9MIjZ18rQ3pfafgBfgYF 1unw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature:dkim-signature; bh=0zolso21gIIYgt/NVDVnyPudwarrGOFdNb/MuQYrTSc=; b=03hSHjMC9DkD2hqrzE0p038Vj92TfuugEyA+jg9XH5ejlyLJ7/a3zgqaBicYMvnhsc RNHxohBnUFH2trQNOePwdOnZoSbQEoBL3Gd3HgafZEn/NlIlRulof6mepRQnnVOnPSU4 JzKTnZmUOQxsnFL0q0X0lbJB5lM9BEKfNK9Zhi3W8XqZlmrtV1mqUiZS7FNwTQx68Asn 9DCqyj3KQAXZ2rTQ8kdxRImexTg54xPaFAPRf8P9+/KZcNA6PElgmKGrdAtousAyPxou DmLLA/b9zbM8sX6+2ux/C9v/b9eKvPFpdW492H5WFU4/HEJmrOaCgfCfyjQSmBXRnOt6 PhFQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=qv7I4F0R; dkim=neutral (no key) header.i=@suse.cz header.s=susede2_ed25519 header.b=keixfypQ; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g22-20020a056a0023d600b0052c5e4d5b4fsi20093933pfc.246.2022.08.03.10.33.44; Wed, 03 Aug 2022 10:34:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=qv7I4F0R; dkim=neutral (no key) header.i=@suse.cz header.s=susede2_ed25519 header.b=keixfypQ; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236436AbiHCRcU (ORCPT + 99 others); Wed, 3 Aug 2022 13:32:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41406 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238126AbiHCRcT (ORCPT ); Wed, 3 Aug 2022 13:32:19 -0400 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 35EFD20193 for ; Wed, 3 Aug 2022 10:32:18 -0700 (PDT) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id C3F993E8A9; Wed, 3 Aug 2022 17:32:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1659547936; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=0zolso21gIIYgt/NVDVnyPudwarrGOFdNb/MuQYrTSc=; b=qv7I4F0RkfNXR+bwstcSHy/FVgDnDnDoq0M0rJt937T6EYVmGiX+ys23ROwKWuU7bdPjdU hMI2Py04t+YIeL5dW84Ro1R0Ot6P4x/ZQRMSHEBm+AN/rnYSYGExyNnm73eaahbgELWs0j Ez1eaOroHpiDY2x6QWFZjxkrr8ERaHE= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1659547936; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=0zolso21gIIYgt/NVDVnyPudwarrGOFdNb/MuQYrTSc=; b=keixfypQ5H+ldwvcs85XoWkt6LL8C897zTc3DBTFMXVnmCAhtBQ98yB1KcL0pl6sTR8VCp w61YBlvxA8y2TuBw== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 7E02813A94; Wed, 3 Aug 2022 17:32:16 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id p65fGyCx6mLOawAAMHmgww (envelope-from ); Wed, 03 Aug 2022 17:32:16 +0000 From: Petr Vorel To: ltp@lists.linux.it Cc: Petr Vorel , linux-nfs@vger.kernel.org, Cyril Hrubis , Andrea Cervesato Subject: [PATCH 1/1] aiodio: Fix format string for 32bit Date: Wed, 3 Aug 2022 19:32:11 +0200 Message-Id: <20220803173211.14292-1-pvorel@suse.cz> X-Mailer: git-send-email 2.37.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org On 32bit char pointer is int and size_t is unsigned int, Cast to long / unsigned long. Signed-off-by: Petr Vorel --- Hi, IMHO %zu is C99, we don't define -std and my gcc 12 uses by default -std=gnu17. Therefore I'm surprised that %zu does not work. Based on Andrea patch: https://patchwork.ozlabs.org/project/ltp/patch/20220803120905.3107-1-andrea.cervesato@suse.com/ Kind regards, Petr testcases/kernel/io/ltp-aiodio/common.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/testcases/kernel/io/ltp-aiodio/common.h b/testcases/kernel/io/ltp-aiodio/common.h index d9cbd8611..283f7f5db 100644 --- a/testcases/kernel/io/ltp-aiodio/common.h +++ b/testcases/kernel/io/ltp-aiodio/common.h @@ -19,7 +19,7 @@ static inline char *check_zero(char *buf, int size) if (*buf != 0) { tst_res(TINFO, "non zero buffer at buf[%lu] => 0x%02x,%02x,%02x,%02x", - buf - p, (unsigned int)buf[0], + (long)(buf - p), (unsigned int)buf[0], size > 1 ? (unsigned int)buf[1] : 0, size > 2 ? (unsigned int)buf[2] : 0, size > 3 ? (unsigned int)buf[3] : 0); @@ -78,8 +78,8 @@ static inline void io_read(const char *filename, int filesize, volatile int *run if (r > 0) { bufoff = check_zero(buff, r); if (bufoff) { - tst_res(TINFO, "non-zero read at offset %zu", - offset + (bufoff - buff)); + tst_res(TINFO, "non-zero read at offset %lu", + (long int)offset + (bufoff - buff)); break; } offset += r; -- 2.37.1