[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <93e8f8135f2c459b7694ef1a22636f7b@agner.ch>
Date: Fri, 06 Feb 2015 20:40:43 +0100
From: Stefan Agner <stefan@...er.ch>
To: Uwe Kleine-König <u.kleine-koenig@...gutronix.de>
Cc: linus.walleij@...aro.org, linux-kernel@...r.kernel.org,
linux-gpio@...r.kernel.org, kernel@...gutronix.de,
shawn.guo@...aro.org, linux-arm-kernel@...ts.infradead.org
Subject: Re: [PATCH] pinctrl: imx: do not implicitly set pin regs to -1
On 2015-02-06 20:21, Uwe Kleine-König wrote:
> Hallo Stefan,
>
> On Fri, Feb 06, 2015 at 05:30:56PM +0100, Stefan Agner wrote:
>> - memset(info->pin_regs, 0xff, sizeof(*info->pin_regs) * info->npins);
>> +
>> + for (i = 0; i < info->npins; i++) {
>> + info->pin_regs[i].mux_reg = -1;
>> + info->pin_regs[i].conf_reg = -1;
>> + }
> looks definitely better. Just out of interest, did you check if it
> changes the generated code?
Just checked quickly, before it branched to memset. The object file is
24 bytes larger. I guess memset might be a bit faster due to optimized
memory access. But not worth for some error handling relevant
initialization code IMHO...
--
Stefan
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists