[PATCH 2/7] staging: nvec: use dev_warn instead of printk
Greg KH
gregkh at linuxfoundation.org
Fri Jun 15 22:53:28 UTC 2012
On Sat, Jun 16, 2012 at 12:06:30AM +0200, Julian Andres Klode wrote:
> On Thu, Jun 14, 2012 at 11:57:36PM +0200, Marc Dietrich wrote:
> > Replace a printk in nvec core driver with dev_warn.
> >
> > Signed-off-by: Marc Dietrich <marvin24 at gmx.de>
> > ---
> > - printk(KERN_WARNING "unhandled msg type %ld\n", event_type);
> > + dev_warn(nvec->dev, "unhandled msg type %ld\n", event_type);
> > print_hex_dump(KERN_WARNING, "payload: ", DUMP_PREFIX_NONE, 16, 1,
> > msg, msg[1] + 2, true);
>
> Is this stuff sensible at all? Now we have two lines, the first is
> prefixed with the device, the second not, but both belong together.
I really want a dev_hex_dump() function, which can then get split up
into dev_hex_dump_warn(), dev_hex_dump_dbg() and the like. If we had
that, it could be used here, as well as a number of other places in the
kernel.
Anyone want to work on this?
thanks,
greg k-h
More information about the devel
mailing list