diff mbox series

[net-next] net: fman: Remove some unused fields in some structure

Message ID 425222d4f6c584e8316ccb7b2ef415a85c96e455.1712084103.git.christophe.jaillet@wanadoo.fr (mailing list archive)
State Accepted
Commit 04af1d64370180f362b48154d42b299be513884f
Delegated to: Netdev Maintainers
Headers show
Series [net-next] net: fman: Remove some unused fields in some structure | expand

Checks

Context Check Description
netdev/series_format success Single patches do not need cover letters
netdev/tree_selection success Clearly marked for net-next
netdev/ynl success Generated files up to date; no warnings/errors; no diff in generated;
netdev/fixes_present success Fixes tag not required for -next series
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 943 this patch: 943
netdev/build_tools success No tools touched, skip
netdev/cc_maintainers success CCed 6 of 6 maintainers
netdev/build_clang success Errors and warnings before: 954 this patch: 954
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/deprecated_api success None detected
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: 954 this patch: 954
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 14 lines checked
netdev/build_clang_rust success No Rust files in patch. Skipping build
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0
netdev/contest success net-next-2024-04-03--09-00 (tests: 950)

Commit Message

Christophe JAILLET April 2, 2024, 6:55 p.m. UTC
In "struct muram_info", the 'size' field is unused.
In "struct memac_cfg", the 'fixed_link' field is unused.

Remove them.

Found with cppcheck, unusedStructMember.

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
---
Compile tested only.

For fman_memac.c, I think that it is a left-over from commit 5d93cfcf7360
("net: dpaa: Convert to phylink").
Maybe, #include <linux/phy_fixed.h> can be removed too, but it is not the
purpose of this patch.
---
 drivers/net/ethernet/freescale/fman/fman_memac.c | 1 -
 drivers/net/ethernet/freescale/fman/fman_muram.c | 1 -
 2 files changed, 2 deletions(-)

Comments

Sean Anderson April 2, 2024, 7:06 p.m. UTC | #1
On 4/2/24 14:55, Christophe JAILLET wrote:
> In "struct muram_info", the 'size' field is unused.
> In "struct memac_cfg", the 'fixed_link' field is unused.
>
> Remove them.
>
> Found with cppcheck, unusedStructMember.
>
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
> ---
> Compile tested only.
>
> For fman_memac.c, I think that it is a left-over from commit 5d93cfcf7360
> ("net: dpaa: Convert to phylink").
> Maybe, #include <linux/phy_fixed.h> can be removed too, but it is not the
> purpose of this patch.
> ---
>  drivers/net/ethernet/freescale/fman/fman_memac.c | 1 -
>  drivers/net/ethernet/freescale/fman/fman_muram.c | 1 -
>  2 files changed, 2 deletions(-)
>
> diff --git a/drivers/net/ethernet/freescale/fman/fman_memac.c b/drivers/net/ethernet/freescale/fman/fman_memac.c
> index 758535adc9ff..92b8f4ab26f1 100644
> --- a/drivers/net/ethernet/freescale/fman/fman_memac.c
> +++ b/drivers/net/ethernet/freescale/fman/fman_memac.c
> @@ -267,7 +267,6 @@ struct memac_cfg {
>       bool reset_on_init;
>       bool pause_ignore;
>       bool promiscuous_mode_enable;
> -     struct fixed_phy_status *fixed_link;
>       u16 max_frame_length;
>       u16 pause_quanta;
>       u32 tx_ipg_length;
> diff --git a/drivers/net/ethernet/freescale/fman/fman_muram.c b/drivers/net/ethernet/freescale/fman/fman_muram.c
> index f557d68e5b76..1ed245a2ee01 100644
> --- a/drivers/net/ethernet/freescale/fman/fman_muram.c
> +++ b/drivers/net/ethernet/freescale/fman/fman_muram.c
> @@ -12,7 +12,6 @@
>  struct muram_info {
>       struct gen_pool *pool;
>       void __iomem *vbase;
> -     size_t size;
>       phys_addr_t pbase;
>  };
>

Reviewed-by: Sean Anderson <sean.anderson@seco.com>

[Embedded World 2024, SECO SpA]<https://www.messe-ticket.de/Nuernberg/embeddedworld2024/Register/ew24517689>
Simon Horman April 3, 2024, 3:28 p.m. UTC | #2
On Tue, Apr 02, 2024 at 08:55:50PM +0200, Christophe JAILLET wrote:
> In "struct muram_info", the 'size' field is unused.
> In "struct memac_cfg", the 'fixed_link' field is unused.
> 
> Remove them.
> 
> Found with cppcheck, unusedStructMember.
> 
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>

Reviewed-by: Simon Horman <horms@kernel.org>
patchwork-bot+netdevbpf@kernel.org April 4, 2024, 2:50 a.m. UTC | #3
Hello:

This patch was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel.org>:

On Tue,  2 Apr 2024 20:55:50 +0200 you wrote:
> In "struct muram_info", the 'size' field is unused.
> In "struct memac_cfg", the 'fixed_link' field is unused.
> 
> Remove them.
> 
> Found with cppcheck, unusedStructMember.
> 
> [...]

Here is the summary with links:
  - [net-next] net: fman: Remove some unused fields in some structure
    https://git.kernel.org/netdev/net-next/c/04af1d643701

You are awesome, thank you!
diff mbox series

Patch

diff --git a/drivers/net/ethernet/freescale/fman/fman_memac.c b/drivers/net/ethernet/freescale/fman/fman_memac.c
index 758535adc9ff..92b8f4ab26f1 100644
--- a/drivers/net/ethernet/freescale/fman/fman_memac.c
+++ b/drivers/net/ethernet/freescale/fman/fman_memac.c
@@ -267,7 +267,6 @@  struct memac_cfg {
 	bool reset_on_init;
 	bool pause_ignore;
 	bool promiscuous_mode_enable;
-	struct fixed_phy_status *fixed_link;
 	u16 max_frame_length;
 	u16 pause_quanta;
 	u32 tx_ipg_length;
diff --git a/drivers/net/ethernet/freescale/fman/fman_muram.c b/drivers/net/ethernet/freescale/fman/fman_muram.c
index f557d68e5b76..1ed245a2ee01 100644
--- a/drivers/net/ethernet/freescale/fman/fman_muram.c
+++ b/drivers/net/ethernet/freescale/fman/fman_muram.c
@@ -12,7 +12,6 @@ 
 struct muram_info {
 	struct gen_pool *pool;
 	void __iomem *vbase;
-	size_t size;
 	phys_addr_t pbase;
 };