From: Alistair Francis <alistair23@gmail.com>
To: Lukasz Majewski <lukma@denx.de>
Cc: Joseph Myers <joseph@codesourcery.com>,
Paul Eggert <eggert@cs.ucla.edu>,
Adhemerval Zanella <adhemerval.zanella@linaro.org>,
Samuel Thibault <samuel.thibault@ens-lyon.org>,
Alistair Francis <alistair.francis@wdc.com>,
GNU C Library <libc-alpha@sourceware.org>,
Siddhesh Poyarekar <siddhesh@gotplt.org>,
Florian Weimer <fweimer@redhat.com>,
Florian Weimer <fw@deneb.enyo.de>,
Zack Weinberg <zackw@panix.com>,
"Carlos O'Donell" <carlos@redhat.com>,
Andreas Schwab <schwab@suse.de>
Subject: Re: [PATCH 4/6] y2038: alpha: Rename valid_timeval_to_timeval64 to valid_timeval32_to_timeval
Date: Sat, 18 Jan 2020 23:03:00 -0000 [thread overview]
Message-ID: <CAKmqyKMtWxGJxr9R=wpFJzTLH2uBBV+Aa7PuwbTGyCumnAJWpQ@mail.gmail.com> (raw)
In-Reply-To: <20200118072047.23071-5-lukma@denx.de>
On Sat, Jan 18, 2020 at 5:21 PM Lukasz Majewski <lukma@denx.de> wrote:
>
> 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'.
Looks good.
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Alistair
> ---
> 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 };
> }
> --
> 2.20.1
>
next prev parent reply other threads:[~2020-01-18 22:49 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-18 7:34 [PATCH 0/6] y2038: Convert settimeofday to be Y2038 safe Lukasz Majewski
2020-01-18 7:21 ` [PATCH 4/6] y2038: alpha: Rename valid_timeval_to_timeval64 to valid_timeval32_to_timeval Lukasz Majewski
2020-01-18 23:03 ` Alistair Francis [this message]
2020-01-18 7:21 ` [PATCH 6/6] y2038: linux: Provide __settimeofday64 implementation Lukasz Majewski
2020-01-19 1:13 ` Alistair Francis
2020-01-18 7:21 ` [PATCH 2/6] y2038: hurd: Provide __clock_settime64 function Lukasz Majewski
2020-01-20 17:12 ` Adhemerval Zanella
2020-01-20 18:10 ` Lukasz Majewski
2020-01-20 18:29 ` Adhemerval Zanella
2020-01-21 16:46 ` Lukasz Majewski
2020-01-21 17:22 ` Adhemerval Zanella
2020-01-21 17:25 ` Samuel Thibault
2020-01-28 0:36 ` Samuel Thibault
2020-01-18 7:21 ` [PATCH 3/6] y2038: Introduce struct __timeval64 - new internal glibc type Lukasz Majewski
2020-01-18 22:49 ` Alistair Francis
2020-01-19 15:22 ` Arnd Bergmann
2020-01-19 15:39 ` Lukasz Majewski
2020-01-19 21:30 ` Arnd Bergmann
2020-01-20 2:12 ` Lukasz Majewski
2020-01-20 13:01 ` Lukasz Majewski
2020-01-20 13:03 ` Arnd Bergmann
2020-01-20 16:58 ` Adhemerval Zanella
2020-01-20 19:25 ` Arnd Bergmann
2020-01-21 16:55 ` Lukasz Majewski
2020-01-21 17:31 ` Adhemerval Zanella
2020-01-21 22:02 ` Lukasz Majewski
2020-01-18 7:21 ` [PATCH 1/6] y2038: Use __clock_settime64 in deprecated stime function Lukasz Majewski
2020-01-20 17:01 ` Adhemerval Zanella
2020-01-20 18:01 ` Lukasz Majewski
2020-01-20 18:26 ` Adhemerval Zanella
2020-01-21 17:16 ` Lukasz Majewski
2020-01-21 17:20 ` Adhemerval Zanella
2020-01-18 7:21 ` [PATCH 5/6] y2038: Provide conversion helpers for struct __timeval64 Lukasz Majewski
2020-01-18 23:47 ` Alistair Francis
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAKmqyKMtWxGJxr9R=wpFJzTLH2uBBV+Aa7PuwbTGyCumnAJWpQ@mail.gmail.com' \
--to=alistair23@gmail.com \
--cc=adhemerval.zanella@linaro.org \
--cc=alistair.francis@wdc.com \
--cc=carlos@redhat.com \
--cc=eggert@cs.ucla.edu \
--cc=fw@deneb.enyo.de \
--cc=fweimer@redhat.com \
--cc=joseph@codesourcery.com \
--cc=libc-alpha@sourceware.org \
--cc=lukma@denx.de \
--cc=samuel.thibault@ens-lyon.org \
--cc=schwab@suse.de \
--cc=siddhesh@gotplt.org \
--cc=zackw@panix.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).