Re: [PATCH 2/3] staging: mt7621-eth: Fix line over 80 characters

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, May 09 2018, Kamal Heib wrote:

> This change fixes all the lines that get over 80 characters.
>
> Signed-off-by: Kamal Heib <kamalheib1@xxxxxxxxx>
> ---
>  drivers/staging/mt7621-eth/ethtool.c    | 3 ++-
>  drivers/staging/mt7621-eth/gsw_mt7621.c | 3 ++-
>  drivers/staging/mt7621-eth/mdio.c       | 3 ++-
>  drivers/staging/mt7621-eth/soc_mt7621.c | 6 ++++--
>  4 files changed, 10 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/staging/mt7621-eth/ethtool.c b/drivers/staging/mt7621-eth/ethtool.c
> index 7c059cd94e56..8270fea30cb3 100644
> --- a/drivers/staging/mt7621-eth/ethtool.c
> +++ b/drivers/staging/mt7621-eth/ethtool.c
> @@ -53,7 +53,8 @@ static int mtk_set_link_ksettings(struct net_device *dev,
>  			mac->phy_dev = mac->hw->phy->phy[cmd->base.phy_address];
>  			mac->phy_flags = MTK_PHY_FLAG_PORT;
>  		} else if (mac->hw->mii_bus) {
> -			mac->phy_dev = mdiobus_get_phy(mac->hw->mii_bus, cmd->base.phy_address);
> +			mac->phy_dev = mdiobus_get_phy(mac->hw->mii_bus,
> +						       cmd->base.phy_address);
>  			if (!mac->phy_dev)
>  				return -ENODEV;
>  			mac->phy_flags = MTK_PHY_FLAG_ATTACH;
> diff --git a/drivers/staging/mt7621-eth/gsw_mt7621.c b/drivers/staging/mt7621-eth/gsw_mt7621.c
> index 2d2272e71edb..2c07b559bed7 100644
> --- a/drivers/staging/mt7621-eth/gsw_mt7621.c
> +++ b/drivers/staging/mt7621-eth/gsw_mt7621.c
> @@ -205,7 +205,8 @@ static void mt7621_hw_init(struct mtk_eth *eth, struct mt7620_gsw *gsw,
>  		for (i = 0; i < MT7530_NUM_PORTS; i++)
>  			mt7530_mdio_w32(gsw, REG_ESW_PORT_PCR(i), 0x00400000);
>  
> -		mt7530_mdio_w32(gsw, REG_ESW_PORT_PCR(MT7530_CPU_PORT), 0x00ff0000);
> +		mt7530_mdio_w32(gsw, REG_ESW_PORT_PCR(MT7530_CPU_PORT),
> +				0x00ff0000);
>  
>  		for (i = 0; i < MT7530_NUM_PORTS; i++)
>  			mt7530_mdio_w32(gsw, REG_ESW_PORT_PVC(i), 0x810000c0);
> diff --git a/drivers/staging/mt7621-eth/mdio.c b/drivers/staging/mt7621-eth/mdio.c
> index 943ed2f67867..6d4cc74ec52c 100644
> --- a/drivers/staging/mt7621-eth/mdio.c
> +++ b/drivers/staging/mt7621-eth/mdio.c
> @@ -162,7 +162,8 @@ static void mtk_phy_disconnect(struct mtk_mac *mac)
>  		} else if (eth->phy->phy[i]) {
>  			phy_disconnect(eth->phy->phy[i]);
>  		} else if (eth->mii_bus) {
> -			struct phy_device *phy = mdiobus_get_phy(eth->mii_bus, i);
> +			struct phy_device *phy = mdiobus_get_phy(eth->mii_bus,
> +								 i);

This looks a bit ugly to my eye, but it is very subjective.
I would prefer
> 			struct phy_device *phy =
>				mdiobus_get_phy(eth->mii_bus, i);

but I don't object to your version.

Thanks,
NeilBrown


>  
>  			if (phy)
>  				phy_detach(phy);
> diff --git a/drivers/staging/mt7621-eth/soc_mt7621.c b/drivers/staging/mt7621-eth/soc_mt7621.c
> index 3dd7d8d893de..5d63b5d96f6b 100644
> --- a/drivers/staging/mt7621-eth/soc_mt7621.c
> +++ b/drivers/staging/mt7621-eth/soc_mt7621.c
> @@ -107,13 +107,15 @@ static void mt7621_set_mac(struct mtk_mac *mac, unsigned char *hwaddr)
>  
>  	spin_lock_irqsave(&mac->hw->page_lock, flags);
>  	if (mac->id == 0) {
> -		mtk_w32(mac->hw, (hwaddr[0] << 8) | hwaddr[1], GSW_REG_GDMA1_MAC_ADRH);
> +		mtk_w32(mac->hw, (hwaddr[0] << 8) | hwaddr[1],
> +			GSW_REG_GDMA1_MAC_ADRH);
>  		mtk_w32(mac->hw, (hwaddr[2] << 24) | (hwaddr[3] << 16) |
>  			(hwaddr[4] << 8) | hwaddr[5],
>  			GSW_REG_GDMA1_MAC_ADRL);
>  	}
>  	if (mac->id == 1) {
> -		mtk_w32(mac->hw, (hwaddr[0] << 8) | hwaddr[1], GSW_REG_GDMA2_MAC_ADRH);
> +		mtk_w32(mac->hw, (hwaddr[0] << 8) | hwaddr[1],
> +			GSW_REG_GDMA2_MAC_ADRH);
>  		mtk_w32(mac->hw, (hwaddr[2] << 24) | (hwaddr[3] << 16) |
>  			(hwaddr[4] << 8) | hwaddr[5],
>  			GSW_REG_GDMA2_MAC_ADRL);
> -- 
> 2.14.3

Attachment: signature.asc
Description: PGP signature

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux