mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@linutronix.de>
To: Baolin Wang <baolin.wang@linaro.org>
Cc: arnd@arndb.de, john.stultz@linaro.org, heenasirwani@gmail.com,
	pang.xunlei@linaro.org, linux-kernel@vger.kernel.org,
	y2038@lists.linaro.org
Subject: Re: [PATCH v4 05/25] time:Introduce the do_sys_settimeofday64() function with timespec64 type
Date: Tue, 2 Jun 2015 21:20:02 +0200 (CEST)	[thread overview]
Message-ID: <alpine.DEB.2.11.1506021743240.20347@nanos> (raw)
In-Reply-To: <1433159662-4742-1-git-send-email-baolin.wang@linaro.org>

On Mon, 1 Jun 2015, Baolin Wang wrote:

Subject line sucks.

> Introduce the do_sys_settimeofday64() function with timespec64 type to make
> it is ready for 2038 issue when setting the time of day.
> 
> And move the do_sys_settimeofday() function to the timekeeping.h file, that it
> is convenient to delete it later.

See other mails.
 
>  extern void do_gettimeofday(struct timeval *tv);
>  extern int do_settimeofday64(const struct timespec64 *ts);
> -extern int do_sys_settimeofday(const struct timespec *tv,
> -			       const struct timezone *tz);
> +extern int do_sys_settimeofday64(const struct timespec64 *tv,
> +				 const struct timezone *tz);
> +static inline int do_sys_settimeofday(const struct timespec *tv,
> +				      const struct timezone *tz)
> +{
> +	struct timespec64 ts64;
> +
> +	ts64 = timespec_to_timespec64(*tv);
> +	return do_sys_settimeofday64(&ts64, tz);


If you write it:

	struct timespec64 ts64 = timespec_to_timespec64(*tv);

	return do_sys_settimeofday64(&ts64, tz);
       
You spare a line per inline function. Applies to the other patches as well.

>  
> -int do_sys_settimeofday(const struct timespec *tv, const struct timezone *tz)
> +int do_sys_settimeofday64(const struct timespec64 *tv, const struct timezone *tz)
>  {
>  	static int firsttime = 1;
>  	int error = 0;
>  
> -	if (tv && !timespec_valid(tv))
> +	if (tv && !timespec64_valid(tv))
>  		return -EINVAL;
>  
> -	error = security_settime(tv, tz);
> +	error = security_settime64(tv, tz);

No such function. Fails to build.

Thanks,

	tglx

      reply	other threads:[~2015-06-02 19:22 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-01 11:54 Baolin Wang
2015-06-02 19:20 ` Thomas Gleixner [this message]

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=alpine.DEB.2.11.1506021743240.20347@nanos \
    --to=tglx@linutronix.de \
    --cc=arnd@arndb.de \
    --cc=baolin.wang@linaro.org \
    --cc=heenasirwani@gmail.com \
    --cc=john.stultz@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pang.xunlei@linaro.org \
    --cc=y2038@lists.linaro.org \
    /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

all inboxes | Powered by JetHome®