Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1661616
| From | Andrew Lunn <andrew@lunn.ch> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH net-next 1/7] net: dsa: mv88e6xxx: provide printing macros |
| Date | 2017-06-08 21:40 +0200 |
| Message-ID | <tQbrI-8p2-13@gated-at.bofh.it> (permalink) |
| References | <tQaYF-8eD-3@gated-at.bofh.it> <tQaYG-8eD-11@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Thu, Jun 08, 2017 at 03:04:39PM -0400, Vivien Didelot wrote:
> The mv88e6xxx driver accesses a port's netdev mostly for printing.
>
> This is bad for 2 reasons: DSA and CPU ports do not have a netdev
> pointer; it doesn't give us a correct picture of why a DSA driver might
> need to access a port's netdev.
>
> Introduce mv88e6xxx_{dbg,err,warn} macros to print messages with a
> prefix containing the real switch name (not the compatible one),
> as well as the switch and port indexes.
Hi Vivien
I agree with the principle, but wonder about the naming. We have some
stuff which is not per port, but at the chip level. It would be nice
to have a similar set of helpers, but which only take chip. So maybe
we want to call these mv88e6xxx_port_{dbg, err, warn} and later add
mv88e6xxx_chip_{dbg, err, warn}.
Andrew
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH net-next 1/7] net: dsa: mv88e6xxx: provide printing macros Vivien Didelot <vivien.didelot@savoirfairelinux.com> - 2017-06-08 21:10 +0200 Re: [PATCH net-next 1/7] net: dsa: mv88e6xxx: provide printing macros Andrew Lunn <andrew@lunn.ch> - 2017-06-08 21:40 +0200
csiph-web