Re: [PATCH net-next v2 4/7] net: dsa: mv88e6xxx: add field to specify internal phys layout

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

 



> @@ -1198,13 +1198,17 @@ int mv88e6xxx_g2_irq_mdio_setup(struct mv88e6xxx_chip *chip,
>  {
>  	int phy, irq;
>  
> -	for (phy = 0; phy < chip->info->num_internal_phys; phy++) {
> +	for (phy = chip->info->internal_phys_offset;
> +	     phy <
> +	     chip->info->num_internal_phys + chip->info->internal_phys_offset;
> +	     phy++) {

The code style is not so nice. How about moving this addition out of
the for loop, it is static anyway. And then you can avoid splitting
the expression over multiple lines.

>  		irq = irq_find_mapping(chip->g2_irq.domain, phy);
>  		if (irq < 0)
>  			return irq;
>  
>  		bus->irq[chip->info->phy_base_addr + phy] = irq;
>  	}
> +

No whitespace changed please.

    Andrew

---
pw-bot: cr



[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux