> --- a/drivers/net/dsa/mv88e6xxx.c
> +++ b/drivers/net/dsa/mv88e6xxx.c
> @@ -2663,11 +2663,15 @@ int mv88e6xxx_setup_ports(struct dsa_switch *ds)
>  int mv88e6xxx_setup_common(struct dsa_switch *ds)
>  {
>       struct mv88e6xxx_priv_state *ps = ds_to_priv(ds);
> +     int id;
>  
>       ps->ds = ds;
>       mutex_init(&ps->smi_mutex);
>  
> -     ps->id = REG_READ(REG_PORT(0), PORT_SWITCH_ID) & 0xfff0;
> +     id = REG_READ(REG_PORT(0), PORT_SWITCH_ID);
> +
> +     ps->id = id & 0xfff0;
> +     ps->rev = id & 0xf;

ps->rev is not actually used anywhere. Drop it.

        Andrew

Reply via email to