From: Andrew Lunn <andrew@lunn.ch>
To: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
kernel@savoirfairelinux.com,
"David S. Miller" <davem@davemloft.net>,
Florian Fainelli <f.fainelli@gmail.com>
Subject: Re: [PATCH net-next v2 2/7] net: dsa: mv88e6xxx: drop revision probing
Date: Sat, 16 Apr 2016 01:43:17 +0200 [thread overview]
Message-ID: <20160415234317.GB32136@lunn.ch> (raw)
In-Reply-To: <1460762488-2633-3-git-send-email-vivien.didelot@savoirfairelinux.com>
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
next prev parent reply other threads:[~2016-04-15 23:43 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-15 23:21 [PATCH net-next v2 0/7] net: dsa: mv88e6xxx: factorize switch info Vivien Didelot
2016-04-15 23:21 ` [PATCH net-next v2 1/7] net: dsa: mv88e6xxx: drop double ds assignment Vivien Didelot
2016-04-15 23:39 ` Andrew Lunn
2016-04-15 23:21 ` [PATCH net-next v2 2/7] net: dsa: mv88e6xxx: drop revision probing Vivien Didelot
2016-04-15 23:43 ` Andrew Lunn [this message]
2016-04-15 23:21 ` [PATCH net-next v2 3/7] net: dsa: mv88e6xxx: add switch info Vivien Didelot
2016-04-15 23:55 ` Andrew Lunn
2016-04-15 23:21 ` [PATCH net-next v2 4/7] net: dsa: mv88e6xxx: add family to info Vivien Didelot
2016-04-15 23:57 ` Andrew Lunn
2016-04-15 23:21 ` [PATCH net-next v2 5/7] net: dsa: mv88e6xxx: add number of ports " Vivien Didelot
2016-04-15 23:59 ` Andrew Lunn
2016-04-15 23:21 ` [PATCH net-next v2 6/7] net: dsa: mv88e6xxx: add number of db " Vivien Didelot
2016-04-16 0:01 ` Andrew Lunn
2016-04-15 23:21 ` [PATCH net-next v2 7/7] net: dsa: mv88e6xxx: remove switch ID Vivien Didelot
2016-04-16 0:03 ` Andrew Lunn
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160415234317.GB32136@lunn.ch \
--to=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=f.fainelli@gmail.com \
--cc=kernel@savoirfairelinux.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=vivien.didelot@savoirfairelinux.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox