lkml.org 
[lkml]   [2017]   [May]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [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@linux.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@gmail.com>

--
With Best Regards,
Andy Shevchenko

\
 
 \ /
  Last update: 2017-05-27 18:04    [W:0.199 / U:1.672 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site