From: Pingbo Wen <pingbo.wen@linaro.org>
To: Arnd Bergmann <arnd@arndb.de>, y2038@lists.linaro.org
Cc: dmitry.torokhov@gmail.com, linux-kernel@vger.kernel.org,
linux-input@vger.kernel.org
Subject: Re: [PATCH V2] hp_sdc: fixed y2038 problem
Date: Fri, 23 Oct 2015 17:31:58 +0800 [thread overview]
Message-ID: <5629FE8E.8020300@linaro.org> (raw)
In-Reply-To: <3901659.bcGNtuE6xV@wuerfel>
On Friday, October 23, 2015 05:25 PM, Arnd Bergmann wrote:
> On Friday 23 October 2015 16:53:26 WEN Pingbo wrote:
>> 1. Converting timeval to ktime_t, and there is no need to handle sec and
>> usec separately
>>
>> 2. hp_sdc.rtv is only used for time diff, monotonic time is better here
>>
>> Signed-off-by: WEN Pingbo <pingbo.wen@linaro.org>
>> ---
>
> This version is still correct and looks better than the first version, but
> I'd still like you to improve some details:
>
> - read some other changelogs and follow the common style. In particular,
> in the subject line say /what/ you do ("e.g. use ktime_get instead of
> do_gettimeofday", or "avoid using struct timespec") instead of /why/,
> but then explain in the changelog text what is wrong with the current
> version and why it gets changed like this.
>
> - Below the '---', add a short list of things you have changed since
> the previous versions. This part will not get copied into the git
> history.
>
Ok, I will fix this in the next version.
>> - do_gettimeofday(&tv);
>> - if (tv.tv_sec > hp_sdc.rtv.tv_sec)
>> - tv.tv_usec += USEC_PER_SEC;
>> -
>> - if (tv.tv_usec - hp_sdc.rtv.tv_usec > HP_SDC_MAX_REG_DELAY) {
>> + if (time_diff.tv64 > HP_SDC_MAX_REG_DELAY) {
>> hp_sdc_transaction *curr;
>> uint8_t tmp;
>>
>> - printk(KERN_WARNING PREFIX "read timeout (%ius)!\n",
>> - (int)(tv.tv_usec - hp_sdc.rtv.tv_usec));
>> + printk(KERN_WARNING PREFIX "read timeout (%llins)!\n",
>> + time_diff.tv64);
>> curr->idx += hp_sdc.rqty;
>> hp_sdc.rqty = 0;
>> tmp = curr->seq[curr->actidx];
>
> A tiny style comment here: please use ktime_to_ns() to extract the
> nanoseconds out of the ktime_t type rather than accessing the tv64
> member directly.
Same here.
Thank you
Pingbo
>
> Arnd
>
_______________________________________________
Y2038 mailing list
Y2038@lists.linaro.org
https://lists.linaro.org/mailman/listinfo/y2038
next prev parent reply other threads:[~2015-10-23 9:31 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-18 9:44 [PATCH] hp_sdc: fixed y2038 problem WEN Pingbo
2015-10-19 9:01 ` [Y2038] " Arnd Bergmann
2015-10-21 8:52 ` Pingbo Wen
2015-10-23 8:53 ` [PATCH V2] " WEN Pingbo
2015-10-23 9:25 ` [Y2038] " Arnd Bergmann
2015-10-23 9:31 ` Pingbo Wen [this message]
2015-10-23 11:29 ` [PATCH V3] hp_sdc: convert struct timeval to ktime_t WEN Pingbo
2015-10-23 11:45 ` Arnd Bergmann
2015-10-23 12:19 ` Pingbo Wen
2015-10-23 12:34 ` Arnd Bergmann
2015-10-24 4:07 ` [PATCH V4] " WEN Pingbo
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=5629FE8E.8020300@linaro.org \
--to=pingbo.wen@linaro.org \
--cc=arnd@arndb.de \
--cc=dmitry.torokhov@gmail.com \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).