net: aquantia: use macros for better visibility
authorIgor Russkikh <Igor.Russkikh@aquantia.com>
Mon, 29 Apr 2019 10:04:52 +0000 (10:04 +0000)
committerDavid S. Miller <davem@davemloft.net>
Wed, 1 May 2019 13:30:15 +0000 (09:30 -0400)
Improve for better readability

Signed-off-by: Nikita Danilov <ndanilov@aquantia.com>
Signed-off-by: Igor Russkikh <igor.russkikh@aquantia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_a0.c
drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_b0.c

index 65ffaa7ad69e402dcb973a73271f869bff88403d..9fe507fe2d7f5986545c0c144381781554753bf2 100644 (file)
@@ -350,10 +350,10 @@ err_exit:
 static int hw_atl_a0_hw_init(struct aq_hw_s *self, u8 *mac_addr)
 {
        static u32 aq_hw_atl_igcr_table_[4][2] = {
-               { 0x20000000U, 0x20000000U }, /* AQ_IRQ_INVALID */
-               { 0x20000080U, 0x20000080U }, /* AQ_IRQ_LEGACY */
-               { 0x20000021U, 0x20000025U }, /* AQ_IRQ_MSI */
-               { 0x20000022U, 0x20000026U }  /* AQ_IRQ_MSIX */
+               [AQ_HW_IRQ_INVALID] = { 0x20000000U, 0x20000000U },
+               [AQ_HW_IRQ_LEGACY]  = { 0x20000080U, 0x20000080U },
+               [AQ_HW_IRQ_MSI]     = { 0x20000021U, 0x20000025U },
+               [AQ_HW_IRQ_MSIX]    = { 0x20000022U, 0x20000026U },
        };
 
        int err = 0;
index d54566bab0e94850f326e71186d3f76281efec8b..bfcda12d73de5e57082df004ace2208de46f1d03 100644 (file)
@@ -388,10 +388,10 @@ err_exit:
 static int hw_atl_b0_hw_init(struct aq_hw_s *self, u8 *mac_addr)
 {
        static u32 aq_hw_atl_igcr_table_[4][2] = {
-               { 0x20000000U, 0x20000000U }, /* AQ_IRQ_INVALID */
-               { 0x20000080U, 0x20000080U }, /* AQ_IRQ_LEGACY */
-               { 0x20000021U, 0x20000025U }, /* AQ_IRQ_MSI */
-               { 0x20000022U, 0x20000026U }  /* AQ_IRQ_MSIX */
+               [AQ_HW_IRQ_INVALID] = { 0x20000000U, 0x20000000U },
+               [AQ_HW_IRQ_LEGACY]  = { 0x20000080U, 0x20000080U },
+               [AQ_HW_IRQ_MSI]     = { 0x20000021U, 0x20000025U },
+               [AQ_HW_IRQ_MSIX]    = { 0x20000022U, 0x20000026U },
        };
 
        int err = 0;