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

octeontx2-pf: Remove unnecessary synchronize_irq() before free_irq()

Calling synchronize_irq() right before free_irq() is quite useless. On one
hand the IRQ can easily fire again before free_irq() is entered, on the
other hand free_irq() itself calls synchronize_irq() internally (in a race
condition free way), before any state associated with the IRQ is freed.

Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: Minghao Chi <chi.minghao@zte.com.cn>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Minghao Chi and committed by
David S. Miller
d887ae32 b321dfaf

-2
-2
drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c
··· 1718 1718 vec = pci_irq_vector(pf->pdev, 1719 1719 pf->hw.nix_msixoff + NIX_LF_QINT_VEC_START); 1720 1720 otx2_write64(pf, NIX_LF_QINTX_ENA_W1C(0), BIT_ULL(0)); 1721 - synchronize_irq(vec); 1722 1721 free_irq(vec, pf); 1723 1722 err_disable_napi: 1724 1723 otx2_disable_napi(pf); ··· 1761 1762 vec = pci_irq_vector(pf->pdev, 1762 1763 pf->hw.nix_msixoff + NIX_LF_QINT_VEC_START); 1763 1764 otx2_write64(pf, NIX_LF_QINTX_ENA_W1C(0), BIT_ULL(0)); 1764 - synchronize_irq(vec); 1765 1765 free_irq(vec, pf); 1766 1766 1767 1767 /* Cleanup CQ NAPI and IRQ */