Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp1199491ybh; Thu, 16 Jul 2020 06:05:06 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzIZCdWx4iQ+SzE1Qf1tNCSuHsBvFW+hgQlOF8JwtFSo5r3MwpjdNFMAWgPhQWZj7YquT1S X-Received: by 2002:a17:906:eb93:: with SMTP id mh19mr3529652ejb.552.1594904705892; Thu, 16 Jul 2020 06:05:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594904705; cv=none; d=google.com; s=arc-20160816; b=hDtvR0tAMvCouFX9ZY+ymadCQx8wuAz7CeDLsmuAz6c6ClU/Tq1V2UXrbzPUiDyB9u g6ht0sQ9GZasYQvyBVMkjsBylg5R7ix71c3Me3xkParMkjlEoKawAGE4b9e2dMkPfr3B FN3L8qWN4JomCORLAOn6C+j5abazwn0Fzm3MrmVCpFRlkKkIOMrUEQR2I5S5OwQQwHYG gKHC83ZxW2g2cDHY3fdEayLADLoAsVVn5xCMiH3j2uv8/u7RW+vKhCYwLH55/pnsNMWe IQkNEZf1cS/wv9N1/kiLgQRTZS/iPIGBh5XzpP3Eop/jcDdZHwUKeD28rTbQht+mMH7O 7d0A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:in-reply-to :mime-version:user-agent:date:message-id:from:references:cc:to :subject; bh=X0qMMc/L5vZXg0euhDgfvl5YuS0uvNfNev/6uN2HQn8=; b=C6++eHHUcoTX1GBUzYBPO7zT/l90RYjYK5zc9d24W5HMxHYpksXXQYH2DnRA/jR3on rOTJIiP0Q9H81nawQThtbL9rmNKGNOsGMmH363N9TTAPasSTA50vdV9DLIYlDy5f6M8o EnojiZ4rlsD4wieuCFBYq7nGEEaqe5r95Hu/Rc8GAGSXha3dvSVwPina3HfKzT/s0LAJ eB3mvt06eEPgTIwlYAR8J7N0fn0ZjQxNmS0/K57z2B/T2Kw6py6vYv9EUvp5mFxWuf5A P2dk0+ytC+gKq8ppHlGoz/+ADtLFZlhe7ulYPhijpjaRT0qXvf2+iveNOYZgPdwVQjhT Me8Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id o1si3045869edq.365.2020.07.16.06.04.41; Thu, 16 Jul 2020 06:05:05 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728724AbgGPNE3 (ORCPT + 99 others); Thu, 16 Jul 2020 09:04:29 -0400 Received: from szxga06-in.huawei.com ([45.249.212.32]:40934 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728119AbgGPNE3 (ORCPT ); Thu, 16 Jul 2020 09:04:29 -0400 Received: from DGGEMS407-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id F3C45DF5121E4CB53979; Thu, 16 Jul 2020 21:04:24 +0800 (CST) Received: from [127.0.0.1] (10.174.179.91) by DGGEMS407-HUB.china.huawei.com (10.3.19.207) with Microsoft SMTP Server id 14.3.487.0; Thu, 16 Jul 2020 21:04:08 +0800 Subject: Re: [PATCH -next] scsi: hisi_sas: Convert to DEFINE_SHOW_ATTRIBUTE To: John Garry CC: Greg Kroah-Hartman , , , "James E . J . Bottomley" , "Martin K . Petersen" References: <20200716084714.7872-1-miaoqinglang@huawei.com> <801e6d49-9bd5-8079-bb83-9f67591a9158@huawei.com> From: miaoqinglang Message-ID: <98e26dfe-b6f9-5730-097e-95ff2db5c987@huawei.com> Date: Thu, 16 Jul 2020 21:04:07 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 MIME-Version: 1.0 In-Reply-To: <801e6d49-9bd5-8079-bb83-9f67591a9158@huawei.com> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 8bit X-Originating-IP: [10.174.179.91] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 在 2020/7/16 17:25, John Garry 写道: > On 16/07/2020 09:47, Qinglang Miao wrote: > > Not sure why you cc Greg, but SCSI maintainers should have been - > James and Martin > >> From: Yongqiang Liu >> >> Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code. >> >> Signed-off-by: Yongqiang Liu > > The sender is not the author, so your signed-off-by should also be > here (after sign off from Yongqiang Liu) > Sorry for not knowing this rule, I will send a new patch later on if you don't mind. >> --- >>   drivers/scsi/hisi_sas/hisi_sas_main.c | 137 ++------------------------ >>   1 file changed, 10 insertions(+), 127 deletions(-) >> >> diff --git a/drivers/scsi/hisi_sas/hisi_sas_main.c >> b/drivers/scsi/hisi_sas/hisi_sas_main.c >> index 852d2620e..f50b0c78f 100644 >> --- a/drivers/scsi/hisi_sas/hisi_sas_main.c >> +++ b/drivers/scsi/hisi_sas/hisi_sas_main.c >> @@ -2870,19 +2870,7 @@ static int hisi_sas_debugfs_global_show(struct >> seq_file *s, void *p) >>       return 0; >>   } >>   -static int hisi_sas_debugfs_global_open(struct inode *inode, >> struct file *filp) >> -{ >> -    return single_open(filp, hisi_sas_debugfs_global_show, >> -               inode->i_private); >> -} >> - >> -static const struct file_operations hisi_sas_debugfs_global_fops = { >> -    .open = hisi_sas_debugfs_global_open, >> -    .read_iter = seq_read_iter, >> -    .llseek = seq_lseek, >> -    .release = single_release, >> -    .owner = THIS_MODULE, >> -}; >> +DEFINE_SHOW_ATTRIBUTE(hisi_sas_debugfs_global); > > I couldn't see an equivalent for file_operations which have a read and > write method, and the driver has a few of those. Yes, you're right. There's no equivalence when drivers have read and  write method. So the file_operations we cleaned up are those without  write method, like hisi_sas_debugfs_global_fops. > > Thanks > . Thanks  .