From nobody Tue Apr 30 06:34:23 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org ARC-Seal: i=1; a=rsa-sha256; t=1594890606; cv=none; d=zohomail.com; s=zohoarc; b=IYmJzwBZ1aBX7KWX0UQywLYetBg22sh6OPVkeYgo2qPr01IY3kDgKxHYtmJS0VkE7QKHJAxLeFzgq1s5X8EdB0lgICh3gMzXRB46kppg6Ge6FL8mlBHVAfkz61hEYLthHb6cKB92DsYJ3wIo6LXuPiv64SLxKrS+FMkJEYBrXYo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1594890606; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=gObHVowkzvBJNrxzcXj2OX/laGrI6ecBDqdfd9JXKhQ=; b=W2m1IHxcaE2A5qMDjzMjOWiGqPToN3bqn/VWNO0ME3TsrkuYeUPkEJHCAt2u+HOAtMF8LI13evKU7XKfqPwFD2Pfn7tjYcvfL24s1CO9CGMaEt6RnQmb8UgMyhDmizDt/3azONTHAbdMcWMGu7yiMi4vhkwP19q6WflS9ZJLfyQ= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1594890606328540.3597437249198; Thu, 16 Jul 2020 02:10:06 -0700 (PDT) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1jvzta-0007W4-D6; Thu, 16 Jul 2020 09:09:38 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1jvzn3-0007O7-Vu for xen-devel@lists.xenproject.org; Thu, 16 Jul 2020 09:02:54 +0000 Received: from huawei.com (unknown [45.249.212.190]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id 1f77d9d4-c743-11ea-948f-12813bfff9fa; Thu, 16 Jul 2020 09:02:50 +0000 (UTC) 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 X-Inumbo-ID: 1f77d9d4-c743-11ea-948f-12813bfff9fa From: Qinglang Miao To: Greg Kroah-Hartman , Boris Ostrovsky , Juergen Gross , Chen-Yu Tsai , Thomas Gleixner , Stefano Stabellini 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: quoted-printable X-Originating-IP: [10.175.113.25] X-CFilter-Loop: Reflected X-Mailman-Approved-At: Thu, 16 Jul 2020 09:09:37 +0000 X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: xen-devel@lists.xenproject.org, linux-kernel@vger.kernel.org Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" Content-Type: text/plain; charset="utf-8" From: Chen Huang Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code. Signed-off-by: Chen Huang Reviewed-by: Boris Ostrovsky --- 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; } =20 -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 =3D { - .open =3D p2m_dump_open, - .read_iter =3D seq_read_iter, - .llseek =3D seq_lseek, - .release =3D single_release, -}; +DEFINE_SHOW_ATTRIBUTE(p2m_dump); =20 static struct dentry *d_mmu_debug; =20 --=20 2.17.1