Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp1078437ybh; Thu, 16 Jul 2020 02:30:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwls0N8Yy/MFTjUXxhQ5nAlGKPPltpP5Xvo3fNGM/73nkG5sTo1rO7CFhluTwJEJJhRAzlz X-Received: by 2002:a17:906:af43:: with SMTP id ly3mr2778141ejb.381.1594891802399; Thu, 16 Jul 2020 02:30:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594891802; cv=none; d=google.com; s=arc-20160816; b=qD5SP/s6MdHK5AZmaY0GLfx1sqSrL8u/r18flj6W1sdv0cMw3Y3f9cjOVhdhr4OR0F SuayehM2dTP9Zwp7G824j1A3sd0cxbsXlNts132ItXwshYXDMOr2l6W/fVQYLLh7L+6s tQ5hgoxyeXAp2/93GAJ/RN3Oa0WM0EVetj9InPxJVXVRD0hzf+md1dHOEpv6E+VjEtcW QEpGR5hdZeh/hiyZvTC0knruMai1GYAMz+jmPMgUM0ddlGOGJW6qnCHZo1tsRgQpPZr/ +AOW5wHMa9mO/Nq/caoOtcRVErC6+FKB6MBQoHJ1ctncCuB00HKFFLATWo5ECs3b5eee pABw== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=x7E4Vbu5fTuCxmHMHnCHuf8RO1gzqcyYz10w33fqW5U=; b=D9z9uTc2QszhLa5UydAt1qsuof6mpst72jozj7zZDsfEpwH3lRDrlhjXyImkdFA1wc YDhJOVxwXHww08AXcAFzQw35J11dOGpfl3Sd9A+pbOX4vz3lSZXk+mssYXUwCoZSA391 5x8G8vCST93DD/nY01XthW6tvZclL1SS1U2HqS06Gzv6QNnipTmnf2TOJqE7juI40NT/ Ke/mXsCWYgNAQQnj5QmTu7r5EzLxxGUSBk7xiomhsujVVZhZxUvqeR5iL3WTYkZdtJuv Ax30tzkM66SPaIfbYULbevN3V39uMiWv3XGgoegfp2RbhSYiDbpA0ynd8sLKHnWjj3xB UyFg== 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 cz9si2855186edb.530.2020.07.16.02.29.39; Thu, 16 Jul 2020 02:30:02 -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 S1726963AbgGPJ06 (ORCPT + 99 others); Thu, 16 Jul 2020 05:26:58 -0400 Received: from lhrrgout.huawei.com ([185.176.76.210]:2485 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726000AbgGPJ05 (ORCPT ); Thu, 16 Jul 2020 05:26:57 -0400 Received: from lhreml724-chm.china.huawei.com (unknown [172.18.7.106]) by Forcepoint Email with ESMTP id 06F15AF99CCF2B8A8616; Thu, 16 Jul 2020 10:26:56 +0100 (IST) Received: from [127.0.0.1] (10.210.168.254) by lhreml724-chm.china.huawei.com (10.201.108.75) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1913.5; Thu, 16 Jul 2020 10:26:55 +0100 Subject: Re: [PATCH -next] scsi: hisi_sas: Convert to DEFINE_SHOW_ATTRIBUTE To: Qinglang Miao CC: Greg Kroah-Hartman , , , "James E . J . Bottomley" , "Martin K . Petersen" References: <20200716084714.7872-1-miaoqinglang@huawei.com> From: John Garry Message-ID: <801e6d49-9bd5-8079-bb83-9f67591a9158@huawei.com> Date: Thu, 16 Jul 2020 10:25:07 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.1.2 MIME-Version: 1.0 In-Reply-To: <20200716084714.7872-1-miaoqinglang@huawei.com> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.210.168.254] X-ClientProxiedBy: lhreml714-chm.china.huawei.com (10.201.108.65) To lhreml724-chm.china.huawei.com (10.201.108.75) X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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) > --- > 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. Thanks