lkml.org 
[lkml]   [2023]   [May]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH net-next v2 4/7] net: dsa: mv88e6xxx: add field to specify internal phys layout
> @@ -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

\
 
 \ /
  Last update: 2023-05-19 18:12    [W:0.092 / U:1.908 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site