Re: [RFC PATCH 2/2] iio: kfifo: Add resource management devm_iio_kfifo_allocate/free

From: Lars-Peter Clausen
Date: Thu Dec 18 2014 - 11:46:55 EST


On 12/09/2014 08:29 PM, Karol Wrona wrote:
iio kfifo allocate/free gained their devm_ wrappers.

Change-Id: I10c19ccd7c01491caf088b3629137425ddccd29c
Signed-off-by: Karol Wrona <k.wrona@xxxxxxxxxxx>
Suggested-by: Jonathan Cameron <jic23@xxxxxxxxxx>

Looks good to me.

[...]
+struct iio_buffer *devm_iio_kfifo_allocate(struct device *dev)
+{
+ struct iio_buffer **ptr, *r;
+
+ ptr = devres_alloc(devm_iio_kfifo_release, sizeof *ptr, GFP_KERNEL);

But this should be sizeof(*ptr) to compliant with the Linux kernel coding style.

[...]
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/