From patchwork Tue Mar 30 03:20:15 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jisheng Zhang X-Patchwork-Id: 12171563 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.5 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,MSGID_FROM_MTA_HEADER,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_2 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B5AC4C433E0 for ; Tue, 30 Mar 2021 03:28:45 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 408436146B for ; Tue, 30 Mar 2021 03:28:45 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 408436146B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=synaptics.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:Message-ID:Subject:Cc:To:From:Date: Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender :Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=wVckAHMTqypc837DNNdfrrGHlXtr59SZoar/giKn4EE=; b=Us0Xf1EKVFU4QowrjjdMNI1b9P 645iF7J850pkayqCu9Qxi3Aw/+shKDClNWRLnEfdousiPfp2dnC/9+meZ/t4qNZuj/LWAAWmMKhrw K6lKJMhhdvEgrd3HWxVMyHcBVoUt24H4JoFEPY3MZi+NWI+fnQRWQSKlKkICFb4i2DgAgLtmLRBza x4fXzg5Nb2eG4an423rPZic1PP7nM5hVsNTXq4CBIy6N3Bq1NdJ1BcJaVZo0voQW9OPN5wOQ7AT5t /80zZguT/juT4fVDyWuZl0i3MRRrdC9yLg25Lq9VHZ8T+G78aJnO5LgsiYWeK6GQRL1F/qieNDOff B22V/iOA==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lR4y8-002Yei-IY; Tue, 30 Mar 2021 03:23:05 +0000 Received: from mail-mw2nam10on2064.outbound.protection.outlook.com ([40.107.94.64] helo=NAM10-MW2-obe.outbound.protection.outlook.com) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lR4vY-002Y3q-9i for linux-arm-kernel@lists.infradead.org; Tue, 30 Mar 2021 03:20:27 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=TC3eh1ApKy7qPdMPrJBs/69s4b7T35K7o6TTGtZ02y92uoaky6de6rApmMeRIAUxYxBpDUOmCfY/xqOSfVQ/H2fqLPqDfpimLnRXz+w28czUDir1DlhQIoPqWiM2XMDur/Crhs4HfVfk40XN93Bx3gUHGpFep34ArERUtjmTagNDLEDf2+Qv1ZrvX8lJbAqH0rCFohxfjM+bA9jPT1vPCUAHvALAs4i7eH3qtETstCDj5GczESjEjez1OyygKcvZLfc55eZSSJ3HM9qHjZEdlqWGEpJTB2eFGG1TpYWZ9FNyEzDkWXy0WvHzmTw1B92IDfGw9hf96AzLj7zL353WeQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=oCxrKQA0/2AtF2r0V2I14Clr9EaHc4xtm/hMf7FLdgs=; b=jDFGcVuMHXIew5As+vpefS55tJVzBjI9DQDq2TPv30IXZYYSeunbqG9O3lANsoZ+BNkibUkcNlKwrZJDnSqmhaMQFEcsVm4v/GYbt2IxgR14wHClhwwK4Rq2z6GeD2nwcQTx9AC5IScAjkZ6OkgAQLxwvd34x81bBTvmTfUvjdkt/+WZ5TPFFA0wZPTolepWc0UwkVBmomGycQ//IRgMMoOuBu1bSrLxLemNPEwPqyhu8d49HtEmL7ankKm/zSZONmt7Rd24d+I19T1GBU78EuFWPuAG1Fmftd7HE7s4gnrsmaGyagFsMmzzPSkRAQ7h2YE1dS4NxTXTQpwx6ni/EA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=synaptics.com; dmarc=pass action=none header.from=synaptics.com; dkim=pass header.d=synaptics.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Synaptics.onmicrosoft.com; s=selector2-Synaptics-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=oCxrKQA0/2AtF2r0V2I14Clr9EaHc4xtm/hMf7FLdgs=; b=Cvs7YiRCq6Rnyby17v69M7FJb4I+OwTYE2HWrI59o12pD9h++lPak90TtaCSo24Mf3ndfJzVeBkPdEA2xeZ+O+sNAImHCPq0bzoxcv6JU/PM4JzH5sRLkmlOdTyHVXRJK5PyvsPT04llMhAX+MI31Y4CmtUD7B8ZUFnlyKJbfMs= Authentication-Results: armlinux.org.uk; dkim=none (message not signed) header.d=none;armlinux.org.uk; dmarc=none action=none header.from=synaptics.com; Received: from BY5PR03MB5345.namprd03.prod.outlook.com (2603:10b6:a03:219::16) by BYAPR03MB4616.namprd03.prod.outlook.com (2603:10b6:a03:13c::31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3977.30; Tue, 30 Mar 2021 03:20:21 +0000 Received: from BY5PR03MB5345.namprd03.prod.outlook.com ([fe80::8569:341f:4bc6:5b72]) by BY5PR03MB5345.namprd03.prod.outlook.com ([fe80::8569:341f:4bc6:5b72%9]) with mapi id 15.20.3977.033; Tue, 30 Mar 2021 03:20:21 +0000 Date: Tue, 30 Mar 2021 11:20:15 +0800 From: Jisheng Zhang To: Russell King Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH] arm: ptdump: convert to DEFINE_SHOW_ATTRIBUTE Message-ID: <20210330112015.738f4365@xhacker.debian> X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.33; x86_64-pc-linux-gnu) X-Originating-IP: [192.147.44.204] X-ClientProxiedBy: SJ0PR13CA0200.namprd13.prod.outlook.com (2603:10b6:a03:2c3::25) To BY5PR03MB5345.namprd03.prod.outlook.com (2603:10b6:a03:219::16) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from xhacker.debian (192.147.44.204) by SJ0PR13CA0200.namprd13.prod.outlook.com (2603:10b6:a03:2c3::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3999.14 via Frontend Transport; Tue, 30 Mar 2021 03:20:20 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: ab9174c2-30ca-47ce-a0b2-08d8f32ac03f X-MS-TrafficTypeDiagnostic: BYAPR03MB4616: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:549; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: GRLzgPUkTZOPAfi+cSuUrLra3e16innlPPxuTVO4skZZQddKRastx2NWP4MsIeiBSCx6tpsMnW5WV7RfLcEAsyyFphMrObafh1S3z+aLd4gSmFZn8TSsWloz0ZCqWsBobOw17sX6i4z3MkUYvhXk7yY1Wg4V5kqh2/uM5sLZ0gY+Bsc5quSr5KDEXz60oaukLSq/Pzi514WcE8hSSL+G8D1+AYsFZau48mvIJvwRewpVIoohbIi3h0bNrbFguBDmXRor2Vav+gVfZ0zlGT9BwgXqzZQriCaQd6FlsyoyBKhKNELVoygU16imJbe6U2CqDAFR8daSAS4ccSZy1r7iZbL9C3haDFyB9ZN2gv7TyCWwJwW27N77Uv5lAfu7bU1dd0UxgHgO/LYwPxVSpmzxQdChpMHLaErwsN8R23g1kd5gzFdAPIIszm4iswRjGoLiR4dzUreNmvSsp4XKIp6h84M3uJVt1dubEUzz5JrdaH3mnEYOa0D+lTNde9Qmb9Rq86YPyH8bokSo6GyRogeuIC7OHGZbFPY4HTq5ErMd0tjSIhM+hb2VqR30VcxsX8Fihr151AdRcTCSdgIxh7HRihXv1MdGkgk/PKeiZPWigmvOW8CA5vx7iedfHWM7xKNYgFwjs6O4QoHJjkVqdwSAUk/3JI5sD0d+SVprV0L+AZQ= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BY5PR03MB5345.namprd03.prod.outlook.com; PTR:; CAT:NONE; SFS:(396003)(39860400002)(136003)(346002)(376002)(366004)(86362001)(4326008)(2906002)(8676002)(83380400001)(478600001)(186003)(26005)(16526019)(6506007)(316002)(5660300002)(1076003)(7696005)(9686003)(956004)(66556008)(66476007)(66946007)(8936002)(55016002)(6666004)(52116002)(4744005)(38100700001)(6916009); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: 9Bhwpom99nlM5uPLgGRHvCKT1skGA9fIP0n/X4KSLtQtRZLLrNzUmBeBDeyPFKYFJKKAQ8kXFuRC+sY5ecnv4u5JWjohOixRiPJgnwLMug0UTVnSUe0bB2DnHkNR8E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Isda7WQEv9cTiJI4XUvyCZPzechKjMNPCClQzY/X/6GZVSz3LDSTuYqOPqAreJKMU2GxJwu2R5MNtQ6uBwZnWyKnylBlBShlc5AOoTRBz1PF+HPoAxa/ykfjHOLXsUQCvJuKm/z1ExrPMrWR1if14fIAOiQojeX X-OriginatorOrg: synaptics.com X-MS-Exchange-CrossTenant-Network-Message-Id: ab9174c2-30ca-47ce-a0b2-08d8f32ac03f X-MS-Exchange-CrossTenant-AuthSource: BY5PR03MB5345.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Mar 2021 03:20:21.3666 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 335d1fbc-2124-4173-9863-17e7051a2a0e X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: H9SMiYJwR+ywFm826gko5DlWA0mNkw9gluuFaNRBZNw/G4b28a+FK6izgZPupktM2LQSaChcejuxPEOwvQ5PNQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR03MB4616 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210330_042026_107391_B3B8AA36 X-CRM114-Status: UNSURE ( 9.84 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code. Signed-off-by: Jisheng Zhang Reviewed-by: Steven Price --- arch/arm/mm/ptdump_debugfs.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/arch/arm/mm/ptdump_debugfs.c b/arch/arm/mm/ptdump_debugfs.c index 8df9afac8d81..318de969ae0f 100644 --- a/arch/arm/mm/ptdump_debugfs.c +++ b/arch/arm/mm/ptdump_debugfs.c @@ -11,18 +11,7 @@ static int ptdump_show(struct seq_file *m, void *v) ptdump_walk_pgd(m, info); return 0; } - -static int ptdump_open(struct inode *inode, struct file *file) -{ - return single_open(file, ptdump_show, inode->i_private); -} - -static const struct file_operations ptdump_fops = { - .open = ptdump_open, - .read = seq_read, - .llseek = seq_lseek, - .release = single_release, -}; +DEFINE_SHOW_ATTRIBUTE(ptdump); void __init ptdump_debugfs_register(struct ptdump_info *info, const char *name) {