* [PATCH] net: ksz884x: Remove the unused function port_cfg_force_flow_ctrl()
@ 2022-12-12 3:53 Jiapeng Chong
2022-12-12 8:41 ` Leon Romanovsky
0 siblings, 1 reply; 2+ messages in thread
From: Jiapeng Chong @ 2022-12-12 3:53 UTC (permalink / raw)
To: davem
Cc: kuba, pabeni, sumit.semwal, christian.koenig, netdev,
linux-kernel, linux-media, dri-devel, linaro-mm-sig,
Jiapeng Chong, Abaci Robot
The function port_cfg_force_flow_ctrl() is defined in the ksz884x.c file,
but not called elsewhere, so remove this unused function.
drivers/net/ethernet/micrel/ksz884x.c:2212:20: warning: unused function 'port_cfg_force_flow_ctrl'.
Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=3418
Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
---
drivers/net/ethernet/micrel/ksz884x.c | 6 ------
1 file changed, 6 deletions(-)
diff --git a/drivers/net/ethernet/micrel/ksz884x.c b/drivers/net/ethernet/micrel/ksz884x.c
index e6acd1e7b263..46f1fbf58b5a 100644
--- a/drivers/net/ethernet/micrel/ksz884x.c
+++ b/drivers/net/ethernet/micrel/ksz884x.c
@@ -2209,12 +2209,6 @@ static inline void port_cfg_back_pressure(struct ksz_hw *hw, int p, int set)
KS8842_PORT_CTRL_2_OFFSET, PORT_BACK_PRESSURE, set);
}
-static inline void port_cfg_force_flow_ctrl(struct ksz_hw *hw, int p, int set)
-{
- port_cfg(hw, p,
- KS8842_PORT_CTRL_2_OFFSET, PORT_FORCE_FLOW_CTRL, set);
-}
-
static inline int port_chk_back_pressure(struct ksz_hw *hw, int p)
{
return port_chk(hw, p,
--
2.20.1.7.g153144c
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] net: ksz884x: Remove the unused function port_cfg_force_flow_ctrl()
2022-12-12 3:53 [PATCH] net: ksz884x: Remove the unused function port_cfg_force_flow_ctrl() Jiapeng Chong
@ 2022-12-12 8:41 ` Leon Romanovsky
0 siblings, 0 replies; 2+ messages in thread
From: Leon Romanovsky @ 2022-12-12 8:41 UTC (permalink / raw)
To: Jiapeng Chong
Cc: davem, kuba, pabeni, sumit.semwal, christian.koenig, netdev,
linux-kernel, linux-media, dri-devel, linaro-mm-sig, Abaci Robot
On Mon, Dec 12, 2022 at 11:53:09AM +0800, Jiapeng Chong wrote:
> The function port_cfg_force_flow_ctrl() is defined in the ksz884x.c file,
> but not called elsewhere, so remove this unused function.
>
> drivers/net/ethernet/micrel/ksz884x.c:2212:20: warning: unused function 'port_cfg_force_flow_ctrl'.
>
> Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=3418
> Reported-by: Abaci Robot <abaci@linux.alibaba.com>
> Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
> ---
> drivers/net/ethernet/micrel/ksz884x.c | 6 ------
> 1 file changed, 6 deletions(-)
>
> diff --git a/drivers/net/ethernet/micrel/ksz884x.c b/drivers/net/ethernet/micrel/ksz884x.c
> index e6acd1e7b263..46f1fbf58b5a 100644
> --- a/drivers/net/ethernet/micrel/ksz884x.c
> +++ b/drivers/net/ethernet/micrel/ksz884x.c
> @@ -2209,12 +2209,6 @@ static inline void port_cfg_back_pressure(struct ksz_hw *hw, int p, int set)
> KS8842_PORT_CTRL_2_OFFSET, PORT_BACK_PRESSURE, set);
> }
>
> -static inline void port_cfg_force_flow_ctrl(struct ksz_hw *hw, int p, int set)
> -{
> - port_cfg(hw, p,
> - KS8842_PORT_CTRL_2_OFFSET, PORT_FORCE_FLOW_CTRL, set);
> -}
> -
> static inline int port_chk_back_pressure(struct ksz_hw *hw, int p)
This function is not called too. Many functions in that file can be
removed. Please do it in one patch.
Thanks
> {
> return port_chk(hw, p,
> --
> 2.20.1.7.g153144c
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-12-12 8:42 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-12-12 3:53 [PATCH] net: ksz884x: Remove the unused function port_cfg_force_flow_ctrl() Jiapeng Chong
2022-12-12 8:41 ` Leon Romanovsky
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).