Re: [PATCH 3/7] [media] cx231xx: Cleanup printk at the driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Em Sat, 01 Nov 2014 16:01:12 +0200
Antti Palosaari <crope@xxxxxx> escreveu:

> On 11/01/2014 03:38 PM, Mauro Carvalho Chehab wrote:
> > There are lots of debug printks printed with pr_info. Also, the
> > printk's data are not too coherent:
> >
> > - there are duplicated driver name at the print format;
> > - function name format string differs from function to function;
> > - long strings broken into multiple lines;
> > - some printks just produce ugly reports, being almost useless
> >    as-is.
> >
> > Do a cleanup on that.
> >
> > Still, there are much to be done in order to do a better printk
> > job on this driver, but, at least it will now be a way less
> > verbose, if debug printks are disabled, and some logs might
> > actually be useful.
> 
> As you do that kind of cleanup, why don't just use a bit more time and 
> do it properly using dev_foo() logging. Basically all device drivers 
> should use dev_foo() logging, it prints module name, bus number etc. 
> automatically in a standard manner. pr_foo() is worse, which should be 
> only used for cases where pointer to device is not available (like library).

Please notice that my only goal with this series is to be able to
check if analog/digital is still working after Mattias's i2c mux
patchsets. I don't have much time right now for a more complete
cleanup.

Several of the printks are done before creating the cx231xx device
struct. See the places where cx231xx_errdev() were called before
patch 1/7.

The cx231xx probing is complex. Not sure if it is possible
to convert everything to dev_foo() and mixing pr_foo with dev_foo()
seems to be worse.

I may revisit it some other time and try to evaluate the impact of
doing such change when I have more spare time.

Regards,
Mauro
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux