summaryrefslogtreecommitdiffstats
path: root/drivers/rtc/rtc-ds1307.c
diff options
context:
space:
mode:
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>2021-12-21 17:16:47 +0900
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-12-21 10:32:08 +0100
commit60f07e74f86b47973bc1dc82e2128973932be55f (patch)
treeff31f5e1b57c424628a9541072d14d1e87c85e6b /drivers/rtc/rtc-ds1307.c
parent0032ca576a79946492194ae4860b462d32815c66 (diff)
downloadlinux-60f07e74f86b47973bc1dc82e2128973932be55f.tar.gz
linux-60f07e74f86b47973bc1dc82e2128973932be55f.tar.bz2
linux-60f07e74f86b47973bc1dc82e2128973932be55f.zip
counter: ti-eqep: Use container_of instead of struct counter_device::priv
Using counter->priv is a memory read and so more expensive than container_of which is only an addition. (In this case even a noop because the offset is 0.) So container_of is expected to be a tad faster, it's type-safe, and produces smaller code (ARCH=arm allmodconfig): $ source/scripts/bloat-o-meter drivers/counter/ti-eqep.o-pre drivers/counter/ti-eqep.o add/remove: 0/0 grow/shrink: 0/9 up/down: 0/-108 (-108) Function old new delta ti_eqep_position_enable_write 132 120 -12 ti_eqep_position_enable_read 260 248 -12 ti_eqep_position_ceiling_write 132 120 -12 ti_eqep_position_ceiling_read 236 224 -12 ti_eqep_function_write 220 208 -12 ti_eqep_function_read 372 360 -12 ti_eqep_count_write 312 300 -12 ti_eqep_count_read 236 224 -12 ti_eqep_action_read 664 652 -12 Total: Before=4598, After=4490, chg -2.35% Acked-by: David Lechner <david@lechnology.com> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: William Breathitt Gray <vilhelm.gray@gmail.com> Link: https://lore.kernel.org/r/4bde7cbd9e43a5909208102094444219d3154466.1640072891.git.vilhelm.gray@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/rtc/rtc-ds1307.c')
0 files changed, 0 insertions, 0 deletions