This patch fixes the below sparse issue
drivers/phy/phy-zynqmp.c: In function 'xpsgtr_set_sgmii_pcs':
drivers/phy/phy-zynqmp.c:855:10: warning: comparison of unsigned \
expression < 0 is always false [-Wtype-limits]
if (ret < 0) {
^
drivers/phy/phy-zynqmp.c:865:10: warning: comparison of unsigned \
expression < 0 is always false [-Wtype-limits]
if (ret < 0) {
^
drivers/phy/phy-zynqmp.c:338:23: warning: incorrect type in \
assignment (different address spaces)
drivers/phy/phy-zynqmp.c:338:23:
expected void [noderef] <asn:2>*regs
drivers/phy/phy-zynqmp.c:338:23: got void *regs
Signed-off-by: Anurag Kumar Vulisha <anuragku@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
*
* Return: 0 on success
*/
-int xpsgtr_set_protregs(struct phy *phy, void *regs)
+int xpsgtr_set_protregs(struct phy *phy, void __iomem *regs)
{
struct xpsgtr_phy *gtr_phy = phy_get_drvdata(phy);
struct xpsgtr_dev *gtr_dev = gtr_phy->data;
static int xpsgtr_set_sgmii_pcs(struct xpsgtr_phy *gtr_phy)
{
u32 shift, mask, value;
- u32 ret = 0;
+ int ret = 0;
struct xpsgtr_dev *gtr_dev = gtr_phy->data;
/* Set the PCS signal detect to 1 */
extern int xpsgtr_override_deemph(struct phy *phy, u8 plvl, u8 vlvl);
extern int xpsgtr_margining_factor(struct phy *phy, u8 plvl, u8 vlvl);
extern int xpsgtr_wait_pll_lock(struct phy *phy);
-extern int xpsgtr_set_protregs(struct phy *phy, void *regs);
+extern int xpsgtr_set_protregs(struct phy *phy, void __iomem *regs);
#else