* [patch 2.6.28-rc4] gpiolib: extend gpio label column width in debugfs file @ 2008-11-12 6:56 Jarkko Nikula 2008-11-14 1:02 ` Andrew Morton 0 siblings, 1 reply; 4+ messages in thread From: Jarkko Nikula @ 2008-11-12 6:56 UTC (permalink / raw) To: linux-kernel; +Cc: David Brownell, Jarkko Nikula There are already various drivers having bigger label than 12 bytes. Most of them fit well under 20 bytes but make column width exact so that oversized labels don't mess up output alignment. Signed-off-by: Jarkko Nikula <jarkko.nikula@nokia.com> --- drivers/gpio/gpiolib.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c index faa1cc6..82020ab 100644 --- a/drivers/gpio/gpiolib.c +++ b/drivers/gpio/gpiolib.c @@ -1134,7 +1134,7 @@ static void gpiolib_dbg_show(struct seq_file *s, struct gpio_chip *chip) continue; is_out = test_bit(FLAG_IS_OUT, &gdesc->flags); - seq_printf(s, " gpio-%-3d (%-12s) %s %s", + seq_printf(s, " gpio-%-3d (%-20.20s) %s %s", gpio, gdesc->label, is_out ? "out" : "in ", chip->get -- 1.5.6.5 ^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [patch 2.6.28-rc4] gpiolib: extend gpio label column width in debugfs file 2008-11-12 6:56 [patch 2.6.28-rc4] gpiolib: extend gpio label column width in debugfs file Jarkko Nikula @ 2008-11-14 1:02 ` Andrew Morton 2008-11-14 1:13 ` David Brownell 0 siblings, 1 reply; 4+ messages in thread From: Andrew Morton @ 2008-11-14 1:02 UTC (permalink / raw) To: Jarkko Nikula; +Cc: linux-kernel, david-b, jarkko.nikula, stable On Wed, 12 Nov 2008 08:56:13 +0200 Jarkko Nikula <jarkko.nikula@nokia.com> wrote: > There are already various drivers having bigger label than 12 bytes. Most > of them fit well under 20 bytes but make column width exact so that > oversized labels don't mess up output alignment. Please provide before-and-after example output for this sort of change so that we can better understand its effect. > Signed-off-by: Jarkko Nikula <jarkko.nikula@nokia.com> > --- > drivers/gpio/gpiolib.c | 2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > > diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c > index faa1cc6..82020ab 100644 > --- a/drivers/gpio/gpiolib.c > +++ b/drivers/gpio/gpiolib.c > @@ -1134,7 +1134,7 @@ static void gpiolib_dbg_show(struct seq_file *s, struct gpio_chip *chip) > continue; > > is_out = test_bit(FLAG_IS_OUT, &gdesc->flags); > - seq_printf(s, " gpio-%-3d (%-12s) %s %s", > + seq_printf(s, " gpio-%-3d (%-20.20s) %s %s", > gpio, gdesc->label, > is_out ? "out" : "in ", > chip->get This is a non-backward-compatible change to a userspace interface. It looks like a pretty safe one, but this is always a fairly big deal. If we're going to make this change then we should backport it to 2.6.27.x, 2.6.26.x and to 2.6.25.x to minimise the chance that someone will write a parser which works on one kernel version and fails on another. David? Thoughts? ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [patch 2.6.28-rc4] gpiolib: extend gpio label column width in debugfs file 2008-11-14 1:02 ` Andrew Morton @ 2008-11-14 1:13 ` David Brownell 2008-11-14 1:18 ` Andrew Morton 0 siblings, 1 reply; 4+ messages in thread From: David Brownell @ 2008-11-14 1:13 UTC (permalink / raw) To: Andrew Morton; +Cc: Jarkko Nikula, linux-kernel, stable On Thursday 13 November 2008, Andrew Morton wrote: > On Wed, 12 Nov 2008 08:56:13 +0200 > Jarkko Nikula <jarkko.nikula@nokia.com> wrote: > > > There are already various drivers having bigger label than 12 bytes. Most > > of them fit well under 20 bytes but make column width exact so that > > oversized labels don't mess up output alignment. > > Please provide before-and-after example output for this sort of change > so that we can better understand its effect. > > > Signed-off-by: Jarkko Nikula <jarkko.nikula@nokia.com> I meant to send: Acked-by: David Brownell <dbrownell@users.sourceforge.net> ... thanks Jarkko. > > --- > > drivers/gpio/gpiolib.c | 2 +- > > 1 files changed, 1 insertions(+), 1 deletions(-) > > > > diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c > > index faa1cc6..82020ab 100644 > > --- a/drivers/gpio/gpiolib.c > > +++ b/drivers/gpio/gpiolib.c > > @@ -1134,7 +1134,7 @@ static void gpiolib_dbg_show(struct seq_file *s, struct gpio_chip *chip) > > continue; > > > > is_out = test_bit(FLAG_IS_OUT, &gdesc->flags); > > - seq_printf(s, " gpio-%-3d (%-12s) %s %s", > > + seq_printf(s, " gpio-%-3d (%-20.20s) %s %s", > > gpio, gdesc->label, > > is_out ? "out" : "in ", > > chip->get > > This is a non-backward-compatible change to a userspace interface. It > looks like a pretty safe one, but this is always a fairly big deal. Not really; this is for debugfs, and formats for debug data are not ABI-suitable. Developers need the flexibility to change that stuff ... for example, they can *already* override the default format to show pullups/pulldowns, drive strength, polarity inversion, debouncing, and other hardware-specific goodies. > If we're going to make this change then we should backport it to > 2.6.27.x, 2.6.26.x and to 2.6.25.x to minimise the chance that someone > will write a parser which works on one kernel version and fails on > another. > > David? Thoughts? This is explicitly not supported for ABI-ish purposes. If they aren't even using those parenthesis to delimit things, I'd really need to question what happened to their grey cells! - Dave ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [patch 2.6.28-rc4] gpiolib: extend gpio label column width in debugfs file 2008-11-14 1:13 ` David Brownell @ 2008-11-14 1:18 ` Andrew Morton 0 siblings, 0 replies; 4+ messages in thread From: Andrew Morton @ 2008-11-14 1:18 UTC (permalink / raw) To: David Brownell; +Cc: jarkko.nikula, linux-kernel, stable On Thu, 13 Nov 2008 17:13:38 -0800 David Brownell <david-b@pacbell.net> wrote: > On Thursday 13 November 2008, Andrew Morton wrote: > > On Wed, 12 Nov 2008 08:56:13 +0200 > > Jarkko Nikula <jarkko.nikula@nokia.com> wrote: > > > > > There are already various drivers having bigger label than 12 bytes. Most > > > of them fit well under 20 bytes but make column width exact so that > > > oversized labels don't mess up output alignment. > > > > Please provide before-and-after example output for this sort of change > > so that we can better understand its effect. > > > > > Signed-off-by: Jarkko Nikula <jarkko.nikula@nokia.com> > > I meant to send: > > Acked-by: David Brownell <dbrownell@users.sourceforge.net> > > ... thanks Jarkko. > OK. > > > --- > > > drivers/gpio/gpiolib.c | 2 +- > > > 1 files changed, 1 insertions(+), 1 deletions(-) > > > > > > diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c > > > index faa1cc6..82020ab 100644 > > > --- a/drivers/gpio/gpiolib.c > > > +++ b/drivers/gpio/gpiolib.c > > > @@ -1134,7 +1134,7 @@ static void gpiolib_dbg_show(struct seq_file *s, struct gpio_chip *chip) > > > continue; > > > > > > is_out = test_bit(FLAG_IS_OUT, &gdesc->flags); > > > - seq_printf(s, " gpio-%-3d (%-12s) %s %s", > > > + seq_printf(s, " gpio-%-3d (%-20.20s) %s %s", > > > gpio, gdesc->label, > > > is_out ? "out" : "in ", > > > chip->get > > > > This is a non-backward-compatible change to a userspace interface. It > > looks like a pretty safe one, but this is always a fairly big deal. > > Not really; this is for debugfs, and formats for debug data > are not ABI-suitable. Developers need the flexibility to > change that stuff ... Well that's what we like to say, but it's delusional. If we add stuff then later change it, other people's stuff will break. Just as with sysfs, procfs, syscalls, etc. The only difference is that with debugfs we have this weaselly excuse to get people off our backs. > for example, they can *already* override > the default format to show pullups/pulldowns, drive strength, > polarity inversion, debouncing, and other hardware-specific goodies. > > > > If we're going to make this change then we should backport it to > > 2.6.27.x, 2.6.26.x and to 2.6.25.x to minimise the chance that someone > > will write a parser which works on one kernel version and fails on > > another. > > > > David? Thoughts? > > This is explicitly not supported for ABI-ish purposes. > > If they aren't even using those parenthesis to delimit things, I'd > really need to question what happened to their grey cells! True. ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2008-11-14 1:18 UTC | newest] Thread overview: 4+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2008-11-12 6:56 [patch 2.6.28-rc4] gpiolib: extend gpio label column width in debugfs file Jarkko Nikula 2008-11-14 1:02 ` Andrew Morton 2008-11-14 1:13 ` David Brownell 2008-11-14 1:18 ` Andrew Morton
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.