]> rtime.felk.cvut.cz Git - vajnamar/linux-xlnx.git/commitdiff
phy: zynqmp: Correct sparse issue in phy-zynqmp.c
authorAnurag Kumar Vulisha <anurag.kumar.vulisha@xilinx.com>
Thu, 1 Jun 2017 12:11:48 +0000 (17:41 +0530)
committerMichal Simek <michal.simek@xilinx.com>
Tue, 20 Jun 2017 12:13:48 +0000 (14:13 +0200)
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>
drivers/phy/phy-zynqmp.c
include/linux/phy/phy-zynqmp.h

index fbe93e646824f885ef613f00df10c4b85db8702a..eecef9266ed72d8074169a15a480a97f3f9f1b95 100644 (file)
@@ -344,7 +344,7 @@ struct xpsgtr_dev {
  *
  * 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;
@@ -914,7 +914,7 @@ static void xpsgtr_ulpi_reset(struct xpsgtr_phy *gtr_phy)
 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 */
index 4da3352c75d303d4c7e9e65cda9955702a14989b..ecde77af06f62a2dec4c80fd9329b8b3fc4e5ea0 100644 (file)
@@ -26,7 +26,7 @@ struct phy;
 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