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:   Mon, 4 Sep 2023 13:56:52 +0300
From:   Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To:     Xingui Yang <yangxingui@...wei.com>
Cc:     jejb@...ux.ibm.com, martin.petersen@...cle.com,
        john.g.garry@...cle.com, damien.lemoal@...nsource.wdc.com,
        akpm@...ux-foundation.org, viro@...iv.linux.org.uk,
        himanshu.madhani@...ium.com, felipe.balbi@...ux.intel.com,
        gregkh@...uxfoundation.org, uma.shankar@...el.com,
        anshuman.gupta@...el.com, animesh.manna@...el.com,
        linux-usb@...r.kernel.org, linux-scsi@...r.kernel.org,
        linux-kernel@...r.kernel.org, linuxarm@...wei.com,
        prime.zeng@...ilicon.com, kangfenglong@...wei.com,
        chenxiang66@...ilicon.com
Subject: Re: [PATCH v5 3/3] scsi: qla2xxx: Use DEFINE_SHOW_STORE_ATTRIBUTE
 helper for debugfs

On Mon, Sep 04, 2023 at 08:48:04AM +0000, Xingui Yang wrote:
> Use DEFINE_SHOW_STORE_ATTRIBUTE helper for read-write file to reduce some
> duplicated code and delete unused macros.

> Signed-off-by: Luo Jiaxing <luojiaxing@...wei.com>
> Signed-off-by: Xingui Yang <yangxingui@...wei.com>

Same comments as per previous patch.

...

> -/*
> - * Helper macros for setting up debugfs entries.
> - * _name: The name of the debugfs entry
> - * _ctx_struct: The context that was passed when creating the debugfs file
> - *
> - * QLA_DFS_SETUP_RD could be used when there is only a show function.
> - * - show function take the name qla_dfs_<sysfs-name>_show
> - *
> - * QLA_DFS_SETUP_RW could be used when there are both show and write functions.
> - * - show function take the name  qla_dfs_<sysfs-name>_show
> - * - write function take the name qla_dfs_<sysfs-name>_write
> - *
> - * To have a new debugfs entry, do:
> - * 1. Create a "struct dentry *" in the appropriate structure in the format
> - * dfs_<sysfs-name>
> - * 2. Setup debugfs entries using QLA_DFS_SETUP_RD / QLA_DFS_SETUP_RW
> - * 3. Create debugfs file in qla2x00_dfs_setup() using QLA_DFS_CREATE_FILE
> - * or QLA_DFS_ROOT_CREATE_FILE
> - * 4. Remove debugfs file in qla2x00_dfs_remove() using QLA_DFS_REMOVE_FILE
> - * or QLA_DFS_ROOT_REMOVE_FILE
> - *
> - * Example for creating "TEST" sysfs file:
> - * 1. struct qla_hw_data { ... struct dentry *dfs_TEST; }
> - * 2. QLA_DFS_SETUP_RD(TEST, scsi_qla_host_t);
> - * 3. In qla2x00_dfs_setup():
> - * QLA_DFS_CREATE_FILE(ha, TEST, 0600, ha->dfs_dir, vha);
> - * 4. In qla2x00_dfs_remove():
> - * QLA_DFS_REMOVE_FILE(ha, TEST);
> - */

I believe this comment (in some form) has to be preserved.
Try to rewrite it using reference to the new macro.

Otherwise looks good to me.

-- 
With Best Regards,
Andy Shevchenko


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ