Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

bnxt_en: Convert to use netif_level() helpers.

Use the various netif_level() helpers to simplify the C code. This was
suggested by Joe Perches.

Cc: Joe Perches <joe@perches.com>
Signed-off-by: Michael Chan <michael.chan@broadcom.com>
Link: https://lore.kernel.org/r/1611642024-3166-1-git-send-email-michael.chan@broadcom.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

authored by

Michael Chan and committed by
Jakub Kicinski
871127e6 2961f562

+14 -20
+14 -20
drivers/net/ethernet/broadcom/bnxt/bnxt.c
··· 1266 1266 } else { 1267 1267 tpa_info->hash_type = PKT_HASH_TYPE_NONE; 1268 1268 tpa_info->gso_type = 0; 1269 - if (netif_msg_rx_err(bp)) 1270 - netdev_warn(bp->dev, "TPA packet without valid hash\n"); 1269 + netif_warn(bp, rx_err, bp->dev, "TPA packet without valid hash\n"); 1271 1270 } 1272 1271 tpa_info->flags2 = le32_to_cpu(tpa_start1->rx_tpa_start_cmp_flags2); 1273 1272 tpa_info->metadata = le32_to_cpu(tpa_start1->rx_tpa_start_cmp_metadata); ··· 2038 2039 fatal_str = "fatal"; 2039 2040 set_bit(BNXT_STATE_FW_FATAL_COND, &bp->state); 2040 2041 } 2041 - if (netif_msg_hw(bp)) { 2042 - netdev_warn(bp->dev, "Firmware %s reset event, data1: 0x%x, data2: 0x%x, min wait %u ms, max wait %u ms\n", 2043 - fatal_str, data1, data2, 2044 - bp->fw_reset_min_dsecs * 100, 2045 - bp->fw_reset_max_dsecs * 100); 2046 - } 2042 + netif_warn(bp, hw, bp->dev, 2043 + "Firmware %s reset event, data1: 0x%x, data2: 0x%x, min wait %u ms, max wait %u ms\n", 2044 + fatal_str, data1, data2, 2045 + bp->fw_reset_min_dsecs * 100, 2046 + bp->fw_reset_max_dsecs * 100); 2047 2047 set_bit(BNXT_FW_RESET_NOTIFY_SP_EVENT, &bp->sp_event); 2048 2048 break; 2049 2049 } ··· 2057 2059 if (!fw_health->enabled) 2058 2060 break; 2059 2061 2060 - if (netif_msg_drv(bp)) 2061 - netdev_info(bp->dev, "Error recovery info: error recovery[%d], master[%d], reset count[0x%x], health status: 0x%x\n", 2062 - fw_health->enabled, fw_health->master, 2063 - bnxt_fw_health_readl(bp, 2064 - BNXT_FW_RESET_CNT_REG), 2065 - bnxt_fw_health_readl(bp, 2066 - BNXT_FW_HEALTH_REG)); 2062 + netif_info(bp, drv, bp->dev, 2063 + "Error recovery info: error recovery[%d], master[%d], reset count[0x%x], health status: 0x%x\n", 2064 + fw_health->enabled, fw_health->master, 2065 + bnxt_fw_health_readl(bp, BNXT_FW_RESET_CNT_REG), 2066 + bnxt_fw_health_readl(bp, BNXT_FW_HEALTH_REG)); 2067 2067 fw_health->tmr_multiplier = 2068 2068 DIV_ROUND_UP(fw_health->polling_dsecs * HZ, 2069 2069 bp->current_interval * 10); ··· 2073 2077 goto async_event_process_exit; 2074 2078 } 2075 2079 case ASYNC_EVENT_CMPL_EVENT_ID_DEBUG_NOTIFICATION: 2076 - if (netif_msg_hw(bp)) { 2077 - netdev_notice(bp->dev, 2078 - "Received firmware debug notification, data1: 0x%x, data2: 0x%x\n", 2079 - data1, data2); 2080 - } 2080 + netif_notice(bp, hw, bp->dev, 2081 + "Received firmware debug notification, data1: 0x%x, data2: 0x%x\n", 2082 + data1, data2); 2081 2083 goto async_event_process_exit; 2082 2084 case ASYNC_EVENT_CMPL_EVENT_ID_RING_MONITOR_MSG: { 2083 2085 struct bnxt_rx_ring_info *rxr;