lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20151225074128.GA9700@shlinux2>
Date:	Fri, 25 Dec 2015 15:41:28 +0800
From:	Peter Chen <hzpeterchen@...il.com>
To:	Geliang Tang <geliangtang@....com>
Cc:	Peter Chen <Peter.Chen@...escale.com>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	linux-usb@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 6/9] usb: chipidea: debug: use list_for_each_entry

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@....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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ