On Sat, Jun 16, 2012 at 03:21:27PM +0200, Marc Dietrich wrote:
> On Friday 15 June 2012 15:53:28 Greg KH wrote:
> > 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 <[email protected]>
> > > > ---
> > > > -       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?
> 
> Well, I can look at it, but first I need to get this stuff right ;-) 
> @Julien: pr_warn is the alternative here, but I think dev_warn is perfered in 
> cases we can get the module device struct - right?

Yes, please stick with dev_warn() here, that is the correct thing to do.

greg k-h
_______________________________________________
devel mailing list
[email protected]
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel

Reply via email to