From: Peter Chen <hzpeterchen@gmail.com>
To: Geliang Tang <geliangtang@163.com>
Cc: Peter Chen <Peter.Chen@freescale.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 6/9] usb: chipidea: debug: use list_for_each_entry
Date: Fri, 25 Dec 2015 15:41:28 +0800 [thread overview]
Message-ID: <20151225074128.GA9700@shlinux2> (raw)
In-Reply-To: <f1ae736b0f69fc750c612fdb0ee1dd54fb32aa5d.1450455486.git.geliangtang@163.com>
On Sat, Dec 19, 2015 at 12:34:31AM +0800, Geliang Tang wrote:
> Use list_for_each_entry() instead of list_for_each() to simplify
> the code.
>
> Signed-off-by: Geliang Tang <geliangtang@163.com>
> ---
> drivers/usb/chipidea/debug.c | 5 +----
> 1 file changed, 1 insertion(+), 4 deletions(-)
>
> diff --git a/drivers/usb/chipidea/debug.c b/drivers/usb/chipidea/debug.c
> index a4f7db2..de5c509 100644
> --- a/drivers/usb/chipidea/debug.c
> +++ b/drivers/usb/chipidea/debug.c
> @@ -172,7 +172,6 @@ static int ci_requests_show(struct seq_file *s, void *data)
> {
> struct ci_hdrc *ci = s->private;
> unsigned long flags;
> - struct list_head *ptr = NULL;
> struct ci_hw_req *req = NULL;
> struct td_node *node, *tmpnode;
> unsigned i, j, qsize = sizeof(struct ci_hw_td)/sizeof(u32);
> @@ -184,9 +183,7 @@ static int ci_requests_show(struct seq_file *s, void *data)
>
> spin_lock_irqsave(&ci->lock, flags);
> for (i = 0; i < ci->hw_ep_max; i++)
> - list_for_each(ptr, &ci->ci_hw_ep[i].qh.queue) {
> - req = list_entry(ptr, struct ci_hw_req, queue);
> -
> + list_for_each_entry(req, &ci->ci_hw_ep[i].qh.queue, queue) {
> list_for_each_entry_safe(node, tmpnode, &req->tds, td) {
> seq_printf(s, "EP=%02i: TD=%08X %s\n",
> i % (ci->hw_ep_max / 2),
> --
> 2.5.0
>
It is ok for chipidea part, I will queue it, you don't need to
re-send it again
--
Best Regards,
Peter Chen
next prev parent reply other threads:[~2015-12-25 7:46 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-18 16:34 [PATCH 1/9] usb: host: fotg210: use list_for_each_entry_safe Geliang Tang
2015-12-18 16:34 ` [PATCH 2/9] usb: host: max3421-hcd: use list_for_each_entry* Geliang Tang
2015-12-18 16:34 ` [PATCH 3/9] usb: host: oxu210hp-hcd: use list_for_each_entry_safe Geliang Tang
2015-12-18 16:34 ` [PATCH 4/9] usb: host: u132-hcd: use list_for_each_entry Geliang Tang
2015-12-18 16:34 ` [PATCH 5/9] usb: xhci: " Geliang Tang
2015-12-18 16:34 ` [PATCH 6/9] usb: chipidea: debug: " Geliang Tang
2015-12-25 7:41 ` Peter Chen [this message]
2015-12-18 16:34 ` [PATCH 7/9] usb: dwc2: host: use list_for_each_entry_safe Geliang Tang
2015-12-18 16:34 ` [PATCH 8/9] usb: gadget: rndis: " Geliang Tang
2015-12-22 18:07 ` Felipe Balbi
2015-12-23 13:51 ` [PATCH 8/9 v2] " Geliang Tang
2015-12-18 16:34 ` [PATCH 9/9] usb: gadget: bcm63xx_udc: " Geliang Tang
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=20151225074128.GA9700@shlinux2 \
--to=hzpeterchen@gmail.com \
--cc=Peter.Chen@freescale.com \
--cc=geliangtang@163.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.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