Re: [RFC PATCH 4/8] misc: emif: add basic infrastructure for EMIF driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Friday 17 February 2012 07:14 PM, Cousson, Benoit wrote:
Hi Aneesh,

[...]

+ emif = kzalloc(sizeof(struct emif_data), GFP_KERNEL);

You should use the devm_* version of this API to get the simplify the
error handling / removal.

Please note that most of my allocations are happening through
kmemdup(). kmemdup() doesn't have a devm_* equivalent. So, I have a
cleanup() function and in the interest of uniformity decided to avoid
devm_* variants altogether.

I think it still worth using devm_kzalloc + memcopy here instead of
kmemdup to avoid the cleanup() and simplify as well the error handling.

I will do that.


You might even propose a new devm_kmemdup API if you want.

Ok. I will attempt that, maybe both devm_kmalloc() and devm_kmemdup().
But I would like to de-couple that from this series. That is, I will do
the patch separately and if that gets up-streamed I will update EMIF
driver to use them. Until then I will go with what you suggested above.

br,
Aneesh
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux