From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3D273C71153 for ; Mon, 4 Sep 2023 10:57:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244914AbjIDK5H (ORCPT ); Mon, 4 Sep 2023 06:57:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43654 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236333AbjIDK5G (ORCPT ); Mon, 4 Sep 2023 06:57:06 -0400 Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.126]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B42A899; Mon, 4 Sep 2023 03:57:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1693825022; x=1725361022; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=F6bMJv0iuSajV+sMvvlKQf/YvMy2t++WwT6Fl2VIPlI=; b=PzU0HXmmMSuonm1Z6It4cFhLOeuKRCa6sUNA+RTBRj4ew2AGGgRyqaZg 8ZHOOMXVx4fWy7L4EcG26SQuXJFDOj+esEB2rzT2TyfWP9bwfN9PKozYv Lnzw4QMK5+bLBLZ5HM53cUdrkm9VyA/HwVaxuc7klZgWWmvByImmIstzM VINgFGMuQ4VDP9tJsn4drY+n2MnetMVhgyZLZKPcEIeZCfbvqnAMvInma 7WXbBHe0qk8+6nxJlOKU9RV/r/KU4JQ2eFTVc1XyR5BOeG8yBfTLf2quT 6p/4OEn+HoCSOjm2tX4GVO1DB+kVx/mpKeCqu39W/5uDcOF+Pszs3sUrh A==; X-IronPort-AV: E=McAfee;i="6600,9927,10822"; a="361598974" X-IronPort-AV: E=Sophos;i="6.02,226,1688454000"; d="scan'208";a="361598974" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Sep 2023 03:57:01 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10822"; a="734279861" X-IronPort-AV: E=Sophos;i="6.02,226,1688454000"; d="scan'208";a="734279861" Received: from smile.fi.intel.com ([10.237.72.54]) by orsmga007.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Sep 2023 03:56:56 -0700 Received: from andy by smile.fi.intel.com with local (Exim 4.96) (envelope-from ) id 1qd7GH-006PAi-0I; Mon, 04 Sep 2023 13:56:53 +0300 Date: Mon, 4 Sep 2023 13:56:52 +0300 From: Andy Shevchenko To: Xingui Yang Cc: jejb@linux.ibm.com, martin.petersen@oracle.com, john.g.garry@oracle.com, damien.lemoal@opensource.wdc.com, akpm@linux-foundation.org, viro@zeniv.linux.org.uk, himanshu.madhani@cavium.com, felipe.balbi@linux.intel.com, gregkh@linuxfoundation.org, uma.shankar@intel.com, anshuman.gupta@intel.com, animesh.manna@intel.com, linux-usb@vger.kernel.org, linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org, linuxarm@huawei.com, prime.zeng@hisilicon.com, kangfenglong@huawei.com, chenxiang66@hisilicon.com Subject: Re: [PATCH v5 3/3] scsi: qla2xxx: Use DEFINE_SHOW_STORE_ATTRIBUTE helper for debugfs Message-ID: References: <20230904084804.39564-1-yangxingui@huawei.com> <20230904084804.39564-4-yangxingui@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230904084804.39564-4-yangxingui@huawei.com> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org 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 > Signed-off-by: Xingui Yang 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__show > - * > - * QLA_DFS_SETUP_RW could be used when there are both show and write functions. > - * - show function take the name qla_dfs__show > - * - write function take the name qla_dfs__write > - * > - * To have a new debugfs entry, do: > - * 1. Create a "struct dentry *" in the appropriate structure in the format > - * dfs_ > - * 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