From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: linuxppc-dev@lists.ozlabs.org
Cc: linux-kernel@vger.kernel.org, Nicholas Piggin <npiggin@gmail.com>,
Paul Mackerras <paulus@samba.org>,
"Aneesh Kumar K.V" <aneesh.kumar@linux.ibm.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Subject: [PATCH 3/6] powerpc: mm: book3s64: hash_utils: no need to check return value of debugfs_create functions
Date: Sun, 9 Feb 2020 11:58:58 +0100 [thread overview]
Message-ID: <20200209105901.1620958-3-gregkh@linuxfoundation.org> (raw)
In-Reply-To: <20200209105901.1620958-1-gregkh@linuxfoundation.org>
When calling debugfs functions, there is no need to ever check the
return value. The function can work or not, but the code logic should
never do something different based on this.
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: "Aneesh Kumar K.V" <aneesh.kumar@linux.ibm.com>
Cc: Christophe Leroy <christophe.leroy@c-s.fr>
Cc: Nicholas Piggin <npiggin@gmail.com>
Cc: linuxppc-dev@lists.ozlabs.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
arch/powerpc/mm/book3s64/hash_utils.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/arch/powerpc/mm/book3s64/hash_utils.c b/arch/powerpc/mm/book3s64/hash_utils.c
index 523d4d39d11e..7e5714a69a58 100644
--- a/arch/powerpc/mm/book3s64/hash_utils.c
+++ b/arch/powerpc/mm/book3s64/hash_utils.c
@@ -2018,11 +2018,8 @@ DEFINE_DEBUGFS_ATTRIBUTE(fops_hpt_order, hpt_order_get, hpt_order_set, "%llu\n")
static int __init hash64_debugfs(void)
{
- if (!debugfs_create_file_unsafe("hpt_order", 0600, powerpc_debugfs_root,
- NULL, &fops_hpt_order)) {
- pr_err("lpar: unable to create hpt_order debugsfs file\n");
- }
-
+ debugfs_create_file("hpt_order", 0600, powerpc_debugfs_root, NULL,
+ &fops_hpt_order);
return 0;
}
machine_device_initcall(pseries, hash64_debugfs);
--
2.25.0
next prev parent reply other threads:[~2020-02-09 13:05 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-09 10:58 [PATCH 1/6] powerpc: kernel: no need to check return value of debugfs_create functions Greg Kroah-Hartman
2020-02-09 10:58 ` [PATCH 2/6] powerpc: kvm: " Greg Kroah-Hartman
2020-03-03 7:46 ` Michael Ellerman
2020-03-03 8:50 ` Greg Kroah-Hartman
2020-03-03 9:45 ` Michael Ellerman
2020-03-03 9:58 ` Greg Kroah-Hartman
2020-03-03 10:32 ` Michael Ellerman
2020-02-09 10:58 ` Greg Kroah-Hartman [this message]
2020-02-09 10:58 ` [PATCH 4/6] powerpc: mm: ptdump: " Greg Kroah-Hartman
2020-02-09 10:59 ` [PATCH 5/6] powerpc: cell: axon_msi: " Greg Kroah-Hartman
2020-02-09 10:59 ` [PATCH 6/6] powerpc: powernv: " Greg Kroah-Hartman
2020-02-10 15:01 ` Oliver O'Halloran
2020-02-10 15:19 ` Greg Kroah-Hartman
2020-03-03 9:52 ` Michael Ellerman
2020-03-06 0:27 ` [PATCH 1/6] powerpc: kernel: " Michael Ellerman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200209105901.1620958-3-gregkh@linuxfoundation.org \
--to=gregkh@linuxfoundation.org \
--cc=aneesh.kumar@linux.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=npiggin@gmail.com \
--cc=paulus@samba.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).