Thread (13 messages) 13 messages, 2 authors, 2017-06-08

Re: [PATCH net-next 1/7] net: dsa: mv88e6xxx: provide printing macros

flat view

From: Andrew Lunn <andrew@lunn.ch>
Date: 2017-06-08 19:37:17
Also in: lkml

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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help