mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 19:30:30 +09:00
bnxt_en: Remove unnecessary NULL checks for fw_health
[ Upstream commit 0797c10d2d ]
After fixing the allocation of bp->fw_health in the previous patch,
the driver will not go through the fw reset and recovery code paths
if bp->fw_health allocation fails. So we can now remove the
unnecessary NULL checks.
Signed-off-by: Vasundhara Volam <vasundhara-v.volam@broadcom.com>
Signed-off-by: Michael Chan <michael.chan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
3f750698a0
commit
02aa518984
@@ -9953,8 +9953,7 @@ static void bnxt_fw_health_check(struct bnxt *bp)
|
||||
struct bnxt_fw_health *fw_health = bp->fw_health;
|
||||
u32 val;
|
||||
|
||||
if (!fw_health || !fw_health->enabled ||
|
||||
test_bit(BNXT_STATE_IN_FW_RESET, &bp->state))
|
||||
if (!fw_health->enabled || test_bit(BNXT_STATE_IN_FW_RESET, &bp->state))
|
||||
return;
|
||||
|
||||
if (fw_health->tmr_counter) {
|
||||
@@ -10697,8 +10696,7 @@ static void bnxt_fw_reset_task(struct work_struct *work)
|
||||
bnxt_queue_fw_reset_work(bp, bp->fw_reset_min_dsecs * HZ / 10);
|
||||
return;
|
||||
case BNXT_FW_RESET_STATE_ENABLE_DEV:
|
||||
if (test_bit(BNXT_STATE_FW_FATAL_COND, &bp->state) &&
|
||||
bp->fw_health) {
|
||||
if (test_bit(BNXT_STATE_FW_FATAL_COND, &bp->state)) {
|
||||
u32 val;
|
||||
|
||||
val = bnxt_fw_health_readl(bp,
|
||||
|
||||
@@ -19,11 +19,10 @@ static int bnxt_fw_reporter_diagnose(struct devlink_health_reporter *reporter,
|
||||
struct devlink_fmsg *fmsg)
|
||||
{
|
||||
struct bnxt *bp = devlink_health_reporter_priv(reporter);
|
||||
struct bnxt_fw_health *health = bp->fw_health;
|
||||
u32 val, health_status;
|
||||
int rc;
|
||||
|
||||
if (!health || test_bit(BNXT_STATE_IN_FW_RESET, &bp->state))
|
||||
if (test_bit(BNXT_STATE_IN_FW_RESET, &bp->state))
|
||||
return 0;
|
||||
|
||||
val = bnxt_fw_health_readl(bp, BNXT_FW_HEALTH_REG);
|
||||
@@ -162,9 +161,6 @@ void bnxt_devlink_health_report(struct bnxt *bp, unsigned long event)
|
||||
struct bnxt_fw_health *fw_health = bp->fw_health;
|
||||
struct bnxt_fw_reporter_ctx fw_reporter_ctx;
|
||||
|
||||
if (!fw_health)
|
||||
return;
|
||||
|
||||
fw_reporter_ctx.sp_event = event;
|
||||
switch (event) {
|
||||
case BNXT_FW_RESET_NOTIFY_SP_EVENT:
|
||||
|
||||
Reference in New Issue
Block a user