2024-05-26 17:25:55

by Dr. David Alan Gilbert

[permalink] [raw]
Subject: [PATCH 0/4] net: ethernet: dead struct removals

From: "Dr. David Alan Gilbert" <[email protected]>

Hi,
This removes a bunch of dead struct's from drivers/net/ethernet.
Note the ne2k-pci one is marked obsolete so you might not want
to apply it; but since I'd already done it by the time checkpatch
told me, I included it on the end of the set.

Build tested only.

Signed-off-by: Dr. David Alan Gilbert <[email protected]>


Dr. David Alan Gilbert (4):
net: ethernet: starfire: remove unused structs
net: ethernet: liquidio: remove unused structs
net: ethernet: mlx4: remove unused struct 'mlx4_port_config'
net: ethernet: 8390: ne2k-pci: remove unused struct 'ne2k_pci_card'

drivers/net/ethernet/8390/ne2k-pci.c | 11 -----------
drivers/net/ethernet/adaptec/starfire.c | 8 --------
drivers/net/ethernet/cavium/liquidio/lio_main.c | 6 ------
drivers/net/ethernet/cavium/liquidio/octeon_droq.c | 5 -----
drivers/net/ethernet/mellanox/mlx4/main.c | 6 ------
5 files changed, 36 deletions(-)

--
2.45.1



2024-05-26 17:25:58

by Dr. David Alan Gilbert

[permalink] [raw]
Subject: [PATCH 1/4] net: ethernet: starfire: remove unused structs

From: "Dr. David Alan Gilbert" <[email protected]>

'short_rx_done_desc' and 'basic_rx_done_desc' are unused since
commit fdecea66687d (" [netdrvr starfire] Add GPL'd firmware, remove
compat code").

Remove them.

Signed-off-by: Dr. David Alan Gilbert <[email protected]>
---
drivers/net/ethernet/adaptec/starfire.c | 8 --------
1 file changed, 8 deletions(-)

diff --git a/drivers/net/ethernet/adaptec/starfire.c b/drivers/net/ethernet/adaptec/starfire.c
index 857361c74f5d..e1b8794b14c9 100644
--- a/drivers/net/ethernet/adaptec/starfire.c
+++ b/drivers/net/ethernet/adaptec/starfire.c
@@ -441,14 +441,6 @@ enum rx_desc_bits {
};

/* Completion queue entry. */
-struct short_rx_done_desc {
- __le32 status; /* Low 16 bits is length. */
-};
-struct basic_rx_done_desc {
- __le32 status; /* Low 16 bits is length. */
- __le16 vlanid;
- __le16 status2;
-};
struct csum_rx_done_desc {
__le32 status; /* Low 16 bits is length. */
__le16 csum; /* Partial checksum */
--
2.45.1


2024-05-26 17:26:28

by Dr. David Alan Gilbert

[permalink] [raw]
Subject: [PATCH 2/4] net: ethernet: liquidio: remove unused structs

From: "Dr. David Alan Gilbert" <[email protected]>

'niclist' and 'oct_link_status_resp' are unused since the original
commit f21fb3ed364b ("Add support of Cavium Liquidio ethernet
adapters").

Remove them.

Signed-off-by: Dr. David Alan Gilbert <[email protected]>
---
drivers/net/ethernet/cavium/liquidio/lio_main.c | 6 ------
drivers/net/ethernet/cavium/liquidio/octeon_droq.c | 5 -----
2 files changed, 11 deletions(-)

diff --git a/drivers/net/ethernet/cavium/liquidio/lio_main.c b/drivers/net/ethernet/cavium/liquidio/lio_main.c
index 34f02a8ec2ca..1d79f6eaa41f 100644
--- a/drivers/net/ethernet/cavium/liquidio/lio_main.c
+++ b/drivers/net/ethernet/cavium/liquidio/lio_main.c
@@ -92,12 +92,6 @@ static int octeon_console_debug_enabled(u32 console)
/* time to wait for possible in-flight requests in milliseconds */
#define WAIT_INFLIGHT_REQUEST msecs_to_jiffies(1000)

-struct oct_link_status_resp {
- u64 rh;
- struct oct_link_info link_info;
- u64 status;
-};
-
struct oct_timestamp_resp {
u64 rh;
u64 timestamp;
diff --git a/drivers/net/ethernet/cavium/liquidio/octeon_droq.c b/drivers/net/ethernet/cavium/liquidio/octeon_droq.c
index 0d6ee30affb9..eef12fdd246d 100644
--- a/drivers/net/ethernet/cavium/liquidio/octeon_droq.c
+++ b/drivers/net/ethernet/cavium/liquidio/octeon_droq.c
@@ -30,11 +30,6 @@
#include "cn23xx_pf_device.h"
#include "cn23xx_vf_device.h"

-struct niclist {
- struct list_head list;
- void *ptr;
-};
-
struct __dispatch {
struct list_head list;
struct octeon_recv_info *rinfo;
--
2.45.1


2024-05-26 17:26:46

by Dr. David Alan Gilbert

[permalink] [raw]
Subject: [PATCH 3/4] net: ethernet: mlx4: remove unused struct 'mlx4_port_config'

From: "Dr. David Alan Gilbert" <[email protected]>

'mlx4_port_config was added by
commit ab9c17a009ee ("mlx4_core: Modify driver initialization flow to
accommodate SRIOV for Ethernet")
but remained unused.

Remove it.

Signed-off-by: Dr. David Alan Gilbert <[email protected]>
---
drivers/net/ethernet/mellanox/mlx4/main.c | 6 ------
1 file changed, 6 deletions(-)

diff --git a/drivers/net/ethernet/mellanox/mlx4/main.c b/drivers/net/ethernet/mellanox/mlx4/main.c
index 98688e4dbec5..febeadfdd5a5 100644
--- a/drivers/net/ethernet/mellanox/mlx4/main.c
+++ b/drivers/net/ethernet/mellanox/mlx4/main.c
@@ -169,12 +169,6 @@ module_param_array(port_type_array, int, &arr_argc, 0444);
MODULE_PARM_DESC(port_type_array, "Array of port types: HW_DEFAULT (0) is default "
"1 for IB, 2 for Ethernet");

-struct mlx4_port_config {
- struct list_head list;
- enum mlx4_port_type port_type[MLX4_MAX_PORTS + 1];
- struct pci_dev *pdev;
-};
-
static atomic_t pf_loading = ATOMIC_INIT(0);

static int mlx4_devlink_ierr_reset_get(struct devlink *devlink, u32 id,
--
2.45.1


2024-05-26 17:27:05

by Dr. David Alan Gilbert

[permalink] [raw]
Subject: [PATCH 4/4] net: ethernet: 8390: ne2k-pci: remove unused struct 'ne2k_pci_card'

From: "Dr. David Alan Gilbert" <[email protected]>

'ne2k_pci_card' is unused since 2.3.99-pre3 in March 2000.

Remove it.

Signed-off-by: Dr. David Alan Gilbert <[email protected]>
---
drivers/net/ethernet/8390/ne2k-pci.c | 11 -----------
1 file changed, 11 deletions(-)

diff --git a/drivers/net/ethernet/8390/ne2k-pci.c b/drivers/net/ethernet/8390/ne2k-pci.c
index 65f56a98c0a0..1a34da07c0db 100644
--- a/drivers/net/ethernet/8390/ne2k-pci.c
+++ b/drivers/net/ethernet/8390/ne2k-pci.c
@@ -186,17 +186,6 @@ static void ne2k_pci_block_output(struct net_device *dev, const int count,
static const struct ethtool_ops ne2k_pci_ethtool_ops;


-
-/* There is no room in the standard 8390 structure for extra info we need,
- * so we build a meta/outer-wrapper structure..
- */
-struct ne2k_pci_card {
- struct net_device *dev;
- struct pci_dev *pci_dev;
-};
-
-
-
/* NEx000-clone boards have a Station Address (SA) PROM (SAPROM) in the packet
* buffer memory space. By-the-spec NE2000 clones have 0x57,0x57 in bytes
* 0x0e,0x0f of the SAPROM, while other supposed NE2000 clones must be
--
2.45.1


2024-05-27 05:30:07

by Tariq Toukan

[permalink] [raw]
Subject: Re: [PATCH 3/4] net: ethernet: mlx4: remove unused struct 'mlx4_port_config'



On 26/05/2024 20:24, [email protected] wrote:
> From: "Dr. David Alan Gilbert" <[email protected]>
>
> 'mlx4_port_config was added by
> commit ab9c17a009ee ("mlx4_core: Modify driver initialization flow to
> accommodate SRIOV for Ethernet")
> but remained unused.
>
> Remove it.
>
> Signed-off-by: Dr. David Alan Gilbert <[email protected]>
> ---
> drivers/net/ethernet/mellanox/mlx4/main.c | 6 ------
> 1 file changed, 6 deletions(-)
>
> diff --git a/drivers/net/ethernet/mellanox/mlx4/main.c b/drivers/net/ethernet/mellanox/mlx4/main.c
> index 98688e4dbec5..febeadfdd5a5 100644
> --- a/drivers/net/ethernet/mellanox/mlx4/main.c
> +++ b/drivers/net/ethernet/mellanox/mlx4/main.c
> @@ -169,12 +169,6 @@ module_param_array(port_type_array, int, &arr_argc, 0444);
> MODULE_PARM_DESC(port_type_array, "Array of port types: HW_DEFAULT (0) is default "
> "1 for IB, 2 for Ethernet");
>
> -struct mlx4_port_config {
> - struct list_head list;
> - enum mlx4_port_type port_type[MLX4_MAX_PORTS + 1];
> - struct pci_dev *pdev;
> -};
> -
> static atomic_t pf_loading = ATOMIC_INIT(0);
>
> static int mlx4_devlink_ierr_reset_get(struct devlink *devlink, u32 id,

Reviewed-by: Tariq Toukan <[email protected]>

Thanks for your patch.

2024-05-28 13:31:50

by patchwork-bot+netdevbpf

[permalink] [raw]
Subject: Re: [PATCH 0/4] net: ethernet: dead struct removals

Hello:

This series was applied to netdev/net-next.git (main)
by Paolo Abeni <[email protected]>:

On Sun, 26 May 2024 18:24:24 +0100 you wrote:
> From: "Dr. David Alan Gilbert" <[email protected]>
>
> Hi,
> This removes a bunch of dead struct's from drivers/net/ethernet.
> Note the ne2k-pci one is marked obsolete so you might not want
> to apply it; but since I'd already done it by the time checkpatch
> told me, I included it on the end of the set.
>
> [...]

Here is the summary with links:
- [1/4] net: ethernet: starfire: remove unused structs
https://git.kernel.org/netdev/net-next/c/b2ff2698508f
- [2/4] net: ethernet: liquidio: remove unused structs
https://git.kernel.org/netdev/net-next/c/a09892f6e281
- [3/4] net: ethernet: mlx4: remove unused struct 'mlx4_port_config'
https://git.kernel.org/netdev/net-next/c/ef7f9febb33d
- [4/4] net: ethernet: 8390: ne2k-pci: remove unused struct 'ne2k_pci_card'
https://git.kernel.org/netdev/net-next/c/18ae4c093cd2

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html