Thread (2 messages) 2 messages, 2 authors, 2016-12-11

[PATCH V1] pinctrl:pxa:pinctrl-pxa2xx:- No need of devm functions

From: robert.jarzmik@free.fr (Robert Jarzmik)
Date: 2016-12-10 09:19:20
Also in: linux-gpio, lkml

Possibly related (same subject, not in this thread)

Arvind Yadav [off-list ref] writes:

Hi Arvind,
In functions pxa2xx_build_functions, the memory allocated for
'functions' is live within the function only. After the
allocation it is immediately freed with devm_kfree. There is
no need to allocate memory for 'functions' with devm function
so replace devm_kcalloc  with kcalloc and devm_kfree with kfree.
That's not very true : the "need" is to spare the "manual" kfree you're adding
in your patch for one, and make it consistent with pxa2xx_build_groups() and
pxa2xx_build_state() for two.

Therefore I'm not very thrilled by this patch and unless it fixes a defect in
the driver I'd rather not have it in.

Cheers.

--
Robert
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help