From: Alexey Perevalov <a.perevalov@samsung.com>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-kernel@vger.kernel.org, john.stultz@linaro.org,
Anton Vorontsov <anton@enomsg.org>,
anton@nomsg.org, kyungmin.park@samsung.com,
cw00.choi@samsung.com, akpm@linux-foundation.org,
Anton Vorontsov <anton.vorontsov@linaro.org>
Subject: Re: [PATCH v3 4/6] timerfd: Factor out timer-type unspecific timerfd_expire()
Date: Thu, 20 Feb 2014 20:30:57 +0400 [thread overview]
Message-ID: <53062DC1.9010504@samsung.com> (raw)
In-Reply-To: <alpine.DEB.2.02.1402201136500.4468@ionos.tec.linutronix.de>
On 02/20/2014 02:52 PM, Thomas Gleixner wrote:
> On Thu, 20 Feb 2014, Alexey Perevalov wrote:
>
>> From: Anton Vorontsov <anton@enomsg.org>
>>
>> There is nothing hrtimer-specific inside the timerfd_tmrproc(), except
>> the function prototype. We're about to add other timer types, so factor
>> out generic timerfd_expire() helper from timerfd_tmrproc().
> This changelog is completely useless. How is timerfd_tmrproc, which is
> not a function but a function pointer, related to the patch?
>
> Moving duplicated code to a common function is nice, but ....
>
>> Signed-off-by: Anton Vorontsov <anton.vorontsov@linaro.org>
>> Signed-off-by: Alexey Perevalov <a.perevalov@samsung.com>
>> ---
>> fs/timerfd.c | 40 +++++++++++++++++++---------------------
>> 1 file changed, 19 insertions(+), 21 deletions(-)
>>
>> diff --git a/fs/timerfd.c b/fs/timerfd.c
>> index 9293121..3561ce7 100644
>> --- a/fs/timerfd.c
>> +++ b/fs/timerfd.c
>> @@ -229,6 +229,23 @@ static unsigned int timerfd_poll(struct file *file, poll_table *wait)
>> return events;
>> }
>>
>> +static u64 timerfd_rearm(struct timerfd_ctx *ctx)
>> +{
>> + u64 orun;
>> +
>> + if (isalarm(ctx)) {
>> + orun += alarm_forward_now(
>> + &ctx->t.alarm, ctx->tintv) - 1;
>> + alarm_restart(&ctx->t.alarm);
>> + } else {
>> + orun += hrtimer_forward_now(&ctx->t.tmr,
>> + ctx->tintv) - 1;
>> + hrtimer_restart(&ctx->t.tmr);
> Warnings are there to be ignored and testing of user space
> interfaces after a change is overrated, right?
>
> Aside of that you just blindly copied the original code w/o fixing up
> the now unnecessary line breaks.
>
> The summary of this patch is:
>
> 1) Breaks existing functionality including user space ABI
> 2) Compiler warnings ignored
> 3) Untested
> 4) Utter lack of programming style
> 5) Useless changelog
>
> Impressive for a trivial thing like this.
>
> Thanks,
>
> tglx
>
Compiler warning - if you mean uninitialized orun, I fixed it
ill-timed in the next patch,
yes it should be in original patch.
--
Best regards,
Alexey Perevalov
next prev parent reply other threads:[~2014-02-20 16:31 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-20 8:40 [PATCH v3 0/6] Deferrable timers support for hrtimers/timerfd API Alexey Perevalov
2014-02-20 8:40 ` [PATCH v3 1/6] tracing/trivial: Add CLOCK_BOOTIME and CLOCK_TAI for human readable clockid trace Alexey Perevalov
2014-02-20 11:01 ` Thomas Gleixner
2014-02-20 16:25 ` Alexey Perevalov
2014-02-20 8:40 ` [PATCH v3 2/6] hrtimer: Add support for deferrable timer into the hrtimer Alexey Perevalov
2014-02-20 18:49 ` John Stultz
2014-02-20 21:18 ` Thomas Gleixner
2014-02-20 21:20 ` John Stultz
2014-02-20 21:56 ` Thomas Gleixner
2014-02-20 8:40 ` [PATCH v3 3/6] kernel/time: Add new helpers to convert ktime to/from jiffies Alexey Perevalov
2014-02-20 10:34 ` Thomas Gleixner
2014-02-20 8:40 ` [PATCH v3 4/6] timerfd: Factor out timer-type unspecific timerfd_expire() Alexey Perevalov
2014-02-20 10:52 ` Thomas Gleixner
2014-02-20 16:30 ` Alexey Perevalov [this message]
2014-02-21 4:13 ` Anton Vorontsov
2014-02-21 7:04 ` Alexey Perevalov
2014-02-21 10:41 ` Thomas Gleixner
2014-02-20 8:40 ` [PATCH v3 5/6] timerfd: Add support for deferrable timers Alexey Perevalov
2014-02-20 11:09 ` Thomas Gleixner
2014-02-21 4:11 ` Anton Vorontsov
2014-02-21 10:40 ` Thomas Gleixner
2014-02-20 8:40 ` [PATCH v3 6/6] tracing/trivial: Add CLOCK_*_DEFERRABLE for tracing clockids Alexey Perevalov
2014-02-20 11:12 ` [PATCH v3 0/6] Deferrable timers support for hrtimers/timerfd API Thomas Gleixner
2014-02-20 16:53 ` Alexey Perevalov
2014-02-20 21:21 ` Thomas Gleixner
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=53062DC1.9010504@samsung.com \
--to=a.perevalov@samsung.com \
--cc=akpm@linux-foundation.org \
--cc=anton.vorontsov@linaro.org \
--cc=anton@enomsg.org \
--cc=anton@nomsg.org \
--cc=cw00.choi@samsung.com \
--cc=john.stultz@linaro.org \
--cc=kyungmin.park@samsung.com \
--cc=linux-kernel@vger.kernel.org \
--cc=tglx@linutronix.de \
/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