Hi Andrew, Andrew Lunn <and...@lunn.ch> writes:
> Different families have different sets of statistics. Abstract this > using a stats_get_sset_count op. Each stat has a bitmap, and the ops > implementer uses a bit map mask to count the statistics which apply > for the family. > -static int mv88e6xxx_get_sset_count(struct dsa_switch *ds) > +static int _mv88e6xxx_get_sset_count(struct mv88e6xxx_chip *chip, int types) Looks good overall. But please don't re-introduce underscore-prefixed helpers. If I'm not mistaken, stats are a Global 1 feature, so ordered explicit helpers in global1.c will be perfect. If the stats code is huge, don't hesitate to move them in a global1_stats.c file, as you wish. But we have to keep it self-documented and easy to follow for new developers. Thanks, Vivien