[openwrt/openwrt] kernel: psb6970: drop unused variable in psb6970_config_init

LEDE Commits lede-commits at lists.infradead.org
Thu May 11 18:24:46 PDT 2023


ansuel pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/dc6b55e21f64e9978a805b577c379c3a4a9a2ef0

commit dc6b55e21f64e9978a805b577c379c3a4a9a2ef0
Author: Aleksander Jan Bajkowski <olek2 at wp.pl>
AuthorDate: Sat May 6 16:38:49 2023 +0200

    kernel: psb6970: drop unused variable in psb6970_config_init
    
    Drop unused variable in psb6970_config_init. This variable should have
    been dropped in 0806f8fc80e6 ("lantiq: add Linux 5.10 support as testing kernel").
    
    This fix compilation warning:
    drivers/net/phy/psb6970.c: In function 'psb6970_config_init':
    drivers/net/phy/psb6970.c:310:28: warning: unused variable 'dev' [-Wunused-variable]
      310 |         struct net_device *dev = pdev->attached_dev;
          |
    cc1: all warnings being treated as errors
    
    Fixes: 0806f8fc80e6 ("lantiq: add Linux 5.10 support as testing kernel")
    Signed-off-by: Aleksander Jan Bajkowski <olek2 at wp.pl>
---
 target/linux/generic/files/drivers/net/phy/psb6970.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/target/linux/generic/files/drivers/net/phy/psb6970.c b/target/linux/generic/files/drivers/net/phy/psb6970.c
index fb6ed0e204..af64704b16 100644
--- a/target/linux/generic/files/drivers/net/phy/psb6970.c
+++ b/target/linux/generic/files/drivers/net/phy/psb6970.c
@@ -307,7 +307,6 @@ static const struct switch_dev_ops psb6970_ops = {
 static int psb6970_config_init(struct phy_device *pdev)
 {
 	struct psb6970_priv *priv;
-	struct net_device *dev = pdev->attached_dev;
 	struct switch_dev *swdev;
 	int ret;
 




More information about the lede-commits mailing list