Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp343480ybx; Tue, 29 Oct 2019 19:53:48 -0700 (PDT) X-Google-Smtp-Source: APXvYqwr5qwM0erCCpjx/wtLBI7x3blJTcLv2qwQPXeclKtoNQdydNCPBz4Dlsgyr+ZPZ+XWllUe X-Received: by 2002:a50:a9e3:: with SMTP id n90mr11561939edc.52.1572404027918; Tue, 29 Oct 2019 19:53:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1572404027; cv=none; d=google.com; s=arc-20160816; b=ZElpWsMCsEQyCvexpgG1ei2ljsGXJ0XwdBTXqlW9abliEKnq5BBc80GHigrdrRwyt3 mtu8hxzzvYAQIsPS6rcQyS4au7PeH63jp7RSPtAchABweqD0Fv+SFhPEd5+3Ncxy4PsR ZcaJ4Ti2VIg6yxZ/lHp3bcb59grAbaXr1aHbeF89383gXM/Oudy8aUkeaPQAO+wk93PW Wl/7A3Z85eKLX007bxlinXwVqdzo3aWP997hswq2Z4p+tvFjtY6QJPEExODvFpfpgAyY eqe9EPSPsN+gv/SAfOxslFwz0Wr2ngPrSNSYmUG4bwMloG0I5rb2MEublLf9g52VW2al I5Gw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:cc :to:from; bh=43FoWLbBnlt1W5hC8TYev0U9xW1VKnYc93aWuy4Pu38=; b=b3YB49tDI95LmedAq+jxBfrltHMZHwQyI84wg957alJg5O6Z09uc2vtnf5NTZeX8Da mKFNNZkUMDcvFW1etewqdP8RDCeiLzBO8CrZbPaAnpgbGgKsXHWD/hvIKe9tDJwcmRhl aBEyuhhM2/hIJyz8VBJBktntmGyZry7ceBXZI3sVIou1jM2QwGlPbtBFrr02D126ol2m VqQaMCowN+F5e6Dmk/JmyzqQo21RK7qIHrxS+zt3ghcMuYR0GMNUl9VCTK46qYFo7dw6 X9hZH9YofNEzUtQRBwyWHPotuB4gLUKeR0rpIemIYTLjb1y5TMfNEIx3+Z76TER8++hg 6Oqg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id qx25si360392ejb.407.2019.10.29.19.53.25; Tue, 29 Oct 2019 19:53:47 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727121AbfJ3Cvz (ORCPT + 99 others); Tue, 29 Oct 2019 22:51:55 -0400 Received: from szxga04-in.huawei.com ([45.249.212.190]:5648 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727093AbfJ3Cvz (ORCPT ); Tue, 29 Oct 2019 22:51:55 -0400 Received: from DGGEMS404-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id E969BDF9E86883B783AE; Wed, 30 Oct 2019 10:51:37 +0800 (CST) Received: from linux-ibm.site (10.175.102.37) by DGGEMS404-HUB.china.huawei.com (10.3.19.204) with Microsoft SMTP Server id 14.3.439.0; Wed, 30 Oct 2019 10:51:31 +0800 From: zhong jiang To: , CC: , , Subject: [PATCH] mm/hwpoison-inject: use DEFINE_DEBUGFS_ATTRIBUTE to define debugfs fops Date: Wed, 30 Oct 2019 10:47:40 +0800 Message-ID: <1572403660-44718-1-git-send-email-zhongjiang@huawei.com> X-Mailer: git-send-email 1.7.12.4 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.175.102.37] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org It is more clear to use DEFINE_DEBUGFS_ATTRIBUTE to define debugfs file operation rather than DEFINE_SIMPLE_ATTRIBUTE. Signed-off-by: zhong jiang --- mm/hwpoison-inject.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mm/hwpoison-inject.c b/mm/hwpoison-inject.c index 5b7430b..e488876 100644 --- a/mm/hwpoison-inject.c +++ b/mm/hwpoison-inject.c @@ -67,8 +67,8 @@ static int hwpoison_unpoison(void *data, u64 val) return unpoison_memory(val); } -DEFINE_SIMPLE_ATTRIBUTE(hwpoison_fops, NULL, hwpoison_inject, "%lli\n"); -DEFINE_SIMPLE_ATTRIBUTE(unpoison_fops, NULL, hwpoison_unpoison, "%lli\n"); +DEFINE_DEBUGFS_ATTRIBUTE(hwpoison_fops, NULL, hwpoison_inject, "%lli\n"); +DEFINE_DEBUGFS_ATTRIBUTE(unpoison_fops, NULL, hwpoison_unpoison, "%lli\n"); static void pfn_inject_exit(void) { -- 1.7.12.4