From: Robert Jarzmik <robert.jarzmik@free.fr>
To: Arnd Bergmann <arnd@arndb.de>
Cc: dedekind1@gmail.com, dwmw2@infradead.org,
linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH V4] mtd: Add DiskOnChip G3 support
Date: Sat, 01 Oct 2011 14:19:08 +0200 [thread overview]
Message-ID: <87y5x4hpkz.fsf@free.fr> (raw)
In-Reply-To: <201109281445.47715.arnd@arndb.de> (Arnd Bergmann's message of "Wed, 28 Sep 2011 14:45:47 +0200")
Arnd Bergmann <arnd@arndb.de> writes:
> I generally recommend removing debug messages like this entirely from
> production code. If you need them on production systems, that is an indication
> that the code quality is not good enough.
Perhaps.
But when you create a driver without any specification, and you release it to
the communauty, there will be unmet behaviours. So, when someone will ask me
"why in my board XXX my docg3 can't read data ?" how can I improve the driver
without any traces ?
> Enabling the debug output like
> this also creates a lot of almost identical strings, which you don't need
> if you turn it into an extern function that does
>
> static const char docseq[] = {
> [DOC_SEQ_RESET] = "reset",
> [DOC_SEQ_PAGE_SIZE_532] = "page_size_532",
> };
> dev_dbg(dev, "doc_flashSequence: %02x %s\n", docseq[seq]);
> with exactly the same output.
That doesn't look very good, as the sequence numbers are sparse numbers, and we
can finish with an array with values (0, 3, 8, 0xff) filled, and all the
remaining are null pointers (as these sequence numbers don't exist).
> Or you could turn the entire tracing into trace events and do the parsing
> in user space, which seems appropriate if you frequently need to trace
> these.
This looks much much better. I'll have a peek into that, as only (io_address,
read/write, width, value) could be dumped, and userland application could
translate it into sequence/nop/flashcontrol ... etc ...
--
Robert
next prev parent reply other threads:[~2011-10-01 12:19 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-21 19:27 [PATCH V4] mtd: Add DiskOnChip G3 support Robert Jarzmik
2011-09-22 14:45 ` Artem Bityutskiy
2011-09-22 17:42 ` Robert Jarzmik
2011-09-27 13:39 ` Arnd Bergmann
2011-09-27 17:51 ` Robert Jarzmik
2011-09-28 12:45 ` Arnd Bergmann
2011-10-01 12:19 ` Robert Jarzmik [this message]
2011-10-01 15:02 ` Arnd Bergmann
2011-09-23 19:14 ` [PATCH V5] " Robert Jarzmik
2011-09-27 12:58 ` Artem Bityutskiy
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=87y5x4hpkz.fsf@free.fr \
--to=robert.jarzmik@free.fr \
--cc=arnd@arndb.de \
--cc=dedekind1@gmail.com \
--cc=dwmw2@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mtd@lists.infradead.org \
/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