lkml.org 
[lkml]   [2022]   [Aug]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: [PATCH] scsi: ufs: ufsfbo: Introduce File Based Optimization feature
Date
> +
> +/* SYSFS DEFINE */
> +#define define_sysfs_ro(_name) __ATTR(_name, 0444, \
> + ufsfbo_sysfs_show_##_name, NULL)
> +#define define_sysfs_wo(_name) __ATTR(_name, 0200, \
> + NULL, ufsfbo_sysfs_store_##_name)
> +#define define_sysfs_rw(_name) __ATTR(_name, 0644, \
> + ufsfbo_sysfs_show_##_name, \
> + ufsfbo_sysfs_store_##_name)
> +static struct ufsfbo_sysfs_entry ufsfbo_sysfs_entries[] = {
> + define_sysfs_ro(fbo_rec_lrs),
> + define_sysfs_ro(fbo_max_lrs),
> + define_sysfs_ro(fbo_min_lrs),
> + define_sysfs_ro(fbo_max_lrc),
> + define_sysfs_ro(fbo_lra),
> + define_sysfs_ro(fbo_prog_state),
> + define_sysfs_ro(fbo_get_lr_frag_level),
> + define_sysfs_ro(fbo_support),
> + define_sysfs_ro(fbo_version),
> + define_sysfs_wo(fbo_operation_control),
> + define_sysfs_wo(fbo_send_lr_list),
> + define_sysfs_rw(fbo_exe_threshold),
> + define_sysfs_rw(fbo_wholefile_enable),
> + /* debug */
> + define_sysfs_rw(debug),
> + /* Attribute (RAW) */
> + define_sysfs_rw(block_suspend),
> + define_sysfs_rw(auto_hibern8_enable),
> + __ATTR_NULL
> +};
Lets stick to the _store / _show naming conventions -
people rely on that when they are grepping the code.
Also, you need to document the ABI.

Thanks,
Avri

\
 
 \ /
  Last update: 2022-08-25 10:58    [W:1.035 / U:0.888 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site