[PATCH v2] staging: android: ion: Add per-heap counters

Dan Carpenter dan.carpenter at oracle.com
Tue Sep 11 08:50:19 UTC 2018


On Tue, Sep 11, 2018 at 11:17:10AM +0300, Alexey Skidanov wrote:
> @@ -546,6 +556,38 @@ void ion_device_add_heap(struct ion_heap *heap)
>  	}
>  
>  	heap->dev = dev;
> +	heap->num_of_buffers = 0;
> +	heap->num_of_alloc_bytes = 0;
> +	heap->alloc_bytes_wm = 0;
> +
> +	/* Create heap root directory. If creation is failed, we may continue */
> +	heap_root = debugfs_create_dir(heap->name, dev->debug_root);
> +	if (!IS_ERR_OR_NULL(heap_root)) {

Just remove this check.  If debugfs_create_dir() fails, it doesn't
cause any problems here.

regards,
dan carpenter



More information about the devel mailing list