[PATCH v2 39/45] drivers: tty: serial: efm32-uart: use devm_* functions
Uwe Kleine-König
u.kleine-koenig at pengutronix.de
Fri Mar 15 18:46:12 AEDT 2019
Hello Enrico,
On Thu, Mar 14, 2019 at 11:34:09PM +0100, Enrico Weigelt, metux IT consult wrote:
> Use the safer devm versions of memory mapping functions.
In which aspect is devm_ioremap safer than ioremap?
The only upside I'm aware of is that the memory is automatically
unmapped on device unbind. But we don't benefit from this because an
UART port is "released" before the device is unbound and we call
devm_iounmap() then anyhow. So this patch just adds a memory allocation
(side note: on a platform that is quite tight on RAM) with no added
benefit.
I didn't look at the other patches in this series, but assuming that
they are similar in spirit, the same question applies for them.
Do I miss anything?
Best regards
Uwe
--
Pengutronix e.K. | Uwe Kleine-König |
Industrial Linux Solutions | http://www.pengutronix.de/ |
More information about the Linuxppc-dev
mailing list