From patchwork Sat Jan 18 07:20:45 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lukasz Majewski X-Patchwork-Id: 1225114 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=sourceware.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=libc-alpha-return-108793-incoming=patchwork.ozlabs.org@sourceware.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.a=rsa-sha1 header.s=default header.b=ZnoEQ3bf; dkim-atps=neutral Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4808WT6mltz9sP3 for ; Sat, 18 Jan 2020 18:21:57 +1100 (AEDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; q=dns; s= default; b=y44hs1UXRUhSi4gjAvoOaSgTVH7YvtNmwgqmqayvXh7U039G1zmxF XH2S5j+1W1eHYq3/pN1eyBw32tEMt7nW6tpp6oXq8d4NripV9lEh9Lg5P6n85MBZ zyAGwXR/T46bje77QaU0/WN3L2VJA4/tgRci6lN4UnufxdOLAWVKyM= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; s=default; bh=NaWHI4PNPkoqgqnHahtT5Mq6vzE=; b=ZnoEQ3bfU48bA90cSHHnR8ABCWJp aUbD0jRdLV6RnxSDGVwqGBuZCFIRnw+NldT8lyRlKrTy0c6B+79YJyhIhqxsjnZB ubIcW5qiU5x9brhWd30OFX1pk5V75B0Ast7RRIfJKn0zythBkwk5xkpOfvTVQWtf WkiMaeB8Vq+kTfM= Received: (qmail 59290 invoked by alias); 18 Jan 2020 07:21:22 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 59238 invoked by uid 89); 18 Jan 2020 07:21:22 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-21.0 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.1 spammy=emphasis X-HELO: mail-out.m-online.net From: Lukasz Majewski To: Joseph Myers , Paul Eggert , Adhemerval Zanella , Samuel Thibault Cc: Alistair Francis , Alistair Francis , GNU C Library , Siddhesh Poyarekar , Florian Weimer , Florian Weimer , Zack Weinberg , Carlos O'Donell , Andreas Schwab , Lukasz Majewski Subject: [PATCH 4/6] y2038: alpha: Rename valid_timeval_to_timeval64 to valid_timeval32_to_timeval Date: Sat, 18 Jan 2020 08:20:45 +0100 Message-Id: <20200118072047.23071-5-lukma@denx.de> In-Reply-To: <20200118072047.23071-1-lukma@denx.de> References: <20200118072047.23071-1-lukma@denx.de> MIME-Version: 1.0 Without this patch the naming convention for functions to convert struct timeval32 to struct timeval (which supports 64 bit time on Alpha) was a bit misleading. The name 'valid_timeval_to_timeval64' suggest conversion of struct timeval to struct __timeval64 (as in ./include/time.h). As on alpha the struct timeval supports 64 bit time it seems more readable to emphasis struct timeval32 in the conversion function name. Hence the helper function naming change to 'valid_timeval32_to_timeval'. Reviewed-by: Alistair Francis --- sysdeps/unix/sysv/linux/alpha/osf_adjtime.c | 4 ++-- sysdeps/unix/sysv/linux/alpha/osf_setitimer.c | 4 ++-- sysdeps/unix/sysv/linux/alpha/osf_utimes.c | 4 ++-- sysdeps/unix/sysv/linux/alpha/tv32-compat.h | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/sysdeps/unix/sysv/linux/alpha/osf_adjtime.c b/sysdeps/unix/sysv/linux/alpha/osf_adjtime.c index cd864686f6..5ac72e252f 100644 --- a/sysdeps/unix/sysv/linux/alpha/osf_adjtime.c +++ b/sysdeps/unix/sysv/linux/alpha/osf_adjtime.c @@ -57,7 +57,7 @@ int attribute_compat_text_section __adjtime_tv32 (const struct timeval32 *itv, struct timeval32 *otv) { - struct timeval itv64 = valid_timeval_to_timeval64 (*itv); + struct timeval itv64 = valid_timeval32_to_timeval (*itv); struct timeval otv64; if (__adjtime (&itv64, &otv64) == -1) @@ -91,7 +91,7 @@ __adjtimex_tv32 (struct timex32 *tx) tx64.calcnt = tx->calcnt; tx64.errcnt = tx->errcnt; tx64.stbcnt = tx->stbcnt; - tx64.time = valid_timeval_to_timeval64 (tx->time); + tx64.time = valid_timeval32_to_timeval (tx->time); int status = __adjtimex (&tx64); if (status < 0) diff --git a/sysdeps/unix/sysv/linux/alpha/osf_setitimer.c b/sysdeps/unix/sysv/linux/alpha/osf_setitimer.c index 418efbf546..3935d1cfb5 100644 --- a/sysdeps/unix/sysv/linux/alpha/osf_setitimer.c +++ b/sysdeps/unix/sysv/linux/alpha/osf_setitimer.c @@ -30,9 +30,9 @@ __setitimer_tv32 (int which, const struct itimerval32 *restrict new_value, { struct itimerval new_value_64; new_value_64.it_interval - = valid_timeval_to_timeval64 (new_value->it_interval); + = valid_timeval32_to_timeval (new_value->it_interval); new_value_64.it_value - = valid_timeval_to_timeval64 (new_value->it_value); + = valid_timeval32_to_timeval (new_value->it_value); if (old_value == NULL) return __setitimer (which, &new_value_64, NULL); diff --git a/sysdeps/unix/sysv/linux/alpha/osf_utimes.c b/sysdeps/unix/sysv/linux/alpha/osf_utimes.c index 423c2a8ef2..6c3fad0132 100644 --- a/sysdeps/unix/sysv/linux/alpha/osf_utimes.c +++ b/sysdeps/unix/sysv/linux/alpha/osf_utimes.c @@ -28,8 +28,8 @@ attribute_compat_text_section __utimes_tv32 (const char *filename, const struct timeval32 times32[2]) { struct timeval times[2]; - times[0] = valid_timeval_to_timeval64 (times32[0]); - times[1] = valid_timeval_to_timeval64 (times32[1]); + times[0] = valid_timeval32_to_timeval (times32[0]); + times[1] = valid_timeval32_to_timeval (times32[1]); return __utimes (filename, times); } diff --git a/sysdeps/unix/sysv/linux/alpha/tv32-compat.h b/sysdeps/unix/sysv/linux/alpha/tv32-compat.h index 6076d2ec05..7169909259 100644 --- a/sysdeps/unix/sysv/linux/alpha/tv32-compat.h +++ b/sysdeps/unix/sysv/linux/alpha/tv32-compat.h @@ -70,7 +70,7 @@ struct rusage32 overflow, they write { INT32_MAX, TV_USEC_MAX } to the output. */ static inline struct timeval -valid_timeval_to_timeval64 (const struct timeval32 tv) +valid_timeval32_to_timeval (const struct timeval32 tv) { return (struct timeval) { tv.tv_sec, tv.tv_usec }; }