Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1380386

Re: [PATCH net-next v2 2/7] net: dsa: mv88e6xxx: drop revision probing

From Andrew Lunn <andrew@lunn.ch>
Newsgroups linux.kernel
Subject Re: [PATCH net-next v2 2/7] net: dsa: mv88e6xxx: drop revision probing
Date 2016-04-16 01:50 +0200
Message-ID <rolES-2Dq-9@gated-at.bofh.it> (permalink)
References <rollw-2sf-7@gated-at.bofh.it> <rollx-2sf-29@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Fri, Apr 15, 2016 at 07:21:23PM -0400, Vivien Didelot wrote:
> There is no point in having special case for the revision when probing a
> switch model. The code gets cluttered with unnecessary defines, and
> leads to errors when code such as mv88e6131_setup compares
> PORT_SWITCH_ID_6131_B2 to ps->id which mask the revision.
> 
> Drop every revision definitions, add a ps->rev variable for eventual
> runtime checking and lookup only the product number.

You forgot to update the commit message. ps->rev has been removed in
this version.

>  
>  	/* Look up the exact switch ID */

This comment now becomes meaningless. Please delete.

>  	for (i = 0; i < num; ++i)
> -		if (table[i].id == ret)
> +		if (table[i].id == (ret & 0xfff0))
>  			return table[i].name;

			Andrew

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[PATCH net-next v2 0/7] net: dsa: mv88e6xxx: factorize switch info Vivien Didelot <vivien.didelot@savoirfairelinux.com> - 2016-04-16 01:30 +0200
  [PATCH net-next v2 6/7] net: dsa: mv88e6xxx: add number of db to info Vivien Didelot <vivien.didelot@savoirfairelinux.com> - 2016-04-16 01:30 +0200
    Re: [PATCH net-next v2 6/7] net: dsa: mv88e6xxx: add number of db to  info Andrew Lunn <andrew@lunn.ch> - 2016-04-16 02:10 +0200
  [PATCH net-next v2 7/7] net: dsa: mv88e6xxx: remove switch ID Vivien Didelot <vivien.didelot@savoirfairelinux.com> - 2016-04-16 01:30 +0200
    Re: [PATCH net-next v2 7/7] net: dsa: mv88e6xxx: remove switch ID Andrew Lunn <andrew@lunn.ch> - 2016-04-16 02:10 +0200
  [PATCH net-next v2 3/7] net: dsa: mv88e6xxx: add switch info Vivien Didelot <vivien.didelot@savoirfairelinux.com> - 2016-04-16 01:30 +0200
    Re: [PATCH net-next v2 3/7] net: dsa: mv88e6xxx: add switch info Andrew Lunn <andrew@lunn.ch> - 2016-04-16 02:00 +0200
  [PATCH net-next v2 2/7] net: dsa: mv88e6xxx: drop revision probing Vivien Didelot <vivien.didelot@savoirfairelinux.com> - 2016-04-16 01:30 +0200
    Re: [PATCH net-next v2 2/7] net: dsa: mv88e6xxx: drop revision  probing Andrew Lunn <andrew@lunn.ch> - 2016-04-16 01:50 +0200

csiph-web