mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH 0/2] gpiolib: minor optimization
@ 2020-01-27 11:44 Uwe Kleine-König
  2020-01-27 11:44 ` [PATCH 1/2] gpiolib: reorder functions Uwe Kleine-König
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Uwe Kleine-König @ 2020-01-27 11:44 UTC (permalink / raw)
  To: barebox; +Cc: Uwe Kleine-König

From: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

Hello,

while working on gpiolib I noticed that gpio_request_one() repeatedly
checks the validity of the gpio_info obtained by gpio_to_desc().

This series introduces some helper functions (prefixed gpioinfo_) that
take an gpio_info instead of a plain gpio number and assume this pointer
to be valid.

The saved runtime is probably too small to measure, so I didn't even
try. Semantically there is no change intended.

Best regards
Uwe

Uwe Kleine-König (2):
  gpiolib: reorder functions
  gpiolib: introduce helper functions working on gpio_info structs

 drivers/gpio/gpiolib.c | 243 +++++++++++++++++++++++++----------------
 1 file changed, 150 insertions(+), 93 deletions(-)

-- 
2.24.0


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-01-27 13:14 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-27 11:44 [PATCH 0/2] gpiolib: minor optimization Uwe Kleine-König
2020-01-27 11:44 ` [PATCH 1/2] gpiolib: reorder functions Uwe Kleine-König
2020-01-27 11:44 ` [PATCH 2/2] gpiolib: introduce helper functions working on gpio_info structs Uwe Kleine-König
2020-01-27 13:14 ` [PATCH 0/2] gpiolib: minor optimization Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox