From mboxrd@z Thu Jan 1 00:00:00 1970 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 87E99C7EE23 for ; Sun, 4 Jun 2023 11:18:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229718AbjFDLSx (ORCPT ); Sun, 4 Jun 2023 07:18:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60788 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229462AbjFDLSw (ORCPT ); Sun, 4 Jun 2023 07:18:52 -0400 Received: from 1wt.eu (ded1.1wt.eu [163.172.96.212]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 00C2CD2; Sun, 4 Jun 2023 04:18:50 -0700 (PDT) Received: (from willy@localhost) by mail.home.local (8.17.1/8.17.1/Submit) id 354BIZQr001811; Sun, 4 Jun 2023 13:18:35 +0200 Date: Sun, 4 Jun 2023 13:18:35 +0200 From: Willy Tarreau To: Zhangjin Wu Cc: arnd@arndb.de, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-riscv@lists.infradead.org, thomas@t-8ch.de, Thomas =?iso-8859-1?Q?Wei=DFschuh?= Subject: Re: [PATCH v3 02/12] tools/nolibc: add missing nanoseconds support for __NR_statx Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kselftest@vger.kernel.org On Sat, Jun 03, 2023 at 04:02:04PM +0800, Zhangjin Wu wrote: > Commit a89c937d781a ("tools/nolibc: support nanoseconds in stat()") > added nanoseconds for stat() but missed the statx case, this adds it. > > The stx_atime, stx_mtime, stx_ctime are in type of 'struct > statx_timestamp', which is incompatible with 'struct timespec', should > convert explicitly. > > /* include/uapi/linux/stat.h */ > > struct statx_timestamp { > __s64 tv_sec; > __u32 tv_nsec; > __s32 __reserved; > }; > > /* include/uapi/linux/time.h */ > struct timespec { > __kernel_old_time_t tv_sec; /* seconds */ > long tv_nsec; /* nanoseconds */ > }; > > Without this patch, the stat_timestamps test case would fail when > __NR_statx defined. > > Fixes: a89c937d781a ("tools/nolibc: support nanoseconds in stat()") > Suggested-by: Thomas Weißschuh > Link: https://lore.kernel.org/linux-riscv/3a3edd48-1ace-4c89-89e8-9c594dd1b3c9@t-8ch.de/ > Signed-off-by: Zhangjin Wu Thank you. I've queued it immediately after Thomas' patch. I'll let the two of you tell me if it's better to squash them together to avoid breaking bisect and mark you co-authors. Willy