netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jesse Brandeburg <jesse.brandeburg@gmail.com>
To: netdev@vger.kernel.org
Cc: Jesse Brandeburg <jesse.brandeburg@gmail.com>,
	intel-wired-lan@lists.osuosl.org,
	Jesse Brandeburg <jesse.brandeburg@intel.com>
Subject: [PATCH net-next v3 4/9] drivers/net/ethernet: rid ethernet of no-prototype warnings
Date: Fri, 25 Sep 2020 15:24:40 -0700	[thread overview]
Message-ID: <20200925222445.74531-5-jesse.brandeburg@gmail.com> (raw)
In-Reply-To: <20200925222445.74531-1-jesse.brandeburg@gmail.com>

From: Jesse Brandeburg <jesse.brandeburg@intel.com>

The W=1 builds showed a few files exporting functions
(non-static) that were not prototyped. What actually happened is
that there were prototypes, but the include file was forgotten in
the implementation file.

Add the include file and remove the warnings.

Fixed Warnings:
drivers/net/ethernet/cavium/liquidio/cn68xx_device.c:124:5: warning: no previous prototype for ‘lio_setup_cn68xx_octeon_device’ [-Wmissing-prototypes]
drivers/net/ethernet/cavium/liquidio/octeon_mem_ops.c:159:1: warning: no previous prototype for ‘octeon_pci_read_core_mem’ [-Wmissing-prototypes]
drivers/net/ethernet/cavium/liquidio/octeon_mem_ops.c:168:1: warning: no previous prototype for ‘octeon_pci_write_core_mem’ [-Wmissing-prototypes]
drivers/net/ethernet/cavium/liquidio/octeon_mem_ops.c:176:5: warning: no previous prototype for ‘octeon_read_device_mem64’ [-Wmissing-prototypes]
drivers/net/ethernet/cavium/liquidio/octeon_mem_ops.c:185:5: warning: no previous prototype for ‘octeon_read_device_mem32’ [-Wmissing-prototypes]
drivers/net/ethernet/cavium/liquidio/octeon_mem_ops.c:194:6: warning: no previous prototype for ‘octeon_write_device_mem32’ [-Wmissing-prototypes]
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_dcb.c:453:6: warning: no previous prototype for ‘hclge_dcb_ops_set’ [-Wmissing-prototypes]

Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
---
v3: add warnings detail
v2: first non-rfc version

Full list of warnings:
drivers/net/ethernet/cavium/liquidio/cn68xx_device.c:124:5: warning: no previous prototype for ‘lio_setup_cn68xx_octeon_device’ [-Wmissing-prototypes]
  124 | int lio_setup_cn68xx_octeon_device(struct octeon_device *oct)
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/ethernet/cavium/liquidio/octeon_mem_ops.c:159:1: warning: no previous prototype for ‘octeon_pci_read_core_mem’ [-Wmissing-prototypes]
  159 | octeon_pci_read_core_mem(struct octeon_device *oct,
      | ^~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/ethernet/cavium/liquidio/octeon_mem_ops.c:168:1: warning: no previous prototype for ‘octeon_pci_write_core_mem’ [-Wmissing-prototypes]
  168 | octeon_pci_write_core_mem(struct octeon_device *oct,
      | ^~~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/ethernet/cavium/liquidio/octeon_mem_ops.c:176:5: warning: no previous prototype for ‘octeon_read_device_mem64’ [-Wmissing-prototypes]
  176 | u64 octeon_read_device_mem64(struct octeon_device *oct, u64 coreaddr)
      |     ^~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/ethernet/cavium/liquidio/octeon_mem_ops.c:185:5: warning: no previous prototype for ‘octeon_read_device_mem32’ [-Wmissing-prototypes]
  185 | u32 octeon_read_device_mem32(struct octeon_device *oct, u64 coreaddr)
      |     ^~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/ethernet/cavium/liquidio/octeon_mem_ops.c:194:6: warning: no previous prototype for ‘octeon_write_device_mem32’ [-Wmissing-prototypes]
  194 | void octeon_write_device_mem32(struct octeon_device *oct, u64 coreaddr,
      |      ^~~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_dcb.c:453:6: warning: no previous prototype for ‘hclge_dcb_ops_set’ [-Wmissing-prototypes]
  453 | void hclge_dcb_ops_set(struct hclge_dev *hdev)
      |      ^~~~~~~~~~~~~~~~~
---
 drivers/net/ethernet/cavium/liquidio/cn68xx_device.c   | 1 +
 drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_dcb.c | 1 +
 2 files changed, 2 insertions(+)

diff --git a/drivers/net/ethernet/cavium/liquidio/cn68xx_device.c b/drivers/net/ethernet/cavium/liquidio/cn68xx_device.c
index cd5d5d6e7e5e..2a6d1cadac9e 100644
--- a/drivers/net/ethernet/cavium/liquidio/cn68xx_device.c
+++ b/drivers/net/ethernet/cavium/liquidio/cn68xx_device.c
@@ -25,6 +25,7 @@
 #include "octeon_main.h"
 #include "cn66xx_regs.h"
 #include "cn66xx_device.h"
+#include "cn68xx_device.h"
 #include "cn68xx_regs.h"
 #include "cn68xx_device.h"
 
diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_dcb.c b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_dcb.c
index f990f6915226..3606240025a8 100644
--- a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_dcb.c
+++ b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_dcb.c
@@ -4,6 +4,7 @@
 #include "hclge_main.h"
 #include "hclge_dcb.h"
 #include "hclge_tm.h"
+#include "hclge_dcb.h"
 #include "hnae3.h"
 
 #define BW_PERCENT	100
-- 
2.25.4


  parent reply	other threads:[~2020-09-25 22:25 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-25 22:24 [PATCH net-next v3 0/9] make drivers/net/ethernet W=1 clean Jesse Brandeburg
2020-09-25 22:24 ` [PATCH net-next v3 1/9] intel-ethernet: clean up W=1 warnings in kdoc Jesse Brandeburg
2020-09-25 22:24 ` [PATCH net-next v3 2/9] intel: handle unused assignments Jesse Brandeburg
2020-09-25 22:24 ` [PATCH net-next v3 3/9] drivers/net/ethernet: clean up " Jesse Brandeburg
2020-09-25 22:24 ` Jesse Brandeburg [this message]
2020-09-25 22:24 ` [PATCH net-next v3 5/9] drivers/net/ethernet: handle one warning explicitly Jesse Brandeburg
2020-09-25 22:24 ` [PATCH net-next v3 6/9] drivers/net/ethernet: add some basic kdoc tags Jesse Brandeburg
2020-09-25 22:24 ` [PATCH net-next v3 7/9] drivers/net/ethernet: remove incorrectly formatted doc Jesse Brandeburg
2020-09-25 22:24 ` [PATCH net-next v3 8/9] sfc: fix kdoc warning Jesse Brandeburg
2020-09-25 22:24 ` [PATCH net-next v3 9/9] drivers/net/ethernet: clean up mis-targeted comments Jesse Brandeburg
2020-09-25 23:31 ` [PATCH net-next v3 0/9] make drivers/net/ethernet W=1 clean David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200925222445.74531-5-jesse.brandeburg@gmail.com \
    --to=jesse.brandeburg@gmail.com \
    --cc=intel-wired-lan@lists.osuosl.org \
    --cc=jesse.brandeburg@intel.com \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).