Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp35925pxk; Tue, 15 Sep 2020 19:31:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyvaF4cJqyNVUjtg3fRldKShR47kJrq4Pe2ztY5lqj/T6xDeM91i+oRAEd9LUZF34EMufJF X-Received: by 2002:a17:906:850e:: with SMTP id i14mr22811452ejx.168.1600223514555; Tue, 15 Sep 2020 19:31:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600223514; cv=none; d=google.com; s=arc-20160816; b=Wqh4Brtxys4wZRywXCgCpa5H46Q/J+bkHMe8LImqUJhZX1M7gmnyj4DvZ2SG1dA62K rBvycT0XeOBu/aVoEGYwXHeWcnS5SdDg66EvYI3LEPktlorG9NzDN2yazhv/w0OMnE9J ZE+1MbxpjfMhi7YuefUTkkRPDlsOJUNFIFm+rcDz1OSMbMiFv62Q2Aj88jRsWmMVBKi3 4wwxhvG22pjY+45Hat4mgydmTewSR6m/mHUUtmjmSN9udxE64ja66wUk8x1zX6+qhaEq 1s/OsXLVgCgeoKWwYPgXfiyknLGbvZrUm40/NzTvSdOnl+6wlHLqBCmuBmKVJ3XxXxa4 ejZA== 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:mime-version :message-id:date:subject:cc:to:from; bh=h4nDZMCnmCdg5gf2GuZ8oHtixgnbTEZC+9CxccXD/Rk=; b=FWACn5knjvf6oka/Oa9Ns4WRAXAZPPQ6ZRATcMbZArG/6+d/1+6YIrNbgVT15nxUQ3 irc56Z5CqXZUnB0ycYNvoRg6PuCVbJtKyT4tpN1TZo0XSzHUNYGAquXT7u1J2UJtyQlA 0+D2Vwqz8fEbuEKGOabosUkZLciGo5JMfOeMn0lbRZEse7gCfv8f3xZsVcdOSBk66ArB eptA3xKJAVTXeWty/HWCMU7E/3MxYRAAEx6/BGAmwHdN5Orsbc0Sfwe74dQ2pnPocodq 8p1YWxrB6884eq5Fp8ji6yuJ0kjWHnMDM27OM/kAUxYovVPqsR/pcMrc1etmLUAfARt4 0zSg== 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 lo4si10443062ejb.190.2020.09.15.19.31.32; Tue, 15 Sep 2020 19:31:54 -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 S1726472AbgIPC2g (ORCPT + 99 others); Tue, 15 Sep 2020 22:28:36 -0400 Received: from szxga07-in.huawei.com ([45.249.212.35]:58530 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726406AbgIPC2G (ORCPT ); Tue, 15 Sep 2020 22:28:06 -0400 Received: from DGGEMS402-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id 73DDE467085A06020A0E; Wed, 16 Sep 2020 10:28:04 +0800 (CST) Received: from huawei.com (10.175.113.32) by DGGEMS402-HUB.china.huawei.com (10.3.19.202) with Microsoft SMTP Server id 14.3.487.0; Wed, 16 Sep 2020 10:27:55 +0800 From: Liu Shixin To: Karan Tilak Kumar , Sesidhar Baddela , "James E . J . Bottomley" , "Martin K . Petersen" CC: , , Liu Shixin Subject: [PATCH -next] scsi: snic: convert to use DEFINE_SEQ_ATTRIBUTE macro Date: Wed, 16 Sep 2020 10:50:30 +0800 Message-ID: <20200916025030.3992991-1-liushixin2@huawei.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.175.113.32] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Use DEFINE_SEQ_ATTRIBUTE macro to simplify the code. Signed-off-by: Liu Shixin --- drivers/scsi/snic/snic_debugfs.c | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/drivers/scsi/snic/snic_debugfs.c b/drivers/scsi/snic/snic_debugfs.c index 2b349365592f..4471c4c8aafa 100644 --- a/drivers/scsi/snic/snic_debugfs.c +++ b/drivers/scsi/snic/snic_debugfs.c @@ -439,26 +439,14 @@ snic_trc_seq_show(struct seq_file *sfp, void *data) return 0; } -static const struct seq_operations snic_trc_seq_ops = { +static const struct seq_operations snic_trc_sops = { .start = snic_trc_seq_start, .next = snic_trc_seq_next, .stop = snic_trc_seq_stop, .show = snic_trc_seq_show, }; -static int -snic_trc_open(struct inode *inode, struct file *filp) -{ - return seq_open(filp, &snic_trc_seq_ops); -} - -static const struct file_operations snic_trc_fops = { - .owner = THIS_MODULE, - .open = snic_trc_open, - .read = seq_read, - .llseek = seq_lseek, - .release = seq_release, -}; +DEFINE_SEQ_ATTRIBUTE(snic_trc); /* * snic_trc_debugfs_init : creates trace/tracing_enable files for trace -- 2.25.1