From patchwork Wed Jun 13 01:11:55 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Donglin Peng X-Patchwork-Id: 10461429 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 8A062603B4 for ; Wed, 13 Jun 2018 01:15:36 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 66AA128B2C for ; Wed, 13 Jun 2018 01:15:36 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5B4B028B3E; Wed, 13 Jun 2018 01:15:36 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, DKIM_VALID, FREEMAIL_FROM, MAILING_LIST_MULTI autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 15C3B28B2C for ; Wed, 13 Jun 2018 01:15:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=/5+DC5TvovpKYzlpdDTkw5T6K53RHnRdqI2ynEtS768=; b=JVE4FP1uBQa61uH9lml7vzGTT+ MQwXK/ceMYpey1bGJJFihy55Y394MZYmhP1qX5SUzGKHFF4CdhI1Oup7UMOT/4p7s8kbAB/j1iIqf WHL+u8V992kB/x9q++nlyS+m5Ewp7lBDzgJkClmp/TL4ymSRGwbxxogawfBS62PuzbQAW4tgjVeke zaFm2Vxe6a5hZOH1WrYKaZmkMPJzQgRK1ex+IpVm/3GZwAqw2HmcTCAkjw5jZM3D0If3PjC/PmySk eqmX9QNrpH5FjLqzVMjyGokk4Z5X7e1zNUKHShkYSNULyp0ySrrwCb/TeI1SFyWkbF4bvdktccENV KS+zsinA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fSuNq-0003GE-HU; Wed, 13 Jun 2018 01:15:34 +0000 Received: from mail-pl0-x241.google.com ([2607:f8b0:400e:c01::241]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fSuNm-0003Dc-Pj for linux-arm-kernel@lists.infradead.org; Wed, 13 Jun 2018 01:15:32 +0000 Received: by mail-pl0-x241.google.com with SMTP id 30-v6so490270pld.13 for ; Tue, 12 Jun 2018 18:15:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=LEiLxHnuXzrJZRR0BP5WDLf653G6R2kAVSdzwr1fE6Y=; b=KEpR8qCa2m0jNqTlc2olPsiFSv6XOk6TBrs5mYz5uoJZRCZ2YP+wpoiYsmxNRS1GJo GeboVCVO13TZxUUePj/4Nbdwcn6CXRRlWqF2Cz7yqqK7bKaUrZQ2B+E4BffZQ3AJNMpD hWp8Pu4A8IRGBPiddksM8SRl5uREJdXOhv0k4ycaHLW3YoA/A7/jkdj1frhlglXrA3Ch RC1d6CAKMHz3HF410UK4bZ6yFKZZskuLdiSfl6wqIxmId8U7VcSK50nRwMUc0nl8z3yi OTmvCPXoM48xjtiIrUz/n7WSrN/crucHYg7SDUcVO6P/2w75jFZWejD/r2nTyJTV60Xr JCVA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=LEiLxHnuXzrJZRR0BP5WDLf653G6R2kAVSdzwr1fE6Y=; b=NnXPyUqoFabLO8RGwjMwS1Jx2Ui+YukkNDwOW1lGIcDL4SjDJISlnGTeB1WtsrdbXa i72lx4HBk+1Xmli1OBzR4Uk9Za53BdLXOtW01XMjJmgOgl3MbviQO2erZbixyRYmZwXA S8mBlgAUY/EsUzHSENY1giHJym+Ur0EH0MIgOk1t8QFr72Bdmzu5IpsvJTiU60eo2/XH rD41uAJhshXuzqIWIH6n6hj7t3tG3/dUI7DVzhqhvhPZYYo5GZsag+KlNWJaKRZhnT5S OdSH5fWYtjOBgP8sBqkDTFMcLwkzA7GKft36tOG1fjQf94YBOpOW1x6CCS9NaLKFLJ6y M7hw== X-Gm-Message-State: APt69E3mPvgi8WLZEftuot/ScmFvOEI4rYQdtilrLB+0rcx+64grGHp6 jfzs9cBvCaSpfwZVN+DZ9l4= X-Google-Smtp-Source: ADUXVKIHyeTm2b6bYcv87hWl/0gnKsrmOwGSAbJHdgA8R8MMl6LnL7OaQBZKtnzfZwF3rOLQZq7Ohw== X-Received: by 2002:a17:902:24e:: with SMTP id 72-v6mr2800665plc.87.1528852519854; Tue, 12 Jun 2018 18:15:19 -0700 (PDT) Received: from localhost ([221.218.170.123]) by smtp.gmail.com with ESMTPSA id 29-v6sm2105327pfp.24.2018.06.12.18.15.18 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 12 Jun 2018 18:15:19 -0700 (PDT) From: Peng Donglin To: catalin.marinas@arm.com, will.deacon@arm.com Subject: [PATCH 1/2] ARM: dump: Convert to use DEFINE_SHOW_ATTRIBUTE macro Date: Wed, 13 Jun 2018 09:11:55 +0800 Message-Id: X-Mailer: git-send-email 2.7.4 In-Reply-To: References: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180612_181530_833070_BC2B3F98 X-CRM114-Status: GOOD ( 12.35 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Peng Donglin MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code. Signed-off-by: Peng Donglin --- 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 be8d87b..79002fe 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); int ptdump_debugfs_register(struct ptdump_info *info, const char *name) {