linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] drivers: net: xgene: Remove unnecessary forward declarations
@ 2018-12-11  4:20 Nathan Chancellor
  2018-12-14 21:35 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Nathan Chancellor @ 2018-12-11  4:20 UTC (permalink / raw)
  To: Iyappan Subramanian, Keyur Chudgar, Quan Nguyen, David S. Miller
  Cc: netdev, linux-kernel, Nathan Chancellor

Clang warns:

drivers/net/ethernet/apm/xgene/xgene_enet_main.c:33:36: warning:
tentative array definition assumed to have one element
static const struct acpi_device_id xgene_enet_acpi_match[];
                                   ^
1 warning generated.

Both xgene_enet_acpi_match and xgene_enet_of_match are defined before
their uses at the bottom of the file so this is unnecessary. When
CONFIG_ACPI is disabled, ACPI_PTR becomes NULL so xgene_enet_acpi_match
doesn't need to be defined.

Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
---
 drivers/net/ethernet/apm/xgene/xgene_enet_main.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/net/ethernet/apm/xgene/xgene_enet_main.c b/drivers/net/ethernet/apm/xgene/xgene_enet_main.c
index 3b889efddf78..50dd6bf176d0 100644
--- a/drivers/net/ethernet/apm/xgene/xgene_enet_main.c
+++ b/drivers/net/ethernet/apm/xgene/xgene_enet_main.c
@@ -29,9 +29,6 @@
 #define RES_RING_CSR	1
 #define RES_RING_CMD	2
 
-static const struct of_device_id xgene_enet_of_match[];
-static const struct acpi_device_id xgene_enet_acpi_match[];
-
 static void xgene_enet_init_bufpool(struct xgene_enet_desc_ring *buf_pool)
 {
 	struct xgene_enet_raw_desc16 *raw_desc;
-- 
2.20.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] drivers: net: xgene: Remove unnecessary forward declarations
  2018-12-11  4:20 [PATCH] drivers: net: xgene: Remove unnecessary forward declarations Nathan Chancellor
@ 2018-12-14 21:35 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2018-12-14 21:35 UTC (permalink / raw)
  To: natechancellor; +Cc: isubramanian, kchudgar, qnguyen, netdev, linux-kernel

From: Nathan Chancellor <natechancellor@gmail.com>
Date: Mon, 10 Dec 2018 21:20:30 -0700

> Clang warns:
> 
> drivers/net/ethernet/apm/xgene/xgene_enet_main.c:33:36: warning:
> tentative array definition assumed to have one element
> static const struct acpi_device_id xgene_enet_acpi_match[];
>                                    ^
> 1 warning generated.
> 
> Both xgene_enet_acpi_match and xgene_enet_of_match are defined before
> their uses at the bottom of the file so this is unnecessary. When
> CONFIG_ACPI is disabled, ACPI_PTR becomes NULL so xgene_enet_acpi_match
> doesn't need to be defined.
> 
> Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>

Applied.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-12-14 21:35 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-11  4:20 [PATCH] drivers: net: xgene: Remove unnecessary forward declarations Nathan Chancellor
2018-12-14 21:35 ` David Miller

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).