From: "Dmitry Torokhov" <dmitry.torokhov@gmail.com>
To: Oliver Neukum <oliver@neukum.org>
Cc: Jiri Kosina <jikos@jikos.cz>,
linux-usb-devel@lists.sourceforge.net,
linux-input@atrey.karlin.mff.cuni.cz, Pavel Machek <pavel@ucw.cz>
Subject: Re: new version of usbhid autosuspend patch
Date: Thu, 27 Sep 2007 11:31:35 -0400 [thread overview]
Message-ID: <d120d5000709270831y548b0255m2e73572b8a68747b@mail.gmail.com> (raw)
In-Reply-To: <200709271633.35098.oliver@neukum.org>
Hi Oliver,
On 9/27/07, Oliver Neukum <oliver@neukum.org> wrote:
> +int hid_check_keys_pressed(struct hid_device *hid)
> +{
> + struct hid_input *hidinput, *next;
> + int i;
> +
> + list_for_each_entry_safe(hidinput, next, &hid->inputs, list) {
> + for (i = 0; i < NBITS(KEY_MAX); i++)
> + if (hidinput->input->key[i])
> + return 1;
> + }
Why are you using the list_for_each_entry_safe? You do not alter the
list in your loop.
--
Dmitry
next prev parent reply other threads:[~2007-09-27 15:31 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-09-27 14:33 new version of usbhid autosuspend patch Oliver Neukum
2007-09-27 15:31 ` Dmitry Torokhov [this message]
2007-09-27 18:09 ` Oliver Neukum
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=d120d5000709270831y548b0255m2e73572b8a68747b@mail.gmail.com \
--to=dmitry.torokhov@gmail.com \
--cc=jikos@jikos.cz \
--cc=linux-input@atrey.karlin.mff.cuni.cz \
--cc=linux-usb-devel@lists.sourceforge.net \
--cc=oliver@neukum.org \
--cc=pavel@ucw.cz \
/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).