lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 25 Aug 2022 08:56:50 +0000
From:   Avri Altman <Avri.Altman@....com>
To:     Jiaming Li <lijiamingsofine@...il.com>,
        "alim.akhtar@...sung.com" <alim.akhtar@...sung.com>,
        "jejb@...ux.ibm.com" <jejb@...ux.ibm.com>
CC:     "linux-scsi@...r.kernel.org" <linux-scsi@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        lijiaming3 <lijiaming3@...omi.com>
Subject: RE: [PATCH] scsi: ufs: ufsfbo: Introduce File Based Optimization
 feature

> +
> +/* 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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ