Flex array is used to allocate hash buckets which is type struct
hlist_head, but we use `struct hlist_head *` to calculate
array size.  Since hlist_head is of size pointer it works fine.

Following patch use correct type.

Signed-off-by: Pravin B Shelar <[email protected]>
---
 datapath/flow.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/datapath/flow.c b/datapath/flow.c
index 7f897bd..8dc0a37 100644
--- a/datapath/flow.c
+++ b/datapath/flow.c
@@ -241,7 +241,7 @@ static struct flex_array *alloc_buckets(unsigned int 
n_buckets)
        struct flex_array *buckets;
        int i, err;
 
-       buckets = flex_array_alloc(sizeof(struct hlist_head *),
+       buckets = flex_array_alloc(sizeof(struct hlist_head),
                                   n_buckets, GFP_KERNEL);
        if (!buckets)
                return NULL;
-- 
1.7.1

_______________________________________________
dev mailing list
[email protected]
http://openvswitch.org/mailman/listinfo/dev

Reply via email to