igb_uio: cast private data to correct struct type
authorFerruh Yigit <ferruh.yigit@intel.com>
Thu, 3 Mar 2016 17:08:19 +0000 (17:08 +0000)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Mon, 7 Mar 2016 22:27:40 +0000 (23:27 +0100)
commitedc774533f125ef4637e450309bdf14ce8db2a1f
tree04d9e6d3e44758048058fbb51d83094afaae28d2
parentb367a3820d7b683930755d2f8b97e193dfe94c73
igb_uio: cast private data to correct struct type

This was working fine because addresses of two structs are same:

struct A {
struct B b;
} a;

As above sample "a" and "b" has same address.

Now casting private data back to the correct struct type, to the one
stored.

Fixes: af75078fece3 ("first public release")

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
lib/librte_eal/linuxapp/igb_uio/igb_uio.c