* [PATCH net-next] net: ethernet: emac: Fix phy mode type
@ 2019-11-05 17:53 Andrew Lunn
2019-11-06 2:22 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Andrew Lunn @ 2019-11-05 17:53 UTC (permalink / raw)
To: David Miller; +Cc: netdev, Andrew Lunn, kbuild test robot, Stephen Rothwell
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>
---
drivers/net/ethernet/ibm/emac/core.h | 2 +-
drivers/net/ethernet/ibm/emac/zmii.c | 3 ++-
drivers/net/ethernet/ibm/emac/zmii.h | 3 ++-
3 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/drivers/net/ethernet/ibm/emac/core.h b/drivers/net/ethernet/ibm/emac/core.h
index e9cda024cbf6..89a1b0fea158 100644
--- a/drivers/net/ethernet/ibm/emac/core.h
+++ b/drivers/net/ethernet/ibm/emac/core.h
@@ -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;
diff --git a/drivers/net/ethernet/ibm/emac/zmii.c b/drivers/net/ethernet/ibm/emac/zmii.c
index b9e821de2ac6..57a25c7a9e70 100644
--- a/drivers/net/ethernet/ibm/emac/zmii.c
+++ b/drivers/net/ethernet/ibm/emac/zmii.c
@@ -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;
diff --git a/drivers/net/ethernet/ibm/emac/zmii.h b/drivers/net/ethernet/ibm/emac/zmii.h
index 41d46e9b87ba..65daedc78594 100644
--- a/drivers/net/ethernet/ibm/emac/zmii.h
+++ b/drivers/net/ethernet/ibm/emac/zmii.h
@@ -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);
--
2.24.0.rc0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH net-next] net: ethernet: emac: Fix phy mode type
2019-11-05 17:53 [PATCH net-next] net: ethernet: emac: Fix phy mode type Andrew Lunn
@ 2019-11-06 2:22 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2019-11-06 2:22 UTC (permalink / raw)
To: andrew; +Cc: netdev, lkp, sfr
From: Andrew Lunn <andrew@lunn.ch>
Date: Tue, 5 Nov 2019 18:53:23 +0100
> 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>
Applied.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-11-06 2:22 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-05 17:53 [PATCH net-next] net: ethernet: emac: Fix phy mode type Andrew Lunn
2019-11-06 2:22 ` David Miller
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).