diff options
author | Ivan Vecera <cera@cera.cz> | 2018-07-10 16:59:47 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-07-12 03:03:31 -0400 |
commit | 03d231a963ae1179d05f552db75b661d1099272f (patch) | |
tree | e3195ec15a759a0cddc4b726911ff90b4208a625 | |
parent | f9520b86dc22b6ac0ad2926cfa334e9fecb68a12 (diff) |
be2net: re-order fields in be_error_recovert to avoid hole
- Unionize two u8 fields where only one of them is used depending on NIC
chipset.
- Move recovery_supported field after that union
These changes eliminate 7-bytes hole in the struct and makes it smaller
by 8 bytes.
Signed-off-by: Ivan Vecera <cera@cera.cz>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/net/ethernet/emulex/benet/be.h | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/net/ethernet/emulex/benet/be.h b/drivers/net/ethernet/emulex/benet/be.h index d521364e17cf..4f805be43180 100644 --- a/drivers/net/ethernet/emulex/benet/be.h +++ b/drivers/net/ethernet/emulex/benet/be.h | |||
@@ -522,11 +522,13 @@ enum { | |||
522 | }; | 522 | }; |
523 | 523 | ||
524 | struct be_error_recovery { | 524 | struct be_error_recovery { |
525 | /* Lancer error recovery variables */ | 525 | union { |
526 | u8 recovery_retries; | 526 | u8 recovery_retries; /* used for Lancer */ |
527 | u8 recovery_state; /* used for BEx and Skyhawk */ | ||
528 | }; | ||
527 | 529 | ||
528 | /* BEx/Skyhawk error recovery variables */ | 530 | /* BEx/Skyhawk error recovery variables */ |
529 | u8 recovery_state; | 531 | bool recovery_supported; |
530 | u16 ue_to_reset_time; /* Time after UE, to soft reset | 532 | u16 ue_to_reset_time; /* Time after UE, to soft reset |
531 | * the chip - PF0 only | 533 | * the chip - PF0 only |
532 | */ | 534 | */ |
@@ -534,7 +536,6 @@ struct be_error_recovery { | |||
534 | * of SLIPORT_SEMAPHORE reg | 536 | * of SLIPORT_SEMAPHORE reg |
535 | */ | 537 | */ |
536 | u16 last_err_code; | 538 | u16 last_err_code; |
537 | bool recovery_supported; | ||
538 | unsigned long probe_time; | 539 | unsigned long probe_time; |
539 | unsigned long last_recovery_time; | 540 | unsigned long last_recovery_time; |
540 | 541 | ||