cnic: Use union for the status blocks of different devices.
We only need to assign the status block address once and it also saves space in the structure. Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: Benjamin Li <benli@broadcom.com> Signed-off-by: Eddie Wai <waie@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
c76284af9e
commit
a4dde3abbf
@@ -224,9 +224,12 @@ struct cnic_local {
|
||||
u16 kcq_prod_idx;
|
||||
u32 kcq_io_addr;
|
||||
|
||||
void *status_blk;
|
||||
struct status_block_msix *bnx2_status_blk;
|
||||
struct host_status_block *bnx2x_status_blk;
|
||||
union {
|
||||
void *gen;
|
||||
struct status_block_msix *bnx2;
|
||||
struct host_status_block *bnx2x;
|
||||
} status_blk;
|
||||
|
||||
struct host_def_status_block *bnx2x_def_status_blk;
|
||||
|
||||
u32 status_blk_num;
|
||||
|
Reference in New Issue
Block a user