Re: [PATCH] media: staging: zoran: refactor printk debugging function

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

 



On Thu, Apr 21, 2022 at 08:30:25PM -0400, Ian Cowan wrote:
> On Thu, Apr 21, 2022 at 06:52:04PM +0300, Dan Carpenter wrote:
> > On Thu, Apr 21, 2022 at 11:22:00AM -0400, Ian Cowan wrote:
> > > 
> > > For using the dev_dbg() macro, do you define this in the header file
> > > (i.e. for this it would be videocodec.h), or where should this be
> > > included from?
> > 
> > dev_dbg() is defined in include/linux/dev_printk.h.  Look around at how
> > it's used.  pr_debug() might be an option, but I don't know if we will
> > accept that, we prefer dev_dbg().
> > 
> > regards,
> > dan carpenter
> > 
> 
> I'm about to submit the modified patch, but I went and looked and we
> cannot use dev_dbg() because these specific drivers do not have any
> association with a device struct.

Then please fix that issue, as there is a real struct device that they
are using somewhere.  That is the correct solution as drivers should
never use pr_* calls directly.

thanks,

greg k-h



[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