Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp1064967ybh; Thu, 16 Jul 2020 02:04:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzkDy3FEMImUVg86so9voMVlSb/Sim73SjTHem1k0hE53FkHJsHzQcOtttYXYbs+USNLRPI X-Received: by 2002:a05:6402:204e:: with SMTP id bc14mr3611325edb.128.1594890269610; Thu, 16 Jul 2020 02:04:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594890269; cv=none; d=google.com; s=arc-20160816; b=ae13Xe3HSGM0Na8hZd8M65R3SrmILtIjkhNSHrMucuWnQgIIsx6dpSKajRrqz+Fexk M2UcHdBZiccNrSZnbP8xJhT6cmYfdQFVuD754Mv2s0bPFLd+tq7FyOdWZkpdODhz6WPW bHcIX7pBwEJPL4B+o5YimQn7lgassZwfvyIHpcKNQnbspUeFqAU3Una8RhB4S/J9AevY OFswqjwKLkD8EHaWy2bJDgZkDbi0qGF2DuBKP7UmNaOcKVFOHyl7EUfiiozySXgCod04 QsmRBbwibsr9mPeXnfkSY7TTA7L+TCtOL9S0FBjA78F+zpffBY3dMcLyPNsmVUqDvVtx 4ahA== 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=F/saUXtMelpm+O8rFDlckrH4nbr+Wk3+myzVYxgsUjk=; b=FgQH7knAkW5tbVpicZrtqSYbMQI9UJBErJHxtDUTOKwOJbfcXm/825U0702ZCmosTG c7YJ3qc7icD57hHY3xUjOLHYbOqUsXqGIgueh1Fb9jmKT8U06xeyBae9Tx1cLoScAM93 EBnam2Ko90uYjWghfT9MGIoXvMxT47/bByVYqOzOU3lQ5nERGUTqz2D0R5hIDx8An6Qo FsmpI1aFbkHkE+QyGjj6TJ//wVomDFF0wMnHqkASDT+idbRMmUre9mqulzM/GimGHJvi WJGd5W9GtnhJ7Su/h9MHzDPwMIH+AqFQDKAoj1OXjs3aumXUC9nrzywx9zBGXORaHViU RFYg== 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 do14si1673424ejc.39.2020.07.16.02.04.07; Thu, 16 Jul 2020 02:04:29 -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 S1728349AbgGPJDN (ORCPT + 99 others); Thu, 16 Jul 2020 05:03:13 -0400 Received: from szxga05-in.huawei.com ([45.249.212.191]:7766 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726954AbgGPJDN (ORCPT ); Thu, 16 Jul 2020 05:03:13 -0400 Received: from DGGEMS402-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id 820352C239CB7879DE26; Thu, 16 Jul 2020 17:03:10 +0800 (CST) Received: from localhost.localdomain.localdomain (10.175.113.25) by DGGEMS402-HUB.china.huawei.com (10.3.19.202) with Microsoft SMTP Server id 14.3.487.0; Thu, 16 Jul 2020 17:03:07 +0800 From: Qinglang Miao To: Greg Kroah-Hartman , Heiko Carstens , Vasily Gorbik , Christian Borntraeger CC: , Subject: [PATCH -next] s390/mm: Convert to DEFINE_SHOW_ATTRIBUTE Date: Thu, 16 Jul 2020 17:07:03 +0800 Message-ID: <20200716090703.14315-1-miaoqinglang@huawei.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.175.113.25] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Chen Huang Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code. Signed-off-by: Chen Huang --- arch/s390/mm/dump_pagetables.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/arch/s390/mm/dump_pagetables.c b/arch/s390/mm/dump_pagetables.c index 9adb10a05..ce65bea17 100644 --- a/arch/s390/mm/dump_pagetables.c +++ b/arch/s390/mm/dump_pagetables.c @@ -261,17 +261,7 @@ static int ptdump_show(struct seq_file *m, void *v) return 0; } -static int ptdump_open(struct inode *inode, struct file *filp) -{ - return single_open(filp, ptdump_show, NULL); -} - -static const struct file_operations ptdump_fops = { - .open = ptdump_open, - .read_iter = seq_read_iter, - .llseek = seq_lseek, - .release = single_release, -}; +DEFINE_SHOW_ATTRIBUTE(ptdump); static int pt_dump_init(void) { -- 2.17.1