Re: [PATCH v27 07/13] mm/damon: Implement a debugfs-based user space interface

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

 



On Thu, Apr 08, 2021 at 01:48:48PM +0000, SeongJae Park wrote:
> +static int dbgfs_fill_ctx_dir(struct dentry *dir, struct damon_ctx *ctx)
> +{
> +	const char * const file_names[] = {"attrs", "target_ids"};
> +	const struct file_operations *fops[] = {&attrs_fops, &target_ids_fops};
> +	int i;
> +
> +	for (i = 0; i < ARRAY_SIZE(file_names); i++)
> +		debugfs_create_file(file_names[i], 0600, dir, ctx, fops[i]);
> +
> +	return 0;
> +}

Why do you have a function that can only return 0, actually return
something?  It should be void, right?

thanks,

greg k-h



[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux