net: ethernet: emac: Fix phy mode type
authorAndrew Lunn <andrew@lunn.ch>
Tue, 5 Nov 2019 17:53:23 +0000 (18:53 +0100)
committerDavid S. Miller <davem@davemloft.net>
Wed, 6 Nov 2019 02:21:49 +0000 (18:21 -0800)
Pass a phy_interface_t to of_get_phy_mode(), by changing the type of
phy_mode in the device structure. This then requires that
zmii_attach() is also changes, since it takes a pointer to phy_mode.

Fixes: 0c65b2b90d13 ("net: of_get_phy_mode: Change API to solve int/unit warnings")
Reported-by: kbuild test robot <lkp@intel.com>
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/ibm/emac/core.h
drivers/net/ethernet/ibm/emac/zmii.c
drivers/net/ethernet/ibm/emac/zmii.h

index e9cda024cbf631eb951530461cec40dd0e1bd26a..89a1b0fea158fda6293247f0dfe387c0de7973ea 100644 (file)
@@ -171,7 +171,7 @@ struct emac_instance {
        struct mal_commac               commac;
 
        /* PHY infos */
-       int                             phy_mode;
+       phy_interface_t                 phy_mode;
        u32                             phy_map;
        u32                             phy_address;
        u32                             phy_feat_exc;
index b9e821de2ac64cb4d0b9e8d95174ea5ce6baeabe..57a25c7a9e70d5cec1096e9914680416fb5baf5a 100644 (file)
@@ -78,7 +78,8 @@ static inline u32 zmii_mode_mask(int mode, int input)
        }
 }
 
-int zmii_attach(struct platform_device *ofdev, int input, int *mode)
+int zmii_attach(struct platform_device *ofdev, int input,
+               phy_interface_t *mode)
 {
        struct zmii_instance *dev = platform_get_drvdata(ofdev);
        struct zmii_regs __iomem *p = dev->base;
index 41d46e9b87baab906768644ba4cb07f75544bde8..65daedc785943e4655246c46a5396bde82e55ab5 100644 (file)
@@ -50,7 +50,8 @@ struct zmii_instance {
 
 int zmii_init(void);
 void zmii_exit(void);
-int zmii_attach(struct platform_device *ofdev, int input, int *mode);
+int zmii_attach(struct platform_device *ofdev, int input,
+               phy_interface_t *mode);
 void zmii_detach(struct platform_device *ofdev, int input);
 void zmii_get_mdio(struct platform_device *ofdev, int input);
 void zmii_put_mdio(struct platform_device *ofdev, int input);