Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1294962 > unrolled thread
| Started by | Geliang Tang <geliangtang@163.com> |
|---|---|
| First post | 2015-12-18 16:40 +0100 |
| Last post | 2015-12-18 16:40 +0100 |
| Articles | 1 — 1 participant |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
[PATCH 11/14] openvswitch: use list_for_each_entry Geliang Tang <geliangtang@163.com> - 2015-12-18 16:40 +0100
| From | Geliang Tang <geliangtang@163.com> |
|---|---|
| Date | 2015-12-18 16:40 +0100 |
| Subject | [PATCH 11/14] openvswitch: use list_for_each_entry |
| Message-ID | <qH5ip-7rE-7@gated-at.bofh.it> |
Use list_for_each_entry() instead of list_for_each() to simplify
the code.
Signed-off-by: Geliang Tang <geliangtang@163.com>
---
net/openvswitch/flow_table.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/net/openvswitch/flow_table.c b/net/openvswitch/flow_table.c
index d073fff..9b5999ba 100644
--- a/net/openvswitch/flow_table.c
+++ b/net/openvswitch/flow_table.c
@@ -651,11 +651,9 @@ static bool mask_equal(const struct sw_flow_mask *a,
static struct sw_flow_mask *flow_mask_find(const struct flow_table *tbl,
const struct sw_flow_mask *mask)
{
- struct list_head *ml;
+ struct sw_flow_mask *m;
- list_for_each(ml, &tbl->mask_list) {
- struct sw_flow_mask *m;
- m = container_of(ml, struct sw_flow_mask, list);
+ list_for_each_entry(m, &tbl->mask_list, list) {
if (mask_equal(mask, m))
return m;
}
--
2.5.0
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to top | Article view | linux.kernel
csiph-web