Re: [PATCH V2] regulator: core: fix constraints debug output

From: Mark Brown
Date: Tue Jun 09 2015 - 14:57:56 EST


On Tue, Jun 09, 2015 at 08:49:14PM +0200, Stefan Wahren wrote:
> > Mark Brown <broonie@xxxxxxxxxx> hat am 9. Juni 2015 um 20:00 geschrieben:

> > If we know how much output we might produce then why not extend the
> > buffer so we don't need to cut it off? The defensive programming is
> > good but that seems a better fix.

> I thought the intension was to keep the output in "one" line. If not i suggest
> to increase the size to 160 bytes, which is sufficient for all cases.

No, it was just the first number I thought of - we'll scroll off the end
of an 80 column line anyway due to the prefixes that get added (time,
regulator subsystem name and so on). The bounds checking seems good but
it seems like a second patch after bumping the buffer which is a much
more focused fix for stable. I've also just done a separate patch for
the buffer corruption you reported.

Attachment: signature.asc
Description: Digital signature