diff options
author | Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> | 2014-01-04 19:24:55 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-01-04 19:27:58 -0500 |
commit | 77051ed829bc1e8b4a99a4a27520faa5bab0976a (patch) | |
tree | 0d237b1415a9e2e3ea721fd2634a565663f94d97 /drivers/net/phy | |
parent | 553fe92b26e15200a4df9c618175c79e49b6cc55 (diff) |
phy: kill excess empty lines
Remove excess empty lines such as those between a function call and its result
check and just duplicate ones between functions.
Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/phy')
-rw-r--r-- | drivers/net/phy/phy.c | 14 | ||||
-rw-r--r-- | drivers/net/phy/phy_device.c | 17 |
2 files changed, 0 insertions, 31 deletions
diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c index 43c51734d6cb..4e6dcc1cc237 100644 --- a/drivers/net/phy/phy.c +++ b/drivers/net/phy/phy.c | |||
@@ -384,7 +384,6 @@ int phy_start_aneg(struct phy_device *phydev) | |||
384 | phy_sanitize_settings(phydev); | 384 | phy_sanitize_settings(phydev); |
385 | 385 | ||
386 | err = phydev->drv->config_aneg(phydev); | 386 | err = phydev->drv->config_aneg(phydev); |
387 | |||
388 | if (err < 0) | 387 | if (err < 0) |
389 | goto out_unlock; | 388 | goto out_unlock; |
390 | 389 | ||
@@ -404,7 +403,6 @@ out_unlock: | |||
404 | } | 403 | } |
405 | EXPORT_SYMBOL(phy_start_aneg); | 404 | EXPORT_SYMBOL(phy_start_aneg); |
406 | 405 | ||
407 | |||
408 | /** | 406 | /** |
409 | * phy_start_machine - start PHY state machine tracking | 407 | * phy_start_machine - start PHY state machine tracking |
410 | * @phydev: the phy_device struct | 408 | * @phydev: the phy_device struct |
@@ -514,13 +512,11 @@ static int phy_disable_interrupts(struct phy_device *phydev) | |||
514 | 512 | ||
515 | /* Disable PHY interrupts */ | 513 | /* Disable PHY interrupts */ |
516 | err = phy_config_interrupt(phydev, PHY_INTERRUPT_DISABLED); | 514 | err = phy_config_interrupt(phydev, PHY_INTERRUPT_DISABLED); |
517 | |||
518 | if (err) | 515 | if (err) |
519 | goto phy_err; | 516 | goto phy_err; |
520 | 517 | ||
521 | /* Clear the interrupt */ | 518 | /* Clear the interrupt */ |
522 | err = phy_clear_interrupt(phydev); | 519 | err = phy_clear_interrupt(phydev); |
523 | |||
524 | if (err) | 520 | if (err) |
525 | goto phy_err; | 521 | goto phy_err; |
526 | 522 | ||
@@ -589,7 +585,6 @@ int phy_stop_interrupts(struct phy_device *phydev) | |||
589 | } | 585 | } |
590 | EXPORT_SYMBOL(phy_stop_interrupts); | 586 | EXPORT_SYMBOL(phy_stop_interrupts); |
591 | 587 | ||
592 | |||
593 | /** | 588 | /** |
594 | * phy_change - Scheduled by the phy_interrupt/timer to handle PHY changes | 589 | * phy_change - Scheduled by the phy_interrupt/timer to handle PHY changes |
595 | * @work: work_struct that describes the work to be done | 590 | * @work: work_struct that describes the work to be done |
@@ -622,7 +617,6 @@ void phy_change(struct work_struct *work) | |||
622 | /* reschedule state queue work to run as soon as possible */ | 617 | /* reschedule state queue work to run as soon as possible */ |
623 | cancel_delayed_work_sync(&phydev->state_queue); | 618 | cancel_delayed_work_sync(&phydev->state_queue); |
624 | queue_delayed_work(system_power_efficient_wq, &phydev->state_queue, 0); | 619 | queue_delayed_work(system_power_efficient_wq, &phydev->state_queue, 0); |
625 | |||
626 | return; | 620 | return; |
627 | 621 | ||
628 | ignore: | 622 | ignore: |
@@ -668,7 +662,6 @@ out_unlock: | |||
668 | } | 662 | } |
669 | EXPORT_SYMBOL(phy_stop); | 663 | EXPORT_SYMBOL(phy_stop); |
670 | 664 | ||
671 | |||
672 | /** | 665 | /** |
673 | * phy_start - start or restart a PHY device | 666 | * phy_start - start or restart a PHY device |
674 | * @phydev: target phy_device struct | 667 | * @phydev: target phy_device struct |
@@ -730,7 +723,6 @@ void phy_state_machine(struct work_struct *work) | |||
730 | break; | 723 | break; |
731 | case PHY_AN: | 724 | case PHY_AN: |
732 | err = phy_read_status(phydev); | 725 | err = phy_read_status(phydev); |
733 | |||
734 | if (err < 0) | 726 | if (err < 0) |
735 | break; | 727 | break; |
736 | 728 | ||
@@ -762,7 +754,6 @@ void phy_state_machine(struct work_struct *work) | |||
762 | break; | 754 | break; |
763 | case PHY_NOLINK: | 755 | case PHY_NOLINK: |
764 | err = phy_read_status(phydev); | 756 | err = phy_read_status(phydev); |
765 | |||
766 | if (err) | 757 | if (err) |
767 | break; | 758 | break; |
768 | 759 | ||
@@ -774,7 +765,6 @@ void phy_state_machine(struct work_struct *work) | |||
774 | break; | 765 | break; |
775 | case PHY_FORCING: | 766 | case PHY_FORCING: |
776 | err = genphy_update_link(phydev); | 767 | err = genphy_update_link(phydev); |
777 | |||
778 | if (err) | 768 | if (err) |
779 | break; | 769 | break; |
780 | 770 | ||
@@ -797,7 +787,6 @@ void phy_state_machine(struct work_struct *work) | |||
797 | break; | 787 | break; |
798 | case PHY_CHANGELINK: | 788 | case PHY_CHANGELINK: |
799 | err = phy_read_status(phydev); | 789 | err = phy_read_status(phydev); |
800 | |||
801 | if (err) | 790 | if (err) |
802 | break; | 791 | break; |
803 | 792 | ||
@@ -824,14 +813,11 @@ void phy_state_machine(struct work_struct *work) | |||
824 | } | 813 | } |
825 | break; | 814 | break; |
826 | case PHY_RESUMING: | 815 | case PHY_RESUMING: |
827 | |||
828 | err = phy_clear_interrupt(phydev); | 816 | err = phy_clear_interrupt(phydev); |
829 | |||
830 | if (err) | 817 | if (err) |
831 | break; | 818 | break; |
832 | 819 | ||
833 | err = phy_config_interrupt(phydev, PHY_INTERRUPT_ENABLED); | 820 | err = phy_config_interrupt(phydev, PHY_INTERRUPT_ENABLED); |
834 | |||
835 | if (err) | 821 | if (err) |
836 | break; | 822 | break; |
837 | 823 | ||
diff --git a/drivers/net/phy/phy_device.c b/drivers/net/phy/phy_device.c index dbd04c3f43f4..1f1f8d77aa6a 100644 --- a/drivers/net/phy/phy_device.c +++ b/drivers/net/phy/phy_device.c | |||
@@ -151,7 +151,6 @@ struct phy_device *phy_device_create(struct mii_bus *bus, int addr, int phy_id, | |||
151 | 151 | ||
152 | /* We allocate the device, and initialize the default values */ | 152 | /* We allocate the device, and initialize the default values */ |
153 | dev = kzalloc(sizeof(*dev), GFP_KERNEL); | 153 | dev = kzalloc(sizeof(*dev), GFP_KERNEL); |
154 | |||
155 | if (NULL == dev) | 154 | if (NULL == dev) |
156 | return (struct phy_device *)PTR_ERR((void *)-ENOMEM); | 155 | return (struct phy_device *)PTR_ERR((void *)-ENOMEM); |
157 | 156 | ||
@@ -294,7 +293,6 @@ static int get_phy_id(struct mii_bus *bus, int addr, u32 *phy_id, | |||
294 | 293 | ||
295 | /* Grab the bits from PHYIR1, and put them in the upper half */ | 294 | /* Grab the bits from PHYIR1, and put them in the upper half */ |
296 | phy_reg = mdiobus_read(bus, addr, MII_PHYSID1); | 295 | phy_reg = mdiobus_read(bus, addr, MII_PHYSID1); |
297 | |||
298 | if (phy_reg < 0) | 296 | if (phy_reg < 0) |
299 | return -EIO; | 297 | return -EIO; |
300 | 298 | ||
@@ -302,7 +300,6 @@ static int get_phy_id(struct mii_bus *bus, int addr, u32 *phy_id, | |||
302 | 300 | ||
303 | /* Grab the bits from PHYIR2, and put them in the lower half */ | 301 | /* Grab the bits from PHYIR2, and put them in the lower half */ |
304 | phy_reg = mdiobus_read(bus, addr, MII_PHYSID2); | 302 | phy_reg = mdiobus_read(bus, addr, MII_PHYSID2); |
305 | |||
306 | if (phy_reg < 0) | 303 | if (phy_reg < 0) |
307 | return -EIO; | 304 | return -EIO; |
308 | 305 | ||
@@ -724,7 +721,6 @@ static int genphy_config_advert(struct phy_device *phydev) | |||
724 | 721 | ||
725 | /* Setup standard advertisement */ | 722 | /* Setup standard advertisement */ |
726 | adv = phy_read(phydev, MII_ADVERTISE); | 723 | adv = phy_read(phydev, MII_ADVERTISE); |
727 | |||
728 | if (adv < 0) | 724 | if (adv < 0) |
729 | return adv; | 725 | return adv; |
730 | 726 | ||
@@ -745,7 +741,6 @@ static int genphy_config_advert(struct phy_device *phydev) | |||
745 | if (phydev->supported & (SUPPORTED_1000baseT_Half | | 741 | if (phydev->supported & (SUPPORTED_1000baseT_Half | |
746 | SUPPORTED_1000baseT_Full)) { | 742 | SUPPORTED_1000baseT_Full)) { |
747 | adv = phy_read(phydev, MII_CTRL1000); | 743 | adv = phy_read(phydev, MII_CTRL1000); |
748 | |||
749 | if (adv < 0) | 744 | if (adv < 0) |
750 | return adv; | 745 | return adv; |
751 | 746 | ||
@@ -812,7 +807,6 @@ int genphy_restart_aneg(struct phy_device *phydev) | |||
812 | } | 807 | } |
813 | EXPORT_SYMBOL(genphy_restart_aneg); | 808 | EXPORT_SYMBOL(genphy_restart_aneg); |
814 | 809 | ||
815 | |||
816 | /** | 810 | /** |
817 | * genphy_config_aneg - restart auto-negotiation or write BMCR | 811 | * genphy_config_aneg - restart auto-negotiation or write BMCR |
818 | * @phydev: target phy_device struct | 812 | * @phydev: target phy_device struct |
@@ -829,10 +823,8 @@ int genphy_config_aneg(struct phy_device *phydev) | |||
829 | return genphy_setup_forced(phydev); | 823 | return genphy_setup_forced(phydev); |
830 | 824 | ||
831 | result = genphy_config_advert(phydev); | 825 | result = genphy_config_advert(phydev); |
832 | |||
833 | if (result < 0) /* error */ | 826 | if (result < 0) /* error */ |
834 | return result; | 827 | return result; |
835 | |||
836 | if (result == 0) { | 828 | if (result == 0) { |
837 | /* Advertisement hasn't changed, but maybe aneg was never on to | 829 | /* Advertisement hasn't changed, but maybe aneg was never on to |
838 | * begin with? Or maybe phy was isolated? | 830 | * begin with? Or maybe phy was isolated? |
@@ -870,13 +862,11 @@ int genphy_update_link(struct phy_device *phydev) | |||
870 | 862 | ||
871 | /* Do a fake read */ | 863 | /* Do a fake read */ |
872 | status = phy_read(phydev, MII_BMSR); | 864 | status = phy_read(phydev, MII_BMSR); |
873 | |||
874 | if (status < 0) | 865 | if (status < 0) |
875 | return status; | 866 | return status; |
876 | 867 | ||
877 | /* Read link and autonegotiation status */ | 868 | /* Read link and autonegotiation status */ |
878 | status = phy_read(phydev, MII_BMSR); | 869 | status = phy_read(phydev, MII_BMSR); |
879 | |||
880 | if (status < 0) | 870 | if (status < 0) |
881 | return status; | 871 | return status; |
882 | 872 | ||
@@ -916,12 +906,10 @@ int genphy_read_status(struct phy_device *phydev) | |||
916 | if (phydev->supported & (SUPPORTED_1000baseT_Half | 906 | if (phydev->supported & (SUPPORTED_1000baseT_Half |
917 | | SUPPORTED_1000baseT_Full)) { | 907 | | SUPPORTED_1000baseT_Full)) { |
918 | lpagb = phy_read(phydev, MII_STAT1000); | 908 | lpagb = phy_read(phydev, MII_STAT1000); |
919 | |||
920 | if (lpagb < 0) | 909 | if (lpagb < 0) |
921 | return lpagb; | 910 | return lpagb; |
922 | 911 | ||
923 | adv = phy_read(phydev, MII_CTRL1000); | 912 | adv = phy_read(phydev, MII_CTRL1000); |
924 | |||
925 | if (adv < 0) | 913 | if (adv < 0) |
926 | return adv; | 914 | return adv; |
927 | 915 | ||
@@ -931,14 +919,12 @@ int genphy_read_status(struct phy_device *phydev) | |||
931 | } | 919 | } |
932 | 920 | ||
933 | lpa = phy_read(phydev, MII_LPA); | 921 | lpa = phy_read(phydev, MII_LPA); |
934 | |||
935 | if (lpa < 0) | 922 | if (lpa < 0) |
936 | return lpa; | 923 | return lpa; |
937 | 924 | ||
938 | phydev->lp_advertising |= mii_lpa_to_ethtool_lpa_t(lpa); | 925 | phydev->lp_advertising |= mii_lpa_to_ethtool_lpa_t(lpa); |
939 | 926 | ||
940 | adv = phy_read(phydev, MII_ADVERTISE); | 927 | adv = phy_read(phydev, MII_ADVERTISE); |
941 | |||
942 | if (adv < 0) | 928 | if (adv < 0) |
943 | return adv; | 929 | return adv; |
944 | 930 | ||
@@ -1007,7 +993,6 @@ static int genphy_config_init(struct phy_device *phydev) | |||
1007 | 993 | ||
1008 | /* Do we support autonegotiation? */ | 994 | /* Do we support autonegotiation? */ |
1009 | val = phy_read(phydev, MII_BMSR); | 995 | val = phy_read(phydev, MII_BMSR); |
1010 | |||
1011 | if (val < 0) | 996 | if (val < 0) |
1012 | return val; | 997 | return val; |
1013 | 998 | ||
@@ -1025,7 +1010,6 @@ static int genphy_config_init(struct phy_device *phydev) | |||
1025 | 1010 | ||
1026 | if (val & BMSR_ESTATEN) { | 1011 | if (val & BMSR_ESTATEN) { |
1027 | val = phy_read(phydev, MII_ESTATUS); | 1012 | val = phy_read(phydev, MII_ESTATUS); |
1028 | |||
1029 | if (val < 0) | 1013 | if (val < 0) |
1030 | return val; | 1014 | return val; |
1031 | 1015 | ||
@@ -1146,7 +1130,6 @@ int phy_driver_register(struct phy_driver *new_driver) | |||
1146 | new_driver->driver.remove = phy_remove; | 1130 | new_driver->driver.remove = phy_remove; |
1147 | 1131 | ||
1148 | retval = driver_register(&new_driver->driver); | 1132 | retval = driver_register(&new_driver->driver); |
1149 | |||
1150 | if (retval) { | 1133 | if (retval) { |
1151 | pr_err("%s: Error %d in registering driver\n", | 1134 | pr_err("%s: Error %d in registering driver\n", |
1152 | new_driver->name, retval); | 1135 | new_driver->name, retval); |