public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
From: Ian Cowan <ian@linux.cowan.aero>
To: Greg KH <gregkh@linuxfoundation.org>
Cc: Dan Carpenter <dan.carpenter@oracle.com>,
	clabbe@baylibre.com, mchehab@kernel.org,
	mjpeg-users@lists.sourceforge.net, linux-media@vger.kernel.org,
	linux-staging@lists.linux.dev
Subject: Re: [PATCH] media: staging: zoran: refactor printk debugging function
Date: Sat, 23 Apr 2022 01:23:31 -0400	[thread overview]
Message-ID: <YmONU1yZ9FATroR9@fedora> (raw)
In-Reply-To: <YmI4yh88pYVvVE/X@kroah.com>

On Fri, Apr 22, 2022 at 07:10:34AM +0200, Greg KH wrote:
> 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
> 

I just resubmitted and this time used dev_dbg() (I split the resubmitted
patch into 4 parts that will work if they are applied in order). There
were a few places that pr_debug() had to be used (or it can be changed
back to dprintk()) because they are cleanup functions and do not have
any devices available at the cleanup. If there is a better way to handle
that, I will go back and make a modification to that. Other than those 3
spots, dev_dbg() is being used.

---
Ian Cowan

  reply	other threads:[~2022-04-23  5:23 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-21  0:23 [PATCH] media: staging: zoran: refactor printk debugging function Ian Cowan
2022-04-21 14:21 ` Dan Carpenter
2022-04-21 15:22   ` Ian Cowan
2022-04-21 15:52     ` Dan Carpenter
2022-04-21 18:13       ` Ian Cowan
2022-04-22  0:30       ` Ian Cowan
2022-04-22  5:10         ` Greg KH
2022-04-23  5:23           ` Ian Cowan [this message]
2022-04-23  5:51             ` Greg KH

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YmONU1yZ9FATroR9@fedora \
    --to=ian@linux.cowan.aero \
    --cc=clabbe@baylibre.com \
    --cc=dan.carpenter@oracle.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-media@vger.kernel.org \
    --cc=linux-staging@lists.linux.dev \
    --cc=mchehab@kernel.org \
    --cc=mjpeg-users@lists.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox