From: Tejun Heo <tj@kernel.org>
To: Miklos Szeredi <miklos@szeredi.hu>
Cc: torvalds@linux-foundation.org, hch@infradead.org, mingo@elte.hu,
rminnich@sandia.gov, ericvh@gmail.com,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH RESEND] poll: allow f_op->poll to sleep, take #2
Date: Sat, 22 Nov 2008 02:11:52 +0900 [thread overview]
Message-ID: <4926EBD8.6070200@kernel.org> (raw)
In-Reply-To: <E1L3Z5h-0008J7-QN@pomaz-ex.szeredi.hu>
Miklos Szeredi wrote:
> On Thu, 20 Nov 2008, Tejun Heo wrote:
>
> [snip]
>
>> +int poll_schedule_timeout(struct poll_wqueues *pwq, int state,
>> + ktime_t *expires, unsigned long slack)
>
> The 'state' parameter is unused, and is always called with the
> TASK_INTERRUPTIBLE value. Shouldn't it be removed?
>
>> +{
>> + int rc = -EINTR;
>> +
>> + set_current_state(TASK_INTERRUPTIBLE);
Aieee... this should have been set_current_state(state). We can also
remove @state but this being a schedule() function I think it's better
to pass @state explicitly.
>> + if (!pwq->triggered)
>> + rc = schedule_hrtimeout_range(expires, slack, HRTIMER_MODE_ABS);
>> + __set_current_state(TASK_RUNNING);
>> +
>> + /* clear triggered for the next iteration */
>> + pwq->triggered = 0;
>> +
>> + return rc;
>> +}
>> +
>> +EXPORT_SYMBOL(poll_schedule_timeout);
>
> Checkpatch warning:
>
> WARNING: EXPORT_SYMBOL(foo); should immediately follow its function/variable
> #118: FILE: fs/select.c:216:
> +EXPORT_SYMBOL(poll_schedule_timeout);
>
> [snip]
>
>> Index: work/include/linux/poll.h
>> ===================================================================
>> --- work.orig/include/linux/poll.h
>> +++ work/include/linux/poll.h
>> @@ -57,6 +57,8 @@ struct poll_table_entry {
>> struct poll_wqueues {
>> poll_table pt;
>> struct poll_table_page * table;
>> + struct task_struct * polling_task;
>> + int triggered;
>
> Checkpatch error:
>
> ERROR: "foo * bar" should be "foo *bar"
> #173: FILE: include/linux/poll.h:60:
> + struct task_struct * polling_task;
For both, I was trying to stay consistent with the environment. I
find mixed styles in close proximity much uglier than slightly
different but consistent style. Eh... Is the consensus checkpatch or
die?
Thanks.
--
tejun
next prev parent reply other threads:[~2008-11-21 17:12 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <491BA16C.30606@kernel.org>
[not found] ` <alpine.LFD.2.00.0811151208430.3468@nehalem.linux-foundation.org>
2008-11-20 13:57 ` [PATCH RESEND] poll: allow f_op->poll to sleep, take #2 Tejun Heo
2008-11-21 16:42 ` Miklos Szeredi
2008-11-21 17:11 ` Tejun Heo [this message]
2008-11-21 17:23 ` Miklos Szeredi
2008-11-21 17:31 ` Tejun Heo
2008-11-22 7:28 ` [PATCH] poll: allow f_op->poll to sleep, take #3 Tejun Heo
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=4926EBD8.6070200@kernel.org \
--to=tj@kernel.org \
--cc=ericvh@gmail.com \
--cc=hch@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=miklos@szeredi.hu \
--cc=mingo@elte.hu \
--cc=rminnich@sandia.gov \
--cc=torvalds@linux-foundation.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.