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>] [day] [month] [year] [list]
Message-Id: <f2acb79a4aac758540b24981b71f278091e1acc1.1448453885.git.geliangtang@163.com>
Date:	Wed, 25 Nov 2015 20:37:36 +0800
From:	Geliang Tang <geliangtang@....com>
To:	Sudip Mukherjee <sudipm.mukherjee@...il.com>
Cc:	Geliang Tang <geliangtang@....com>, linux-kernel@...r.kernel.org
Subject: [PATCH] parport: use list_first_entry

To make the intention clearer, use list_first_entry instead of list_entry.

Signed-off-by: Geliang Tang <geliangtang@....com>
---
 drivers/parport/parport_pc.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/parport/parport_pc.c b/drivers/parport/parport_pc.c
index 78530d1..3bbe641 100644
--- a/drivers/parport/parport_pc.c
+++ b/drivers/parport/parport_pc.c
@@ -3340,8 +3340,8 @@ static void __exit parport_pc_exit(void)
 		struct parport_pc_private *priv;
 		struct parport *port;
 		struct device *dev;
-		priv = list_entry(ports_list.next,
-				  struct parport_pc_private, list);
+		priv = list_first_entry(&ports_list,
+					struct parport_pc_private, list);
 		port = priv->port;
 		dev = port->dev;
 		parport_pc_unregister_port(port);
-- 
2.5.0


--
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