Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp34958pxk; Tue, 15 Sep 2020 19:29:41 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzpNLpd1sYytBcIXANm4FizdI0roT7+BtPsdJU1WA7BieUYJlgOh3VG4Ik2M5XofpAQ4sZ/ X-Received: by 2002:a17:906:54e:: with SMTP id k14mr23239269eja.59.1600223381021; Tue, 15 Sep 2020 19:29:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600223381; cv=none; d=google.com; s=arc-20160816; b=rw6Inu1QSVAzC0IpVCj+eEI4I6pyHXKxM7e6Vm7wiHqHHEWsee+3qqj9B2vZRyyV3y Ft9OAcFJqj4PC9y1vACdJeTj1yPgv0daIyBDa2QTt4pQKH8jbgT6AeEngBz8OcieQtjB 6ElvN+ukihVL+HAHjmwHOIOs3g1q0l8L8148YC1ChjTaIWwkPThzPgg68iRPFsqeGXn3 XVUDBKb4SMM6bPSXbAUqRynAF5dYY2E5kPJyMUyI1+wiUWEwxeVTd11hMFXKTwIFC/lc l/f8JApN11yXUmBMiT1nJU4ekaPAW3DXNRMRobpxj3C99XbAvhy8Lq4PxU7hFiEfBKL9 QnAw== 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=4TQbNNUk7hBUpCCZTIc1niqhZ0npFNZrVNWv40QUSro=; b=EeZBcoVxyiI2XUlDJQjRWdU75sDV8FTsQMesHDuZUGiFGyh36SrgIV1Ihw3x3KywRT x+Ly1utWu+AoQV+Q89TMfIR/SJdX8AR9YfrMWNj+I/8HX733XZbOHPHOI5EItxB3OI6i Bz78dC5x+l2e2Ah9v0SHQvi6hKxpCTUxenK+/Um0coX3bIWIJTqznZG1fR6kWV6dNEGs XWbRjehrw1UJnpQx5GUWiojmq7YWFJrpVUoC2O3JfqqfDFcxUWq2RVbDNqdnxEG9UB/e 0DtML70M6Seyb6dOt1WBX8HhKhfSH31jyez4yfAK7cUQG5Dt/VceT0b9OS6AU7ap1jtV 1N1A== 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 a8si10713677ejv.661.2020.09.15.19.29.18; Tue, 15 Sep 2020 19:29:41 -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 S1726452AbgIPC2U (ORCPT + 99 others); Tue, 15 Sep 2020 22:28:20 -0400 Received: from szxga07-in.huawei.com ([45.249.212.35]:58392 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726397AbgIPC2C (ORCPT ); Tue, 15 Sep 2020 22:28:02 -0400 Received: from DGGEMS414-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id A0472D58BABBA9BC5833; Wed, 16 Sep 2020 10:28:00 +0800 (CST) Received: from huawei.com (10.175.113.32) by DGGEMS414-HUB.china.huawei.com (10.3.19.214) with Microsoft SMTP Server id 14.3.487.0; Wed, 16 Sep 2020 10:27:54 +0800 From: Liu Shixin To: Heiko Carstens , Vasily Gorbik , Christian Borntraeger CC: , , Liu Shixin Subject: [PATCH -next] s390/diag: convert to use DEFINE_SEQ_ATTRIBUTE macro Date: Wed, 16 Sep 2020 10:50:29 +0800 Message-ID: <20200916025029.3992939-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 --- arch/s390/kernel/diag.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/arch/s390/kernel/diag.c b/arch/s390/kernel/diag.c index ccba63aaeb47..b8b0cd7b008f 100644 --- a/arch/s390/kernel/diag.c +++ b/arch/s390/kernel/diag.c @@ -104,18 +104,7 @@ static const struct seq_operations show_diag_stat_sops = { .show = show_diag_stat, }; -static int show_diag_stat_open(struct inode *inode, struct file *file) -{ - return seq_open(file, &show_diag_stat_sops); -} - -static const struct file_operations show_diag_stat_fops = { - .open = show_diag_stat_open, - .read = seq_read, - .llseek = seq_lseek, - .release = seq_release, -}; - +DEFINE_SEQ_ATTRIBUTE(show_diag_stat); static int __init show_diag_stat_init(void) { -- 2.25.1