[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220607135452.g7io3cfqcmv5etbu@bang-olufsen.dk>
Date:   Tue, 7 Jun 2022 13:54:52 +0000
From:   Alvin Šipraga <ALSI@...g-olufsen.dk>
To:     Luiz Angelo Daros de Luca <luizluca@...il.com>
CC:     Alvin Šipraga <alvin@...s.dk>,
        Linus Walleij <linus.walleij@...aro.org>,
        Andrew Lunn <andrew@...n.ch>,
        Vivien Didelot <vivien.didelot@...il.com>,
        Florian Fainelli <f.fainelli@...il.com>,
        Vladimir Oltean <olteanv@...il.com>,
        "David S. Miller" <davem@...emloft.net>,
        Eric Dumazet <edumazet@...gle.com>,
        Jakub Kicinski <kuba@...nel.org>,
        Paolo Abeni <pabeni@...hat.com>,
        Russell King <linux@...linux.org.uk>,
        "open list:NETWORKING DRIVERS" <netdev@...r.kernel.org>,
        open list <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH net-next 2/5] net: dsa: realtek: rtl8365mb: remove
 port_mask private data member
On Tue, Jun 07, 2022 at 10:34:38AM -0300, Luiz Angelo Daros de Luca wrote:
> > There is no real need for this variable: the line change interrupt mask
> > is sufficiently masked out when getting linkup_ind and linkdown_ind in
> > the interrupt handler.
> 
> Yes, it was currently useless as well as priv->num_ports (it is a constant).
> 
> I wonder if we should really create irq threads for unused ports
> (!dsa_is_unused_port()). Some models have only 2+1 ports and we are
> always dealing with 10/11 ports.
> If dsa_is_unused_port() is too costly to be used everywhere, we could
> keep port_mask and iterate over it (for_each_set_bit) instead of from
> 0 til priv->num_ports-1.
Seems like premature optimization, I prefer to keep it simple.
Kind regards,
Alvin
Powered by blists - more mailing lists
 
