* [PATCH] NFC: llcp: Use list_for_each_entry in llcp_accept_poll
@ 2014-11-06 10:20 Axel Lin
2014-11-28 12:42 ` Samuel Ortiz
0 siblings, 1 reply; 2+ messages in thread
From: Axel Lin @ 2014-11-06 10:20 UTC (permalink / raw)
To: Samuel Ortiz
Cc: Lauro Ramos Venancio, Aloisio Almeida Jr,
linux-wireless@vger.kernel.org
list_for_each_entry_safe() is necessary if list objects are deleted from
the list while traversing it. Not the case here, so we can use the base
list_for_each_entry variant.
Signed-off-by: Axel Lin <axel.lin@ingics.com>
---
net/nfc/llcp_sock.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/net/nfc/llcp_sock.c b/net/nfc/llcp_sock.c
index 83bc785..e181e29 100644
--- a/net/nfc/llcp_sock.c
+++ b/net/nfc/llcp_sock.c
@@ -524,13 +524,13 @@ static int llcp_sock_getname(struct socket *sock, struct sockaddr *uaddr,
static inline unsigned int llcp_accept_poll(struct sock *parent)
{
- struct nfc_llcp_sock *llcp_sock, *n, *parent_sock;
+ struct nfc_llcp_sock *llcp_sock, *parent_sock;
struct sock *sk;
parent_sock = nfc_llcp_sock(parent);
- list_for_each_entry_safe(llcp_sock, n, &parent_sock->accept_queue,
- accept_queue) {
+ list_for_each_entry(llcp_sock, &parent_sock->accept_queue,
+ accept_queue) {
sk = &llcp_sock->sk;
if (sk->sk_state == LLCP_CONNECTED)
--
1.9.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] NFC: llcp: Use list_for_each_entry in llcp_accept_poll
2014-11-06 10:20 [PATCH] NFC: llcp: Use list_for_each_entry in llcp_accept_poll Axel Lin
@ 2014-11-28 12:42 ` Samuel Ortiz
0 siblings, 0 replies; 2+ messages in thread
From: Samuel Ortiz @ 2014-11-28 12:42 UTC (permalink / raw)
To: Axel Lin
Cc: Lauro Ramos Venancio, Aloisio Almeida Jr,
linux-wireless@vger.kernel.org
Hi Axel,
On Thu, Nov 06, 2014 at 06:20:41PM +0800, Axel Lin wrote:
> list_for_each_entry_safe() is necessary if list objects are deleted from
> the list while traversing it. Not the case here, so we can use the base
> list_for_each_entry variant.
>
> Signed-off-by: Axel Lin <axel.lin@ingics.com>
> ---
> net/nfc/llcp_sock.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
Applied to nfc-next, thanks.
Cheers,
Samuel.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-11-28 12:42 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-11-06 10:20 [PATCH] NFC: llcp: Use list_for_each_entry in llcp_accept_poll Axel Lin
2014-11-28 12:42 ` Samuel Ortiz
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).