Re: [PATCH] [USB] UAS: eliminate infinite loop; add debug print

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

 



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

--- On Mon, 11/8/10, Matthew Wilcox <willy@xxxxxxxxxxxxxxx> 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@xxxxxxxxx> 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@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux