From patchwork Thu Nov 3 07:19:56 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tang Bin X-Patchwork-Id: 14707 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp370781wru; Thu, 3 Nov 2022 00:29:16 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5FEi+qJCxygjfaEAXX4nFZ/uaq1qLcRNmriw4wd+oeT2wHIHg247wYFFtnuxNfViTATjW5 X-Received: by 2002:a17:907:7208:b0:78e:176e:e0c6 with SMTP id dr8-20020a170907720800b0078e176ee0c6mr27759787ejc.594.1667460556813; Thu, 03 Nov 2022 00:29:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667460556; cv=none; d=google.com; s=arc-20160816; b=B5A5pZDIBIUsswhLKZ84FGdkVykWDMTKd38ZEVVtYzXbHAAN+ybEGAIyVZUWb0snyp 2oKXRBBzuxZCOsDlS53YM7/5Y6DJJYV20T6ohqlEhkvZJXT5+vXj2Jl/xs/0RtPRmAW/ 8ljTJikl9GdrLy8+HP33OpH+gm5/dReU29c/SOMfk6fRdQX3urwdCbDFDDaExhAQJ4JA tzDVEXoDBDmomzFGN/AXQyoKT36V3CI1EO/FqS1n02/WERHZaKR7MBj6E/P6tkHdBiHc siD9YXKIPFyR6YGiDamAn6VWUl79EYViaZiHfO7ROgsGBmcSpgOvID3pbZGSq5OgEnTd tIWg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=DGNNggrhJ3Bf0u0jxigo3f+5pPpWzXy30ts69G9uABY=; b=uNFhUopXd6XkaVSoaHQtSsQyeMzkw+dP6xMX5TWpti9ejbeWQ1zx1L/j/evp8+88Qd yKa0DQqywk1OIxeN29fGV5PwPirpRJBd2nmVhTHqKl21QT244vwa+RJIPbDpJGRLZpT4 MMPXJ/V3m2lQnFK/PLlLDs9kou0EiBIGulyDaEsw1HjLLB4XAf6Tbi2M9awqmr9iFAiQ Gj9CDuIqw/AITDZZKU25iKl1VRLdNEh6FuzfDI5mNeiofMgIrM6udISdkBqWnd9IYUs1 YEWR9AnlAfy9CXZ5Rp6jwfZTPKm+O+LmapL8VwXwjQQgjRhsaMT6uhxrn3aZObcByF2D 11oQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c11-20020a05640227cb00b00462846fc76fsi516763ede.108.2022.11.03.00.28.51; Thu, 03 Nov 2022 00:29:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230525AbiKCHT4 (ORCPT + 99 others); Thu, 3 Nov 2022 03:19:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54478 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229699AbiKCHTx (ORCPT ); Thu, 3 Nov 2022 03:19:53 -0400 Received: from cmccmta2.chinamobile.com (cmccmta2.chinamobile.com [221.176.66.80]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id CA6FDFC7; Thu, 3 Nov 2022 00:19:48 -0700 (PDT) X-RM-TagInfo: emlType=0 X-RM-SPAM-FLAG: 00000000 Received: from spf.mail.chinamobile.com (unknown[172.16.121.97]) by rmmx-syy-dmz-app05-12005 (RichMail) with SMTP id 2ee563636b913d6-f6bf7; Thu, 03 Nov 2022 15:19:46 +0800 (CST) X-RM-TRANSID: 2ee563636b913d6-f6bf7 X-RM-TagInfo: emlType=0 X-RM-SPAM-FLAG: 00000000 Received: from localhost.localdomain (unknown[223.108.79.100]) by rmsmtp-syy-appsvrnew09-12034 (RichMail) with SMTP id 2f0263636b8f318-b48e2; Thu, 03 Nov 2022 15:19:45 +0800 (CST) X-RM-TRANSID: 2f0263636b8f318-b48e2 From: Tang Bin To: jiawenwu@trustnetic.com, mengyuanlou@net-swift.com, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Tang Bin Subject: [PATCH] net: libwx: Remove variable dev to simplify code Date: Thu, 3 Nov 2022 15:19:56 +0800 Message-Id: <20221103071956.17480-1-tangbin@cmss.chinamobile.com> X-Mailer: git-send-email 2.20.1.windows.1 MIME-Version: 1.0 X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1748459120829888226?= X-GMAIL-MSGID: =?utf-8?q?1748459120829888226?= In the function wx_get_pcie_msix_counts(), the variable dev is redundant, so remove it. Signed-off-by: Tang Bin --- drivers/net/ethernet/wangxun/libwx/wx_hw.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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,