On Fri, May 26, 2017 at 7:09 PM, Mika Westerberg
<mika.westerb...@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.shevche...@gmail.com>

-- 
With Best Regards,
Andy Shevchenko

Reply via email to