1
0
Fork 0
mirror of synced 2025-03-06 20:59:54 +01:00
linux/drivers/net/ethernet/qlogic/qlcnic
Christophe JAILLET a72dc1992d qlcnic: Simplify DMA setting
As stated in [1], dma_set_mask() with a 64-bit mask will never fail if
dev->dma_mask is non-NULL.
So, if it fails, the 32 bits case will also fail for the same reason.

So qlcnic_set_dma_mask(), (in qlcnic_main.c) can be simplified a lot and
inlined directly in its only caller.

If dma_set_mask_and_coherent() succeeds, 'pci_using_dac' is known to be 1.
So it can be removed from all the calling chain.

qlcnic_setup_netdev() can finally be simplified as-well.

[1]: https://lkml.org/lkml/2021/6/7/398

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Link: https://lore.kernel.org/r/4996ab0337d62ec6a54b2edf234cd5ced4b4d7ad.1641649611.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2022-01-09 16:52:18 -08:00
..
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
qlcnic.h qlcnic: Simplify DMA setting 2022-01-09 16:52:18 -08:00
qlcnic_83xx_hw.c net: qlogic: qlcnic: Fix a NULL pointer dereference in qlcnic_83xx_add_rings() 2021-12-01 18:51:36 -08:00
qlcnic_83xx_hw.h qlcnic: Simplify DMA setting 2022-01-09 16:52:18 -08:00
qlcnic_83xx_init.c qlcnic: Simplify DMA setting 2022-01-09 16:52:18 -08:00
qlcnic_83xx_vnic.c net: calxeda: Fix wrong function name in comments 2021-05-17 14:12:39 -07:00
qlcnic_ctx.c net/qlcnic: Convert to SPDX license identifiers 2020-09-16 14:32:10 +02:00
qlcnic_dcb.c net/qlcnic: Convert to SPDX license identifiers 2020-09-16 14:32:10 +02:00
qlcnic_dcb.h net/qlcnic: Convert to SPDX license identifiers 2020-09-16 14:32:10 +02:00
qlcnic_ethtool.c ethtool: extend ringparam setting/getting API with rx_buf_len 2021-11-22 12:31:49 +00:00
qlcnic_hdr.h net/qlcnic: Convert to SPDX license identifiers 2020-09-16 14:32:10 +02:00
qlcnic_hw.c ethernet/qlogic: Use list_for_each_entry() to simplify code in qlcnic_hw.c 2021-06-08 16:31:25 -07:00
qlcnic_hw.h qlcnic: Remove the repeated declaration 2021-06-01 15:25:46 -07:00
qlcnic_init.c qlcnic: Remove redundant unlock in qlcnic_pinit_from_rom 2021-09-04 10:50:59 +01:00
qlcnic_io.c qlcnic: switch from 'pci_' to 'dma_' API 2021-08-23 12:02:29 +01:00
qlcnic_main.c qlcnic: Simplify DMA setting 2022-01-09 16:52:18 -08:00
qlcnic_minidump.c net/qlcnic: Fix a use after free in qlcnic_83xx_get_minidump_template 2021-03-11 18:08:14 -08:00
qlcnic_sriov.h qlcnic: Simplify DMA setting 2022-01-09 16:52:18 -08:00
qlcnic_sriov_common.c qlcnic: Simplify DMA setting 2022-01-09 16:52:18 -08:00
qlcnic_sriov_pf.c qlcnic: potential dereference null pointer of rx_queue->page_ring 2021-12-18 12:37:12 +00:00
qlcnic_sysfs.c net/qlcnic: Convert to SPDX license identifiers 2020-09-16 14:32:10 +02:00