Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp1064663ybh; Thu, 16 Jul 2020 02:04:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz5sDQMQwRbFWcDof3bqYAUS7+8eOVc7MBqROA1M9k2sYsLc4c2BxuDUs37jZWmoHkeVRWG X-Received: by 2002:a17:906:3b15:: with SMTP id g21mr2653474ejf.221.1594890242112; Thu, 16 Jul 2020 02:04:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594890242; cv=none; d=google.com; s=arc-20160816; b=CDvb1YRl2TNMbo+8jrd8GUeSjZagHFt//h2+gcFkDqkf3MjAslklWqmM7SJnRVOXa7 IB778FRBvno0jEi8uImSrWUTemndyhNj2lo7GqsOv4RU4h5rK2evpdiLcbWFIhVMdOe9 f39GFQa7yXWQA9HMfUuoj99O5XnRUfDGUltNOY0v8gxJ8bc8/Z8q4qOmacfCnDzz5my4 laehfNe7s+DWEf3gbZszkphDH7s/Cz2hOt1zc1/xFALa1k1jitN7nHYTfPfbbbDVwvpL j5WF93Jy0pv6Y+DOTc2L17XbpcSStfZNJCQpcw2zo8BgJbf1pZSXEC6Ia95qT3+HOfEj wFHw== 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=gObHVowkzvBJNrxzcXj2OX/laGrI6ecBDqdfd9JXKhQ=; b=y8nVc/anIFhE+hJ1ljJcTeOd5SCWhJoYPpF+9QbNP2V/iXpgte1dPProSAP5w4F9DQ onUSqxjajDxntd/RSiGkIEBHBgYafiqtO5gC6qzilVCc899J3W/9QfRaTW+srN7/mWpH 7d+fW+fvq4ngWCROIA5qBmSjnliL8gJJ6BGfnZDasZhrg1BQL7g5sdzoIwt1NKOEjnuV yn6pEYoMJDp/8/AsmzIIqWzCWggIqftdFg2zC3wA9UUHDOiTQVKnkChbWCKZHRnpvZxy kSX3+fGXjf+FOlLEl7zFHOdNqG+f9QoJLJPjlUXAjVoSmkrfCEFFKbNZcUrGu+BlbzBN BOHA== 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 d19si2841264edz.443.2020.07.16.02.03.39; Thu, 16 Jul 2020 02:04: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 S1728277AbgGPJCy (ORCPT + 99 others); Thu, 16 Jul 2020 05:02:54 -0400 Received: from szxga04-in.huawei.com ([45.249.212.190]:7868 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726333AbgGPJCy (ORCPT ); Thu, 16 Jul 2020 05:02:54 -0400 Received: from DGGEMS413-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id 17F9E5A95E9514988E2A; Thu, 16 Jul 2020 17:02:48 +0800 (CST) Received: from localhost.localdomain.localdomain (10.175.113.25) by DGGEMS413-HUB.china.huawei.com (10.3.19.213) with Microsoft SMTP Server id 14.3.487.0; Thu, 16 Jul 2020 17:02:46 +0800 From: Qinglang Miao To: Greg Kroah-Hartman , Boris Ostrovsky , Juergen Gross , Chen-Yu Tsai , Thomas Gleixner , Stefano Stabellini CC: , Subject: [PATCH -next] x86/xen: Convert to DEFINE_SHOW_ATTRIBUTE Date: Thu, 16 Jul 2020 17:06:41 +0800 Message-ID: <20200716090641.14184-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/x86/xen/p2m.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/arch/x86/xen/p2m.c b/arch/x86/xen/p2m.c index 4cf680e2e..0f4a449de 100644 --- a/arch/x86/xen/p2m.c +++ b/arch/x86/xen/p2m.c @@ -799,17 +799,7 @@ static int p2m_dump_show(struct seq_file *m, void *v) return 0; } -static int p2m_dump_open(struct inode *inode, struct file *filp) -{ - return single_open(filp, p2m_dump_show, NULL); -} - -static const struct file_operations p2m_dump_fops = { - .open = p2m_dump_open, - .read_iter = seq_read_iter, - .llseek = seq_lseek, - .release = single_release, -}; +DEFINE_SHOW_ATTRIBUTE(p2m_dump); static struct dentry *d_mmu_debug; -- 2.17.1