lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1570025874.2472.14.camel@suse.com>
Date:   Wed, 02 Oct 2019 16:17:54 +0200
From:   Oliver Neukum <oneukum@...e.com>
To:     Mika Westerberg <mika.westerberg@...ux.intel.com>,
        linux-usb@...r.kernel.org
Cc:     Anthony Wong <anthony.wong@...onical.com>,
        Mario.Limonciello@...l.com,
        Andreas Noever <andreas.noever@...il.com>,
        Yehezkel Bernat <YehezkelShB@...il.com>,
        Michael Jamet <michael.jamet@...el.com>,
        Rajmohan Mani <rajmohan.mani@...el.com>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Nicholas Johnson <nicholas.johnson-opensource@...look.com.au>,
        Alan Stern <stern@...land.harvard.edu>,
        linux-kernel@...r.kernel.org, Lukas Wunner <lukas@...ner.de>
Subject: Re: [RFC PATCH 05/22] thunderbolt: Add helper macros to iterate
 over switch ports

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[i]))
> -                       tb_switch_suspend(sw->ports[i].remote->sw);
> -       }
> +       tb_switch_for_each_remote_port(sw, i)
> +               tb_switch_suspend(sw->ports[i].remote->sw);

This macro looks a bit prone to misunderstanding.
I guess the function would be better if the test could be seen.

	Regards
		Oliver

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ