From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTPS id C1EB83858C52 for ; Wed, 29 Nov 2023 09:15:49 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org C1EB83858C52 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org C1EB83858C52 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1701249351; cv=none; b=KkVZacU71qTVzleK8cFnGdnpEoO89FTWREj8v06Eos0Ppnkj+bWVF39JEZsCTN7VuCKryTgJHgO7iJJO1bfNxBGD+Q1KdFEI8iptK9L4OHpz4qYE6ygaGm38Iwjb9W/W21sII+Mcchkoe2BgPy2Gj1uz6Tl1p7Nere9oumwXm5w= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1701249351; c=relaxed/simple; bh=cNBy8YipBvjYKVsDy6nG/po7K2slqaJjY3g8RKnqR1M=; h=DKIM-Signature:Date:From:To:Subject:Message-ID:MIME-Version; b=wj2Wh4ExoeR/FNTV0VuBYfxzBlyU517pnm1CQofcxjoTbeSwKlL0x7Obf38YQP/yRzrjiXlaa1MY1qNWQRBGJIWhVxPTnYxn1/hfXr0J/8fEWZmMvG6Lmp908nN7/1Sps8mxDiT+sEzPkXGL4EXCuCMW+OD0qX4PtfHx1WD57NM= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1701249349; h=from:from:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references; bh=OuzfrKURcP3Ulq/70/r6liPS/lcZCbDDh2+Ll+9wYHs=; b=S/5Wsj4IuMehiZ4EVEVBsV8cNpVsw0LSrgI+3bQaV1hkrlFwgbx9xLw75lUOkPR4mmSvDE VTTWFxBtAYlhttUcjfptZBfIw+U4nlS7SJ8PU5MeKtZkjPxFvP1XIq5ZxLFReCn4aBE6IP vmRw5vbpmF5dWR31XGKWSY+vwZVibMg= Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-637-Sc9mVZGdPmWjA2x8lWyxNA-1; Wed, 29 Nov 2023 04:15:46 -0500 X-MC-Unique: Sc9mVZGdPmWjA2x8lWyxNA-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id DAD081C0514A; Wed, 29 Nov 2023 09:15:45 +0000 (UTC) Received: from calimero.vinschen.de (unknown [10.39.192.52]) by smtp.corp.redhat.com (Postfix) with ESMTPS id B37451C060B0; Wed, 29 Nov 2023 09:15:45 +0000 (UTC) Received: by calimero.vinschen.de (Postfix, from userid 500) id 60D7DA80BC4; Wed, 29 Nov 2023 10:15:44 +0100 (CET) Date: Wed, 29 Nov 2023 10:15:44 +0100 From: Corinna Vinschen To: Kuan-Wei Chiu Cc: newlib@sourceware.org, kito.cheng@sifive.com Subject: Re: [PATCH v2] RISC-V: Fix timeval conversion in _gettimeofday() Message-ID: Reply-To: newlib@sourceware.org Mail-Followup-To: Kuan-Wei Chiu , newlib@sourceware.org, kito.cheng@sifive.com References: <20231128223739.463754-1-visitorckw@gmail.com> <20231129035714.469943-1-visitorckw@gmail.com> MIME-Version: 1.0 In-Reply-To: <20231129035714.469943-1-visitorckw@gmail.com> X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.7 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8 Content-Disposition: inline X-Spam-Status: No, score=-11.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE,TXREP,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On Nov 29 11:57, Kuan-Wei Chiu wrote: > Replace multiplication with division for microseconds calculation from > nanoseconds in _gettimeofday function. > > Signed-off-by: Kuan-Wei Chiu > --- > v1 -> v2: > - Add missing Signed-off-by tag. > > libgloss/riscv/sys_gettimeofday.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/libgloss/riscv/sys_gettimeofday.c b/libgloss/riscv/sys_gettimeofday.c > index 81bea8e55..5379a8963 100644 > --- a/libgloss/riscv/sys_gettimeofday.c > +++ b/libgloss/riscv/sys_gettimeofday.c > @@ -23,7 +23,7 @@ _gettimeofday(struct timeval *tp, void *tzp) > int rv; > rv = syscall_errno (SYS_clock_gettime64, 2, 0, (long)&ts64, 0, 0, 0, 0); > tp->tv_sec = ts64.tv_sec; > - tp->tv_usec = ts64.tv_nsec * 1000; > + tp->tv_usec = ts64.tv_nsec / 1000; > return rv; > #else > return syscall_errno (SYS_gettimeofday, 1, tp, 0, 0, 0, 0, 0); > -- > 2.25.1 Pushed. Thanks, Corinna