* [PATCH net-next] net: fman: Remove some unused fields in some structure
@ 2024-04-02 18:55 Christophe JAILLET
2024-04-02 19:06 ` Sean Anderson
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Christophe JAILLET @ 2024-04-02 18:55 UTC (permalink / raw)
To: Madalin Bucur, Sean Anderson, David S. Miller, Eric Dumazet,
Jakub Kicinski, Paolo Abeni
Cc: linux-kernel, kernel-janitors, Christophe JAILLET, netdev
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;
};
--
2.44.0
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH net-next] net: fman: Remove some unused fields in some structure
2024-04-02 18:55 [PATCH net-next] net: fman: Remove some unused fields in some structure Christophe JAILLET
@ 2024-04-02 19:06 ` Sean Anderson
2024-04-03 15:28 ` Simon Horman
2024-04-04 2:50 ` patchwork-bot+netdevbpf
2 siblings, 0 replies; 4+ messages in thread
From: Sean Anderson @ 2024-04-02 19:06 UTC (permalink / raw)
To: Christophe JAILLET, Madalin Bucur, David S. Miller, Eric Dumazet,
Jakub Kicinski, Paolo Abeni
Cc: linux-kernel, kernel-janitors, netdev
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>
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH net-next] net: fman: Remove some unused fields in some structure
2024-04-02 18:55 [PATCH net-next] net: fman: Remove some unused fields in some structure Christophe JAILLET
2024-04-02 19:06 ` Sean Anderson
@ 2024-04-03 15:28 ` Simon Horman
2024-04-04 2:50 ` patchwork-bot+netdevbpf
2 siblings, 0 replies; 4+ messages in thread
From: Simon Horman @ 2024-04-03 15:28 UTC (permalink / raw)
To: Christophe JAILLET
Cc: Madalin Bucur, Sean Anderson, David S. Miller, Eric Dumazet,
Jakub Kicinski, Paolo Abeni, linux-kernel, kernel-janitors,
netdev
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>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH net-next] net: fman: Remove some unused fields in some structure
2024-04-02 18:55 [PATCH net-next] net: fman: Remove some unused fields in some structure Christophe JAILLET
2024-04-02 19:06 ` Sean Anderson
2024-04-03 15:28 ` Simon Horman
@ 2024-04-04 2:50 ` patchwork-bot+netdevbpf
2 siblings, 0 replies; 4+ messages in thread
From: patchwork-bot+netdevbpf @ 2024-04-04 2:50 UTC (permalink / raw)
To: Christophe JAILLET
Cc: madalin.bucur, sean.anderson, davem, edumazet, kuba, pabeni,
linux-kernel, kernel-janitors, netdev
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!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2024-04-04 2:50 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-04-02 18:55 [PATCH net-next] net: fman: Remove some unused fields in some structure Christophe JAILLET
2024-04-02 19:06 ` Sean Anderson
2024-04-03 15:28 ` Simon Horman
2024-04-04 2:50 ` patchwork-bot+netdevbpf
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).