aboutsummaryrefslogtreecommitdiffstats
path: root/p11
diff options
Diffstat (limited to 'p11')
-rw-r--r--p11177
1 files changed, 0 insertions, 177 deletions
diff --git a/p11 b/p11
deleted file mode 100644
index 852bb9323a9164..00000000000000
--- a/p11
+++ /dev/null
@@ -1,177 +0,0 @@
-From e82f2d8eab210dc7eb0dba2bd8e3c64ad485442b Mon Sep 17 00:00:00 2001
-From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-Date: Wed, 30 May 2018 16:15:35 +0200
-Subject: [PATCH] x86: platform: no need to check return value of debugfs_create functions
-
-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: Thomas Gleixner <tglx@linutronix.de>
-Cc: Ingo Molnar <mingo@redhat.com>
-Cc: Borislav Petkov <bp@alien8.de>
-Cc: "H. Peter Anvin" <hpa@zytor.com>
-Cc: <x86@kernel.org>
-Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
----
- arch/x86/platform/atom/punit_atom_debug.c | 22 ++++------------------
- arch/x86/platform/intel-quark/imr.c | 14 ++++----------
- arch/x86/platform/intel/iosf_mbi.c | 21 +++------------------
- arch/x86/platform/uv/tlb_uv.c | 15 ++-------------
- 4 files changed, 13 insertions(+), 59 deletions(-)
-
---- a/arch/x86/platform/atom/punit_atom_debug.c
-+++ b/arch/x86/platform/atom/punit_atom_debug.c
-@@ -113,24 +113,12 @@ DEFINE_SHOW_ATTRIBUTE(punit_dev_state);
-
- static struct dentry *punit_dbg_file;
-
--static int punit_dbgfs_register(struct punit_device *punit_device)
-+static void punit_dbgfs_register(struct punit_device *punit_device)
- {
-- struct dentry *dev_state;
--
- punit_dbg_file = debugfs_create_dir("punit_atom", NULL);
-- if (!punit_dbg_file)
-- return -ENXIO;
--
-- dev_state = debugfs_create_file("dev_power_state", 0444,
-- punit_dbg_file, punit_device,
-- &punit_dev_state_fops);
-- if (!dev_state) {
-- pr_err("punit_dev_state register failed\n");
-- debugfs_remove(punit_dbg_file);
-- return -ENXIO;
-- }
-
-- return 0;
-+ debugfs_create_file("dev_power_state", 0444, punit_dbg_file,
-+ punit_device, &punit_dev_state_fops);
- }
-
- static void punit_dbgfs_unregister(void)
-@@ -160,9 +148,7 @@ static int __init punit_atom_debug_init(
- if (!id)
- return -ENODEV;
-
-- ret = punit_dbgfs_register((struct punit_device *)id->driver_data);
-- if (ret < 0)
-- return ret;
-+ punit_dbgfs_register((struct punit_device *)id->driver_data);
-
- return 0;
- }
---- a/arch/x86/platform/intel-quark/imr.c
-+++ b/arch/x86/platform/intel-quark/imr.c
-@@ -34,7 +34,6 @@
- #include <linux/types.h>
-
- struct imr_device {
-- struct dentry *file;
- bool init;
- struct mutex lock;
- int max_imr;
-@@ -230,13 +229,11 @@ DEFINE_SHOW_ATTRIBUTE(imr_dbgfs_state);
- * imr_debugfs_register - register debugfs hooks.
- *
- * @idev: pointer to imr_device structure.
-- * @return: 0 on success - errno on failure.
- */
--static int imr_debugfs_register(struct imr_device *idev)
-+static void imr_debugfs_register(struct imr_device *idev)
- {
-- idev->file = debugfs_create_file("imr_state", 0444, NULL, idev,
-- &imr_dbgfs_state_fops);
-- return PTR_ERR_OR_ZERO(idev->file);
-+ debugfs_create_file("imr_state", 0444, NULL, idev,
-+ &imr_dbgfs_state_fops);
- }
-
- /**
-@@ -581,7 +578,6 @@ static const struct x86_cpu_id imr_ids[]
- static int __init imr_init(void)
- {
- struct imr_device *idev = &imr_dev;
-- int ret;
-
- if (!x86_match_cpu(imr_ids) || !iosf_mbi_available())
- return -ENODEV;
-@@ -591,9 +587,7 @@ static int __init imr_init(void)
- idev->init = true;
-
- mutex_init(&idev->lock);
-- ret = imr_debugfs_register(idev);
-- if (ret != 0)
-- pr_warn("debugfs register failed!\n");
-+ imr_debugfs_register(idev);
- imr_fixup_memmap(idev);
- return 0;
- }
---- a/arch/x86/platform/intel/iosf_mbi.c
-+++ b/arch/x86/platform/intel/iosf_mbi.c
-@@ -470,31 +470,16 @@ static struct dentry *iosf_dbg;
-
- static void iosf_sideband_debug_init(void)
- {
-- struct dentry *d;
--
- iosf_dbg = debugfs_create_dir("iosf_sb", NULL);
-- if (IS_ERR_OR_NULL(iosf_dbg))
-- return;
-
- /* mdr */
-- d = debugfs_create_x32("mdr", 0660, iosf_dbg, &dbg_mdr);
-- if (!d)
-- goto cleanup;
-+ debugfs_create_x32("mdr", 0660, iosf_dbg, &dbg_mdr);
-
- /* mcrx */
-- d = debugfs_create_x32("mcrx", 0660, iosf_dbg, &dbg_mcrx);
-- if (!d)
-- goto cleanup;
-+ debugfs_create_x32("mcrx", 0660, iosf_dbg, &dbg_mcrx);
-
- /* mcr - initiates mailbox tranaction */
-- d = debugfs_create_file("mcr", 0660, iosf_dbg, &dbg_mcr, &iosf_mcr_fops);
-- if (!d)
-- goto cleanup;
--
-- return;
--
--cleanup:
-- debugfs_remove_recursive(d);
-+ debugfs_create_file("mcr", 0660, iosf_dbg, &dbg_mcr, &iosf_mcr_fops);
- }
-
- static void iosf_debugfs_init(void)
---- a/arch/x86/platform/uv/tlb_uv.c
-+++ b/arch/x86/platform/uv/tlb_uv.c
-@@ -68,7 +68,6 @@ static struct tunables tunables[] = {
- };
-
- static struct dentry *tunables_dir;
--static struct dentry *tunables_file;
-
- /* these correspond to the statistics printed by ptc_seq_show() */
- static char *stat_description[] = {
-@@ -1702,18 +1701,8 @@ static int __init uv_ptc_init(void)
- }
-
- tunables_dir = debugfs_create_dir(UV_BAU_TUNABLES_DIR, NULL);
-- if (!tunables_dir) {
-- pr_err("unable to create debugfs directory %s\n",
-- UV_BAU_TUNABLES_DIR);
-- return -EINVAL;
-- }
-- tunables_file = debugfs_create_file(UV_BAU_TUNABLES_FILE, 0600,
-- tunables_dir, NULL, &tunables_fops);
-- if (!tunables_file) {
-- pr_err("unable to create debugfs file %s\n",
-- UV_BAU_TUNABLES_FILE);
-- return -EINVAL;
-- }
-+ debugfs_create_file(UV_BAU_TUNABLES_FILE, 0600, tunables_dir, NULL,
-+ &tunables_fops);
- return 0;
- }
-