Re: [PATCH V4] mtd: Add DiskOnChip G3 support

From: Arnd Bergmann
Date: Sat Oct 01 2011 - 11:03:23 EST


On Saturday 01 October 2011 14:19:08 Robert Jarzmik wrote:
> Arnd Bergmann <arnd@xxxxxxxx> 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 ?

In my experience, the kind of debugging data you need for analysing a problem
on someone else's system is not just a trace of the commands you send to
a device but more complicated to get, so you are dependent on a clueful
bug reporter anyway.

If you have successfully debugged a remote problem just by looking at a dump,
then you should certainly leave the code in there.

> > 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 ...

Right, that was the idea.

Arnd
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/