All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
To: Ksenija Stanojevic <ksenija.stanojevic@gmail.com>
Cc: outreachy-kernel@googlegroups.com, y2038@lists.linaro.org
Subject: Re: [Outreachy kernel] [PATCH v3] Staging: olpc_dcon: Replace timespec with ktime_t
Date: Fri, 2 Oct 2015 10:11:06 +0530	[thread overview]
Message-ID: <20151002044106.GA3544@sudip-pc> (raw)
In-Reply-To: <1443713340-3161-1-git-send-email-ksenija.stanojevic@gmail.com>

On Thu, Oct 01, 2015 at 05:29:00PM +0200, Ksenija Stanojevic wrote:
> Struct timespec will overflow in year 2038, here it will not cause an
> overflow because it is used with timespec_sub, but still has to be
> removed as part of y2038 changes. Replace it with ktime_t. Also use
> monotonic instead of real-time by replacing functions getnstimeofday
> with ktime_get.
> 
> Signed-off-by: Ksenija Stanojevic <ksenija.stanojevic@gmail.com>
> ---
Please always test your patch with checkpatch before sending. It has
trailing whitespace.
>
<snip>
> @@ -355,14 +354,14 @@ static void dcon_source_switch(struct work_struct *work)
>  			 * deassert and reassert, and hope for the best.
>  			 * see http://dev.laptop.org/ticket/9664
>  			 */
> -			delta_t = timespec_sub(dcon->irq_time, dcon->load_time);
> -			if (dcon->switched && delta_t.tv_sec == 0 &&
> -					delta_t.tv_nsec < NSEC_PER_MSEC * 20) {
> +			delta_t = ktime_sub(dcon->irq_time, dcon->load_time);
> +			if (dcon->switched && 
whitespace error here.

regards
sudip


      parent reply	other threads:[~2015-10-02  4:41 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-01 15:29 [PATCH v3] Staging: olpc_dcon: Replace timespec with ktime_t Ksenija Stanojevic
2015-10-01 20:29 ` [Y2038] " Arnd Bergmann
2015-10-02  4:41 ` Sudip Mukherjee [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=20151002044106.GA3544@sudip-pc \
    --to=sudipm.mukherjee@gmail.com \
    --cc=ksenija.stanojevic@gmail.com \
    --cc=outreachy-kernel@googlegroups.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.