lkml.org 
[lkml]   [2020]   [Jul]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 01/20] dlb2: add skeleton for DLB 2.0 driver
On Fri, Jul 17, 2020 at 06:18:46PM +0000, Eads, Gage wrote:
>
>
> > -----Original Message-----
> > From: Greg KH <gregkh@linuxfoundation.org>
> > Sent: Sunday, July 12, 2020 10:58 AM
> > To: Eads, Gage <gage.eads@intel.com>
> > Cc: linux-kernel@vger.kernel.org; arnd@arndb.de; Karlsson, Magnus
> > <magnus.karlsson@intel.com>; Topel, Bjorn <bjorn.topel@intel.com>
> > Subject: Re: [PATCH 01/20] dlb2: add skeleton for DLB 2.0 driver
> >
> > On Sun, Jul 12, 2020 at 08:43:12AM -0500, Gage Eads wrote:
> > > +static int dlb2_probe(struct pci_dev *pdev,
> > > + const struct pci_device_id *pdev_id) {
> > > + struct dlb2_dev *dlb2_dev;
> > > + int ret;
> > > +
> > > + dev_dbg(&pdev->dev, "probe\n");
> >
> > ftrace is your friend. Remove all of your debugging code now, you don't need
> > it anymore, especially for stuff like this where you didn't even need it in the
> > first place :(
>
> I'll remove this and other similar dev_dbg() calls. This was an oversight on my part.
>
> I have other instances that a kprobe can't easily replace, such as printing structure contents, that are useful for tracing the usage of the driver. It looks like other misc drivers use dev_dbg() similarly -- do you consider this an acceptable use of a debug print?

Why can't a kernel tracepoint print a structure?

thanks,

greg k-h

\
 
 \ /
  Last update: 2020-07-18 08:47    [W:0.077 / U:0.128 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site