From: Wei Yongjun <weiyj.lk@gmail.com>
To: Jiri Kosina <jikos@kernel.org>,
Benjamin Tissoires <benjamin.tissoires@redhat.com>,
Marcel Hasler <mahasler@gmail.com>
Cc: Wei Yongjun <weiyongjun1@huawei.com>, linux-input@vger.kernel.org
Subject: [PATCH -next] HID: hid-mf: convert list_for_each to entry variant
Date: Tue, 7 Feb 2017 15:52:18 +0000 [thread overview]
Message-ID: <20170207155218.3296-1-weiyj.lk@gmail.com> (raw)
From: Wei Yongjun <weiyongjun1@huawei.com>
convert list_for_each() to list_for_each_entry() where
applicable.
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
---
drivers/hid/hid-mf.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/drivers/hid/hid-mf.c b/drivers/hid/hid-mf.c
index 03f1051..572e378 100644
--- a/drivers/hid/hid-mf.c
+++ b/drivers/hid/hid-mf.c
@@ -68,8 +68,6 @@ static int mf_init(struct hid_device *hid)
struct list_head *report_list =
&hid->report_enum[HID_OUTPUT_REPORT].report_list;
-
- struct list_head *report_ptr;
struct hid_report *report;
struct list_head *input_ptr = &hid->inputs;
@@ -80,9 +78,7 @@ static int mf_init(struct hid_device *hid)
int error;
/* Setup each of the four inputs */
- list_for_each(report_ptr, report_list) {
- report = list_entry(report_ptr, struct hid_report, list);
-
+ list_for_each_entry(report, report_list, list) {
if (report->maxfield < 1 || report->field[0]->report_count < 2) {
hid_err(hid, "Invalid report, this should never happen!\n");
return -ENODEV;
reply other threads:[~2017-02-07 15:52 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20170207155218.3296-1-weiyj.lk@gmail.com \
--to=weiyj.lk@gmail.com \
--cc=benjamin.tissoires@redhat.com \
--cc=jikos@kernel.org \
--cc=linux-input@vger.kernel.org \
--cc=mahasler@gmail.com \
--cc=weiyongjun1@huawei.com \
/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.