Re: [RFC PATCH 05/22] thunderbolt: Add helper macros to iterate over switch ports

2019-10-06 Thread Lukas Wunner
On Wed, Oct 02, 2019 at 05:28:59PM +0300, Mika Westerberg wrote: > On Wed, Oct 02, 2019 at 04:17:54PM +0200, Oliver Neukum wrote: > > Am Dienstag, den 01.10.2019, 14:38 +0300 schrieb Mika Westerberg: > > > @@ -1975,10 +1972,8 @@ void tb_switch_suspend(struct tb_switch *sw) > > > if (err) >

Re: [RFC PATCH 05/22] thunderbolt: Add helper macros to iterate over switch ports

2019-10-02 Thread Mika Westerberg
On Wed, Oct 02, 2019 at 04:17:54PM +0200, Oliver Neukum wrote: > Am Dienstag, den 01.10.2019, 14:38 +0300 schrieb Mika Westerberg: > > @@ -1975,10 +1972,8 @@ void tb_switch_suspend(struct tb_switch *sw) > > if (err) > > return; > > > > - for (i = 1; i <= sw->config.m

Re: [RFC PATCH 05/22] thunderbolt: Add helper macros to iterate over switch ports

2019-10-02 Thread Oliver Neukum
Am Dienstag, den 01.10.2019, 14:38 +0300 schrieb Mika Westerberg: > @@ -1975,10 +1972,8 @@ void tb_switch_suspend(struct tb_switch *sw) > if (err) > return; > > - for (i = 1; i <= sw->config.max_port_number; i++) { > - if (tb_port_has_remote(&sw->ports[

[RFC PATCH 05/22] thunderbolt: Add helper macros to iterate over switch ports

2019-10-01 Thread Mika Westerberg
There are quite many places in the driver where we iterate over each port in the switch skipping. To make it bit more consistent provide set of helper macros that can be used to do this and convert the existing call sites to these. No functional changes. Signed-off-by: Mika Westerberg --- drive