[alsa-devel] [PATCH 00/62] Add definition for GPIO direction

Uwe Kleine-König u.kleine-koenig at pengutronix.de
Tue Nov 5 14:40:26 CET 2019


On Tue, Nov 05, 2019 at 03:30:25PM +0200, andriy.shevchenko at linux.intel.com wrote:
> On Tue, Nov 05, 2019 at 02:10:38PM +0100, Uwe Kleine-König wrote:
> > On Tue, Nov 05, 2019 at 12:54:55PM +0000, Vaittinen, Matti wrote:
> > > On Tue, 2019-11-05 at 14:20 +0200, Andy Shevchenko wrote:
> > > > I would also like to see bloat-o-meter statistics before and after
> > > > your patch.
> > > > My guts tell me that the result will be not in the favour of yours
> > > > solution.
> > > 
> > > Can you please tell me what type of stats you hope to see? I can try
> > > generating what you are after. The cover letter contained typical +/-
> > > change stats from git and summary:
> > > 
> > > 62 files changed, 228 insertions(+), 104 deletions(-)
> > 
> > I guess he wants to see
> > 
> > 	scripts/bloat-o-meter vmlinuz.old vmlinuz
> 
> Yes, but be sure you have compiled them all and build them all in.
> Otherwise you might get wrong result.
> 
> > . I would expect a 0 there. I didn't look in detail, but in general I
> > like the idea to give 0 and 1 a symbolic name.
> 
> I'll will be fine with that if and only if maintainers are okay. For now,
> I don't like the idea to trade bad for worse.

I don't see you concern.

	int somefunction(...)
	{
		return 1;
	}

is definitively worse than

	int somefunction(...)
	{
		return GPIO_LINE_DIRECTION_IN;
	}

and after cpp had its go on the source the compiler sees the exact same
thing, so I don't expect any size changes. The only change is that to
write (or understand) the above code, you have to know that 1
corresponds to GPIO input (or was it output?) while in the later
function it is obvious that we're talking about an input.

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |


More information about the Alsa-devel mailing list