public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: "Michał Nazarewicz" <m.nazarewicz@samsung.com>
To: Matthew Wilcox <willy@linux.intel.com>, Luben Tuikov <ltuikov@yahoo.com>
Cc: Greg KH <greg@kroah.com>,
	linux-usb@vger.kernel.org, linux-scsi@vger.kernel.org
Subject: Re: [PATCH] [USB] UAS: eliminate infinite loop; add debug print
Date: Mon, 08 Nov 2010 18:40:47 +0100	[thread overview]
Message-ID: <op.vlu4p9uc7p4s8u@pikus> (raw)
In-Reply-To: <272723.33242.qm@web31808.mail.mud.yahoo.com>

>> -0700, Luben Tuikov wrote:
>> > Also add a debug option and a few debug prints.

> --- On Mon, 11/8/10, Matthew Wilcox <willy@linux.intel.com> wrote:
>> Why have you added your own debug scheme instead of using
>> dev_dbg?

On Mon, 08 Nov 2010 18:27:22 +0100, Luben Tuikov <ltuikov@yahoo.com> wrote:
> Because, this debug "scheme" produces copious and otherwise unnecessary
> volume of debug information in a working driver. And because you can turn
> it on/off just for this driver. It is intended to be used only for
> debugging this driver and the UAS device(s) to which the driver
> communicates. 99.9% of the time, this setting will be a 'N' out there.
> And this is what the Kconfig help entry says: "If unsure, say 'N'."

dev_dbg() and pr_debug() are no-ops when DEBUG is not defined, so
proper way to do things is to use dev_dbg() and put the following
before any #includes:

#ifdef CONFIG_USB_UAS_DEBUG
#  define DEBUG 1
#endif

-- 
Best regards,                                        _     _
| Humble Liege of Serenely Enlightened Majesty of  o' \,=./ `o
| Computer Science,  Michał "mina86" Nazarewicz       (o o)
+----[mina86*mina86.com]---[mina86*jabber.org]----ooO--(_)--Ooo--
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  parent reply	other threads:[~2010-11-08 17:40 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-30  0:33 [PATCH] [USB] UAS: eliminate infinite loop; add debug print Luben Tuikov
2010-11-03 16:24 ` Greg KH
2010-11-08 11:24 ` Matthew Wilcox
2010-11-08 15:55   ` Greg KH
2010-11-08 17:27   ` Luben Tuikov
     [not found]     ` <272723.33242.qm-5Es2LHxk9sSvuULXzWHTWIglqE1Y4D90QQ4Iyu8u01E@public.gmane.org>
2010-11-08 17:38       ` Greg KH
2010-11-08 17:57         ` Luben Tuikov
2010-11-08 17:40     ` Michał Nazarewicz [this message]
  -- strict thread matches above, loose matches on Subject: below --
2010-12-10 10:51 Luben Tuikov

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=op.vlu4p9uc7p4s8u@pikus \
    --to=m.nazarewicz@samsung.com \
    --cc=greg@kroah.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=ltuikov@yahoo.com \
    --cc=willy@linux.intel.com \
    /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