diff mbox series

net: libwx: Remove variable dev to simplify code

Message ID 20221103071956.17480-1-tangbin@cmss.chinamobile.com (mailing list archive)
State Changes Requested
Delegated to: Netdev Maintainers
Headers show
Series net: libwx: Remove variable dev to simplify code | expand

Checks

Context Check Description
netdev/tree_selection success Guessed tree name to be net-next
netdev/fixes_present success Fixes tag not required for -next series
netdev/subject_prefix warning Target tree name not specified in the subject
netdev/cover_letter success Single patches do not need cover letters
netdev/patch_count success Link
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 0 this patch: 0
netdev/cc_maintainers success CCed 8 of 8 maintainers
netdev/build_clang success Errors and warnings before: 0 this patch: 0
netdev/module_param success Was 0 now: 0
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success No Fixes tag
netdev/build_allmodconfig_warn success Errors and warnings before: 0 this patch: 0
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 14 lines checked
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0

Commit Message

Tang Bin Nov. 3, 2022, 7:19 a.m. UTC
In the function wx_get_pcie_msix_counts(), the variable dev
is redundant, so remove it.

Signed-off-by: Tang Bin <tangbin@cmss.chinamobile.com>
---
 drivers/net/ethernet/wangxun/libwx/wx_hw.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Comments

Jakub Kicinski Nov. 4, 2022, 6:48 p.m. UTC | #1
On Thu,  3 Nov 2022 15:19:56 +0800 Tang Bin wrote:
> In the function wx_get_pcie_msix_counts(), the variable dev
> is redundant, so remove it.

This patch doesn't make any difference.
Please consider not sending similar patches to netdev.
diff mbox series

Patch

diff --git a/drivers/net/ethernet/wangxun/libwx/wx_hw.c b/drivers/net/ethernet/wangxun/libwx/wx_hw.c
index 1eb7388f1..a7d79490e 100644
--- a/drivers/net/ethernet/wangxun/libwx/wx_hw.c
+++ b/drivers/net/ethernet/wangxun/libwx/wx_hw.c
@@ -883,13 +883,12 @@  EXPORT_SYMBOL(wx_reset_misc);
 int wx_get_pcie_msix_counts(struct wx_hw *wxhw, u16 *msix_count, u16 max_msix_count)
 {
 	struct pci_dev *pdev = wxhw->pdev;
-	struct device *dev = &pdev->dev;
 	int pos;
 
 	*msix_count = 1;
 	pos = pci_find_capability(pdev, PCI_CAP_ID_MSIX);
 	if (!pos) {
-		dev_err(dev, "Unable to find MSI-X Capabilities\n");
+		dev_err(&pdev->dev, "Unable to find MSI-X Capabilities\n");
 		return -EINVAL;
 	}
 	pci_read_config_word(pdev,