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: <CAHp75Veby_6j=XjrQTkHyuPcqA4qUyaucq5jAcCQAXTbau90Sg@mail.gmail.com>
Date:   Sat, 27 May 2017 19:03:30 +0300
From:   Andy Shevchenko <andy.shevchenko@...il.com>
To:     Mika Westerberg <mika.westerberg@...ux.intel.com>
Cc:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Andreas Noever <andreas.noever@...il.com>,
        Michael Jamet <michael.jamet@...el.com>,
        Yehezkel Bernat <yehezkel.bernat@...el.com>,
        Lukas Wunner <lukas@...ner.de>,
        Amir Levy <amir.jer.levy@...el.com>,
        Andy Lutomirski <luto@...nel.org>,
        Mario Limonciello <Mario.Limonciello@...l.com>,
        Jared.Dominguez@...l.com,
        Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v2 21/27] thunderbolt: Store Thunderbolt generation in the
 switch structure

On Fri, May 26, 2017 at 7:09 PM, Mika Westerberg
<mika.westerberg@...ux.intel.com> wrote:
> In some cases it is useful to know what is the Thunderbolt generation
> the switch supports. This introduces a new field to struct switch that
> stores the generation of the switch based on the device ID. Unknown
> switches (there should be none) are assumed to be first generation to be
> on the safe side.

> +       default:
> +               tb_sw_warn(sw, "unsupported switch device id %#x\n",
> +                          sw->config.device_id);

> +               /* Fall through */

I would rather be explicit here. And perhaps even mention in the
message we are falling back to 1.

> +       case PCI_DEVICE_ID_INTEL_LIGHT_RIDGE:
> +       case PCI_DEVICE_ID_INTEL_EAGLE_RIDGE:
> +       case PCI_DEVICE_ID_INTEL_LIGHT_PEAK:
> +       case PCI_DEVICE_ID_INTEL_CACTUS_RIDGE_2C:
> +       case PCI_DEVICE_ID_INTEL_CACTUS_RIDGE_4C:
> +       case PCI_DEVICE_ID_INTEL_PORT_RIDGE:
> +       case PCI_DEVICE_ID_INTEL_REDWOOD_RIDGE_2C_BRIDGE:
> +       case PCI_DEVICE_ID_INTEL_REDWOOD_RIDGE_4C_BRIDGE:
> +               return 1;

Other than that
FWIW:
Reviewed-by: Andy Shevchenko <andy.shevchenko@...il.com>

-- 
With Best Regards,
Andy Shevchenko

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ