aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-03-08 09:08:16 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-03-08 09:08:16 +0100
commit7308d54a0eeec1a55fa0cb4f759c7eb6fa1f2527 (patch)
treed5a2d5a693b8d3519a483ceaace424251809b4fc
parent80f9fa9624df530d0e0623a764491b43f0ae78bc (diff)
downloadpatches-7308d54a0eeec1a55fa0cb4f759c7eb6fa1f2527.tar.gz
patches update
-rw-r--r--0001-tty-n_r3964-locking-fixups.patch31
-rw-r--r--cp210x.patch16
-rw-r--r--dynamic_debug-allow-to-work-if-debugfs-is-disabled.patch98
-rw-r--r--lib-raid6-fix-awk-build-warnings.patch33
-rw-r--r--maintainers-add-entry-for-licenses-and-spdx-stuff.patch38
-rw-r--r--p04543
-rw-r--r--series5
-rw-r--r--usb_DEVICE_ATTR.patch78
8 files changed, 184 insertions, 658 deletions
diff --git a/0001-tty-n_r3964-locking-fixups.patch b/0001-tty-n_r3964-locking-fixups.patch
index dbcbfeff34d067..6ff8c9d24fed6e 100644
--- a/0001-tty-n_r3964-locking-fixups.patch
+++ b/0001-tty-n_r3964-locking-fixups.patch
@@ -30,15 +30,13 @@ removed again.
Reported-by: Jann Horn <jannh@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
- drivers/tty/n_r3964.c | 54 +++++++++++++++++++++++++++++++----------
- include/linux/n_r3964.h | 2 +-
+ drivers/tty/n_r3964.c | 54 ++++++++++++++++++++++++++++++++++++------------
+ include/linux/n_r3964.h | 2 -
2 files changed, 42 insertions(+), 14 deletions(-)
-diff --git a/drivers/tty/n_r3964.c b/drivers/tty/n_r3964.c
-index f75696f0ee2d..664b201b9abc 100644
--- a/drivers/tty/n_r3964.c
+++ b/drivers/tty/n_r3964.c
-@@ -484,6 +484,7 @@ static void on_receive_block(struct r3964_info *pInfo)
+@@ -484,6 +484,7 @@ static void on_receive_block(struct r396
unsigned int length;
struct r3964_client_info *pClient;
struct r3964_block_header *pBlock;
@@ -46,7 +44,7 @@ index f75696f0ee2d..664b201b9abc 100644
length = pInfo->rx_position;
-@@ -541,12 +542,14 @@ static void on_receive_block(struct r3964_info *pInfo)
+@@ -541,12 +542,14 @@ static void on_receive_block(struct r396
add_rx_queue(pInfo, pBlock);
/* notify attached client processes: */
@@ -61,7 +59,7 @@ index f75696f0ee2d..664b201b9abc 100644
wake_up_interruptible(&pInfo->tty->read_wait);
pInfo->state = R3964_IDLE;
-@@ -743,13 +746,17 @@ static struct r3964_client_info *findClient(struct r3964_info *pInfo,
+@@ -743,13 +746,17 @@ static struct r3964_client_info *findCli
struct pid *pid)
{
struct r3964_client_info *pClient;
@@ -81,7 +79,7 @@ index f75696f0ee2d..664b201b9abc 100644
}
static int enable_signals(struct r3964_info *pInfo, struct pid *pid, int arg)
-@@ -757,8 +764,11 @@ static int enable_signals(struct r3964_info *pInfo, struct pid *pid, int arg)
+@@ -757,8 +764,11 @@ static int enable_signals(struct r3964_i
struct r3964_client_info *pClient;
struct r3964_client_info **ppClient;
struct r3964_message *pMsg;
@@ -93,7 +91,7 @@ index f75696f0ee2d..664b201b9abc 100644
/* Remove client from client list */
for (ppClient = &pInfo->firstClient; *ppClient;
ppClient = &(*ppClient)->next) {
-@@ -779,9 +789,11 @@ static int enable_signals(struct r3964_info *pInfo, struct pid *pid, int arg)
+@@ -779,9 +789,11 @@ static int enable_signals(struct r3964_i
put_pid(pClient->pid);
kfree(pClient);
TRACE_M("enable_signals - kfree %p", pClient);
@@ -105,7 +103,7 @@ index f75696f0ee2d..664b201b9abc 100644
return -EINVAL;
} else {
pClient = findClient(pInfo, pid);
-@@ -796,6 +808,7 @@ static int enable_signals(struct r3964_info *pInfo, struct pid *pid, int arg)
+@@ -796,6 +808,7 @@ static int enable_signals(struct r3964_i
if (pClient == NULL)
return -ENOMEM;
@@ -113,7 +111,7 @@ index f75696f0ee2d..664b201b9abc 100644
TRACE_PS("add client %d to client list", pid_nr(pid));
spin_lock_init(&pClient->lock);
pClient->sig_flags = arg;
-@@ -806,6 +819,7 @@ static int enable_signals(struct r3964_info *pInfo, struct pid *pid, int arg)
+@@ -806,6 +819,7 @@ static int enable_signals(struct r3964_i
pClient->next_block_to_read = NULL;
pClient->msg_count = 0;
pInfo->firstClient = pClient;
@@ -121,7 +119,7 @@ index f75696f0ee2d..664b201b9abc 100644
}
}
-@@ -850,8 +864,7 @@ static void add_msg(struct r3964_client_info *pClient, int msg_id, int arg,
+@@ -850,8 +864,7 @@ static void add_msg(struct r3964_client_
if (pClient->msg_count < R3964_MAX_MSG_COUNT - 1) {
queue_the_message:
@@ -131,7 +129,7 @@ index f75696f0ee2d..664b201b9abc 100644
TRACE_M("add_msg - kmalloc %p", pMsg);
if (pMsg == NULL) {
return;
-@@ -1069,9 +1082,7 @@ static ssize_t r3964_read(struct tty_struct *tty, struct file *file,
+@@ -1069,9 +1082,7 @@ static ssize_t r3964_read(struct tty_str
TRACE_L("read()");
@@ -142,7 +140,7 @@ index f75696f0ee2d..664b201b9abc 100644
if (file->f_flags & O_NONBLOCK) {
if (!mutex_trylock(&pInfo->read_lock))
return -EAGAIN;
-@@ -1193,28 +1204,45 @@ static int r3964_ioctl(struct tty_struct *tty, struct file *file,
+@@ -1193,28 +1204,45 @@ static int r3964_ioctl(struct tty_struct
unsigned int cmd, unsigned long arg)
{
struct r3964_info *pInfo = tty->disc_data;
@@ -194,8 +192,6 @@ index f75696f0ee2d..664b201b9abc 100644
}
#ifdef CONFIG_COMPAT
-diff --git a/include/linux/n_r3964.h b/include/linux/n_r3964.h
-index 90a803aa42e8..9cc0020930ad 100644
--- a/include/linux/n_r3964.h
+++ b/include/linux/n_r3964.h
@@ -162,7 +162,7 @@ struct r3964_info {
@@ -207,6 +203,3 @@ index 90a803aa42e8..9cc0020930ad 100644
struct r3964_client_info *firstClient;
unsigned int state;
---
-2.21.0
-
diff --git a/cp210x.patch b/cp210x.patch
deleted file mode 100644
index c0cdb943af1fec..00000000000000
--- a/cp210x.patch
+++ /dev/null
@@ -1,16 +0,0 @@
-cp210x patch
-
----
- drivers/usb/serial/cp210x.c | 1 +
- 1 file changed, 1 insertion(+)
-
---- a/drivers/usb/serial/cp210x.c
-+++ b/drivers/usb/serial/cp210x.c
-@@ -125,6 +125,7 @@ static const struct usb_device_id id_tab
- { USB_DEVICE(0x10C4, 0x8341) }, /* Siemens MC35PU GPRS Modem */
- { USB_DEVICE(0x10C4, 0x8382) }, /* Cygnal Integrated Products, Inc. */
- { USB_DEVICE(0x10C4, 0x83A8) }, /* Amber Wireless AMB2560 */
-+ { USB_DEVICE(0x10C4, 0x83AA) }, /* Mark-10 Digital Force Gauge */
- { USB_DEVICE(0x10C4, 0x83D8) }, /* DekTec DTA Plus VHF/UHF Booster/Attenuator */
- { USB_DEVICE(0x10C4, 0x8411) }, /* Kyocera GPS Module */
- { USB_DEVICE(0x10C4, 0x8418) }, /* IRZ Automation Teleport SG-10 GSM/GPRS Modem */
diff --git a/dynamic_debug-allow-to-work-if-debugfs-is-disabled.patch b/dynamic_debug-allow-to-work-if-debugfs-is-disabled.patch
new file mode 100644
index 00000000000000..2df24d3099c993
--- /dev/null
+++ b/dynamic_debug-allow-to-work-if-debugfs-is-disabled.patch
@@ -0,0 +1,98 @@
+From 7d61af935fdc0e18519a6f907d4b3b0aa05b5972 Mon Sep 17 00:00:00 2001
+From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+Date: Wed, 22 Jan 2020 08:39:32 +0100
+Subject: [PATCH] dynamic_debug: allow to work if debugfs is disabled
+
+With the realization that having debugfs enabled on "production" systems
+is generally not a good idea, debugfs is being disabled from more and
+more platforms over time. However, the functionality of dynamic
+debugging still is needed at times, and since it relies on debugfs for
+its user api, having debugfs disabled also forces dynamic debug to be
+disabled.
+
+To get around this, also create the "control" file for dynamic_debug in
+procfs. This allows people turn on debugging as needed at runtime for
+individual driverfs and subsystems.
+
+Reported-by: many different companies
+Cc: Jason Baron <jbaron@akamai.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ Documentation/admin-guide/dynamic-debug-howto.rst | 3 +++
+ lib/Kconfig.debug | 7 ++++---
+ lib/dynamic_debug.c | 20 +++++++++++++++-----
+ 3 files changed, 22 insertions(+), 8 deletions(-)
+
+--- a/Documentation/admin-guide/dynamic-debug-howto.rst
++++ b/Documentation/admin-guide/dynamic-debug-howto.rst
+@@ -54,6 +54,9 @@ If you make a mistake with the syntax, t
+ <debugfs>/dynamic_debug/control
+ -bash: echo: write error: Invalid argument
+
++Note, for systems without 'debugfs' enabled, the control file can also
++be found in ``/proc/dynamic_debug/control``.
++
+ Viewing Dynamic Debug Behaviour
+ ===============================
+
+--- a/lib/Kconfig.debug
++++ b/lib/Kconfig.debug
+@@ -98,7 +98,7 @@ config DYNAMIC_DEBUG
+ bool "Enable dynamic printk() support"
+ default n
+ depends on PRINTK
+- depends on DEBUG_FS
++ depends on (DEBUG_FS || PROC_FS)
+ help
+
+ Compiles debug level messages into the kernel, which would not
+@@ -116,8 +116,9 @@ config DYNAMIC_DEBUG
+ Usage:
+
+ Dynamic debugging is controlled via the 'dynamic_debug/control' file,
+- which is contained in the 'debugfs' filesystem. Thus, the debugfs
+- filesystem must first be mounted before making use of this feature.
++ which is contained in the 'debugfs' filesystem or procfs.
++ Thus, the debugfs or procfs filesystem must first be mounted before
++ making use of this feature.
+ We refer the control file as: <debugfs>/dynamic_debug/control. This
+ file contains a list of the debug statements that can be enabled. The
+ format for each line of the file is:
+--- a/lib/dynamic_debug.c
++++ b/lib/dynamic_debug.c
+@@ -991,15 +991,25 @@ static void ddebug_remove_all_tables(voi
+
+ static __initdata int ddebug_init_success;
+
+-static int __init dynamic_debug_init_debugfs(void)
++static int __init dynamic_debug_init_control(void)
+ {
+- struct dentry *dir;
++ struct proc_dir_entry *procfs_dir;
++ struct dentry *debugfs_dir;
+
+ if (!ddebug_init_success)
+ return -ENODEV;
+
+- dir = debugfs_create_dir("dynamic_debug", NULL);
+- debugfs_create_file("control", 0644, dir, NULL, &ddebug_proc_fops);
++ /* Create the control file in debugfs if it is enabled */
++ if (debugfs_initialized()) {
++ debugfs_dir = debugfs_create_dir("dynamic_debug", NULL);
++ debugfs_create_file("control", 0644, debugfs_dir, NULL,
++ &ddebug_proc_fops);
++ }
++
++ /* Also create the control file in procfs */
++ procfs_dir = proc_mkdir("dynamic_debug", NULL);
++ if (procfs_dir)
++ proc_create("control", 0644, procfs_dir, &ddebug_proc_fops);
+
+ return 0;
+ }
+@@ -1077,4 +1087,4 @@ out_err:
+ early_initcall(dynamic_debug_init);
+
+ /* Debugfs setup must be done later */
+-fs_initcall(dynamic_debug_init_debugfs);
++fs_initcall(dynamic_debug_init_control);
diff --git a/lib-raid6-fix-awk-build-warnings.patch b/lib-raid6-fix-awk-build-warnings.patch
new file mode 100644
index 00000000000000..bf0caf4aee0fd6
--- /dev/null
+++ b/lib-raid6-fix-awk-build-warnings.patch
@@ -0,0 +1,33 @@
+From foo@baz Fri 06 Dec 2019 04:20:42 PM CET
+Date: Fri, 06 Dec 2019 16:20:42 +0100
+To: Greg KH <gregkh@linuxfoundation.org>
+From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+Subject: [PATCH] lib: raid6: fix awk build warnings
+
+Newer versions of awk spit out these fun warnings:
+ awk: ../lib/raid6/unroll.awk:16: warning: regexp escape sequence `\#' is not a known regexp operator
+
+As commit 700c1018b86d ("x86/insn: Fix awk regexp warnings") showed, it
+turns out that there are a number of awk strings that do not need to be
+escaped and newer versions of awk now warn about this.
+
+Fix the string up so that no warning is produced. The exact same kernel
+module gets created before and after this patch, showing that it wasn't
+needed.
+
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ lib/raid6/unroll.awk | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/lib/raid6/unroll.awk
++++ b/lib/raid6/unroll.awk
+@@ -13,7 +13,7 @@ BEGIN {
+ for (i = 0; i < rep; ++i) {
+ tmp = $0
+ gsub(/\$\$/, i, tmp)
+- gsub(/\$\#/, n, tmp)
++ gsub(/\$#/, n, tmp)
+ gsub(/\$\*/, "$", tmp)
+ print tmp
+ }
diff --git a/maintainers-add-entry-for-licenses-and-spdx-stuff.patch b/maintainers-add-entry-for-licenses-and-spdx-stuff.patch
deleted file mode 100644
index a411f50a538efe..00000000000000
--- a/maintainers-add-entry-for-licenses-and-spdx-stuff.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-From foo@baz Tue 27 Aug 2019 09:50:55 PM CEST
-Date: Tue, 27 Aug 2019 21:50:55 +0200
-From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-To: Thomas Gleixner <tglx@linutronix.de>, linux-kernel@vger.kernel.org
-Cc: "Darrick J. Wong" <darrick.wong@oracle.com>, linux-spdx@vger.kernel.org
-Subject: [PATCH] MAINTAINERS: add entry for LICENSES and SPDX stuff
-
-Thomas and I seem to have become the "unofficial" maintainers for these
-files and questions about SPDX things. So let's make it official.
-
-Reported-by: "Darrick J. Wong" <darrick.wong@oracle.com>
-Cc: Thomas Gleixner <tglx@linutronix.de>
-Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
----
- MAINTAINERS | 12 ++++++++++++
- 1 file changed, 12 insertions(+)
-
---- a/MAINTAINERS
-+++ b/MAINTAINERS
-@@ -9234,6 +9234,18 @@ F: include/linux/nd.h
- F: include/linux/libnvdimm.h
- F: include/uapi/linux/ndctl.h
-
-+LICENSES and SPDX stuff
-+M: Thomas Gleixner <tglx@linutronix.de>
-+M: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-+L: linux-spdx@vger.kernel.org
-+S: Maintained
-+T: git git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/spdx.git
-+F: COPYING
-+F: Documentation/process/license-rules.rst
-+F: LICENSES/
-+F: scripts/spdxcheck-test.sh
-+F: scripts/spdxcheck.py
-+
- LIGHTNVM PLATFORM SUPPORT
- M: Matias Bjorling <mb@lightnvm.io>
- W: http://github/OpenChannelSSD
diff --git a/p04 b/p04
deleted file mode 100644
index 0f4810c6cdb3e8..00000000000000
--- a/p04
+++ /dev/null
@@ -1,543 +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] powerpc: 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.
-
-Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
----
- arch/powerpc/include/asm/kvm_host.h | 3 --
- arch/powerpc/kernel/fadump.c | 9 +-----
- arch/powerpc/kernel/setup-common.c | 3 --
- arch/powerpc/kernel/traps.c | 27 ++++---------------
- arch/powerpc/kvm/book3s_64_mmu_hv.c | 5 +--
- arch/powerpc/kvm/book3s_64_mmu_radix.c | 5 +--
- arch/powerpc/kvm/book3s_hv.c | 9 +-----
- arch/powerpc/kvm/timing.c | 11 +-------
- arch/powerpc/platforms/4xx/ocm.c | 14 +---------
- arch/powerpc/platforms/cell/axon_msi.c | 6 ----
- arch/powerpc/platforms/powernv/memtrace.c | 7 -----
- arch/powerpc/platforms/powernv/opal-imc.c | 28 +++++---------------
- arch/powerpc/platforms/powernv/pci-ioda.c | 5 ---
- arch/powerpc/platforms/powernv/vas-debug.c | 37 ++-------------------------
- arch/powerpc/platforms/pseries/dtl.c | 36 +++-----------------------
- arch/powerpc/platforms/pseries/hvCall_inst.c | 12 ++------
- arch/powerpc/sysdev/scom.c | 8 -----
- 17 files changed, 38 insertions(+), 187 deletions(-)
-
---- a/arch/powerpc/include/asm/kvm_host.h
-+++ b/arch/powerpc/include/asm/kvm_host.h
-@@ -288,8 +288,6 @@ struct kvm_arch {
- pgd_t *pgtable;
- u64 process_table;
- struct dentry *debugfs_dir;
-- struct dentry *htab_dentry;
-- struct dentry *radix_dentry;
- struct kvm_resize_hpt *resize_hpt; /* protected by kvm->lock */
- #endif /* CONFIG_KVM_BOOK3S_HV_POSSIBLE */
- #ifdef CONFIG_KVM_BOOK3S_PR_POSSIBLE
-@@ -809,7 +807,6 @@ struct kvm_vcpu_arch {
- struct kvmhv_tb_accumulator cede_time; /* time napping inside guest */
-
- struct dentry *debugfs_dir;
-- struct dentry *debugfs_timings;
- #endif /* CONFIG_KVM_BOOK3S_HV_EXIT_TIMING */
- };
-
---- a/arch/powerpc/kernel/fadump.c
-+++ b/arch/powerpc/kernel/fadump.c
-@@ -1637,7 +1637,6 @@ DEFINE_SHOW_ATTRIBUTE(fadump_region);
-
- static void fadump_init_files(void)
- {
-- struct dentry *debugfs_file;
- int rc = 0;
-
- rc = sysfs_create_file(kernel_kobj, &fadump_attr.attr);
-@@ -1650,12 +1649,8 @@ static void fadump_init_files(void)
- printk(KERN_ERR "fadump: unable to create sysfs file"
- " fadump_registered (%d)\n", rc);
-
-- debugfs_file = debugfs_create_file("fadump_region", 0444,
-- powerpc_debugfs_root, NULL,
-- &fadump_region_fops);
-- if (!debugfs_file)
-- printk(KERN_ERR "fadump: unable to create debugfs file"
-- " fadump_region\n");
-+ debugfs_create_file("fadump_region", 0444, powerpc_debugfs_root, NULL,
-+ &fadump_region_fops);
-
- if (fw_dump.dump_active) {
- rc = sysfs_create_file(kernel_kobj, &fadump_release_attr.attr);
---- a/arch/powerpc/kernel/setup-common.c
-+++ b/arch/powerpc/kernel/setup-common.c
-@@ -767,8 +767,7 @@ EXPORT_SYMBOL(powerpc_debugfs_root);
- static int powerpc_debugfs_init(void)
- {
- powerpc_debugfs_root = debugfs_create_dir("powerpc", NULL);
--
-- return powerpc_debugfs_root == NULL;
-+ return 0;
- }
- arch_initcall(powerpc_debugfs_init);
- #endif
---- a/arch/powerpc/kernel/traps.c
-+++ b/arch/powerpc/kernel/traps.c
-@@ -2261,35 +2261,20 @@ void ppc_warn_emulated_print(const char
-
- static int __init ppc_warn_emulated_init(void)
- {
-- struct dentry *dir, *d;
-+ struct dentry *dir;
- unsigned int i;
- struct ppc_emulated_entry *entries = (void *)&ppc_emulated;
-
-- if (!powerpc_debugfs_root)
-- return -ENODEV;
--
- dir = debugfs_create_dir("emulated_instructions",
- powerpc_debugfs_root);
-- if (!dir)
-- return -ENOMEM;
-
-- d = debugfs_create_u32("do_warn", 0644, dir,
-- &ppc_warn_emulated);
-- if (!d)
-- goto fail;
--
-- for (i = 0; i < sizeof(ppc_emulated)/sizeof(*entries); i++) {
-- d = debugfs_create_u32(entries[i].name, 0644, dir,
-- (u32 *)&entries[i].val.counter);
-- if (!d)
-- goto fail;
-- }
-+ debugfs_create_u32("do_warn", 0644, dir, &ppc_warn_emulated);
-
-- return 0;
-+ for (i = 0; i < sizeof(ppc_emulated)/sizeof(*entries); i++)
-+ debugfs_create_u32(entries[i].name, 0644, dir,
-+ (u32 *)&entries[i].val.counter);
-
--fail:
-- debugfs_remove_recursive(dir);
-- return -ENOMEM;
-+ return 0;
- }
-
- device_initcall(ppc_warn_emulated_init);
---- a/arch/powerpc/kvm/book3s_64_mmu_hv.c
-+++ b/arch/powerpc/kvm/book3s_64_mmu_hv.c
-@@ -2149,9 +2149,8 @@ static const struct file_operations debu
-
- void kvmppc_mmu_debugfs_init(struct kvm *kvm)
- {
-- kvm->arch.htab_dentry = debugfs_create_file("htab", 0400,
-- kvm->arch.debugfs_dir, kvm,
-- &debugfs_htab_fops);
-+ debugfs_create_file("htab", 0400, kvm->arch.debugfs_dir, kvm,
-+ &debugfs_htab_fops);
- }
-
- void kvmppc_mmu_book3s_hv_init(struct kvm_vcpu *vcpu)
---- a/arch/powerpc/kvm/book3s_64_mmu_radix.c
-+++ b/arch/powerpc/kvm/book3s_64_mmu_radix.c
-@@ -1353,9 +1353,8 @@ static const struct file_operations debu
-
- void kvmhv_radix_debugfs_init(struct kvm *kvm)
- {
-- kvm->arch.radix_dentry = debugfs_create_file("radix", 0400,
-- kvm->arch.debugfs_dir, kvm,
-- &debugfs_radix_fops);
-+ debugfs_create_file("radix", 0400, kvm->arch.debugfs_dir, kvm,
-+ &debugfs_radix_fops);
- }
-
- int kvmppc_radix_init(void)
---- a/arch/powerpc/kvm/book3s_hv.c
-+++ b/arch/powerpc/kvm/book3s_hv.c
-@@ -2231,14 +2231,9 @@ static void debugfs_vcpu_init(struct kvm
- struct kvm *kvm = vcpu->kvm;
-
- snprintf(buf, sizeof(buf), "vcpu%u", id);
-- if (IS_ERR_OR_NULL(kvm->arch.debugfs_dir))
-- return;
- vcpu->arch.debugfs_dir = debugfs_create_dir(buf, kvm->arch.debugfs_dir);
-- if (IS_ERR_OR_NULL(vcpu->arch.debugfs_dir))
-- return;
-- vcpu->arch.debugfs_timings =
-- debugfs_create_file("timings", 0444, vcpu->arch.debugfs_dir,
-- vcpu, &debugfs_timings_ops);
-+ debugfs_create_file("timings", 0444, vcpu->arch.debugfs_dir, vcpu,
-+ &debugfs_timings_ops);
- }
-
- #else /* CONFIG_KVM_BOOK3S_HV_EXIT_TIMING */
---- a/arch/powerpc/kvm/timing.c
-+++ b/arch/powerpc/kvm/timing.c
-@@ -207,19 +207,12 @@ static const struct file_operations kvmp
- void kvmppc_create_vcpu_debugfs(struct kvm_vcpu *vcpu, unsigned int id)
- {
- static char dbg_fname[50];
-- struct dentry *debugfs_file;
-
- snprintf(dbg_fname, sizeof(dbg_fname), "vm%u_vcpu%u_timing",
- current->pid, id);
-- debugfs_file = debugfs_create_file(dbg_fname, 0666,
-- kvm_debugfs_dir, vcpu,
-- &kvmppc_exit_timing_fops);
-+ debugfs_create_file(dbg_fname, 0666, kvm_debugfs_dir, vcpu,
-+ &kvmppc_exit_timing_fops);
-
-- if (!debugfs_file) {
-- printk(KERN_ERR"%s: error creating debugfs file %s\n",
-- __func__, dbg_fname);
-- return;
-- }
-
- vcpu->arch.debugfs_exit_timing = debugfs_file;
- }
---- a/arch/powerpc/platforms/4xx/ocm.c
-+++ b/arch/powerpc/platforms/4xx/ocm.c
-@@ -266,22 +266,12 @@ static const struct file_operations ocm_
- .release = single_release,
- };
-
--static int ocm_debugfs_init(void)
-+static void ocm_debugfs_init(void)
- {
- struct dentry *junk;
-
- junk = debugfs_create_dir("ppc4xx_ocm", 0);
-- if (!junk) {
-- printk(KERN_ALERT "debugfs ppc4xx ocm: failed to create dir\n");
-- return -1;
-- }
--
-- if (debugfs_create_file("info", 0644, junk, NULL, &ocm_debugfs_fops)) {
-- printk(KERN_ALERT "debugfs ppc4xx ocm: failed to create file\n");
-- return -1;
-- }
--
-- return 0;
-+ debugfs_create_file("info", 0644, junk, NULL, &ocm_debugfs_fops);
- }
-
- void *ppc4xx_ocm_alloc(phys_addr_t *phys, int size, int align,
---- a/arch/powerpc/platforms/cell/axon_msi.c
-+++ b/arch/powerpc/platforms/cell/axon_msi.c
-@@ -480,10 +480,6 @@ void axon_msi_debug_setup(struct device_
-
- snprintf(name, sizeof(name), "msic_%d", of_node_to_nid(dn));
-
-- if (!debugfs_create_file(name, 0600, powerpc_debugfs_root,
-- msic, &fops_msic)) {
-- pr_devel("axon_msi: debugfs_create_file failed!\n");
-- return;
-- }
-+ debugfs_create_file(name, 0600, powerpc_debugfs_root, msic, &fops_msic);
- }
- #endif /* DEBUG */
---- a/arch/powerpc/platforms/powernv/memtrace.c
-+++ b/arch/powerpc/platforms/powernv/memtrace.c
-@@ -187,11 +187,6 @@ static int memtrace_init_debugfs(void)
-
- snprintf(ent->name, 16, "%08x", ent->nid);
- dir = debugfs_create_dir(ent->name, memtrace_debugfs_dir);
-- if (!dir) {
-- pr_err("Failed to create debugfs directory for node %d\n",
-- ent->nid);
-- return -1;
-- }
-
- ent->dir = dir;
- debugfs_create_file("trace", 0400, dir, ent, &memtrace_fops);
-@@ -314,8 +309,6 @@ static int memtrace_init(void)
- {
- memtrace_debugfs_dir = debugfs_create_dir("memtrace",
- powerpc_debugfs_root);
-- if (!memtrace_debugfs_dir)
-- return -1;
-
- debugfs_create_file("enable", 0600, memtrace_debugfs_dir,
- NULL, &memtrace_init_fops);
---- a/arch/powerpc/platforms/powernv/opal-imc.c
-+++ b/arch/powerpc/platforms/powernv/opal-imc.c
-@@ -35,11 +35,10 @@ static int imc_mem_set(void *data, u64 v
- }
- DEFINE_DEBUGFS_ATTRIBUTE(fops_imc_x64, imc_mem_get, imc_mem_set, "0x%016llx\n");
-
--static struct dentry *imc_debugfs_create_x64(const char *name, umode_t mode,
-- struct dentry *parent, u64 *value)
-+static void imc_debugfs_create_x64(const char *name, umode_t mode,
-+ struct dentry *parent, u64 *value)
- {
-- return debugfs_create_file_unsafe(name, mode, parent,
-- value, &fops_imc_x64);
-+ debugfs_create_file_unsafe(name, mode, parent, value, &fops_imc_x64);
- }
-
- /*
-@@ -59,13 +58,6 @@ static void export_imc_mode_and_cmd(stru
-
- imc_debugfs_parent = debugfs_create_dir("imc", powerpc_debugfs_root);
-
-- /*
-- * Return here, either because 'imc' directory already exists,
-- * Or failed to create a new one.
-- */
-- if (!imc_debugfs_parent)
-- return;
--
- if (of_property_read_u32(node, "cb_offset", &cb_offset))
- cb_offset = IMC_CNTL_BLK_OFFSET;
-
-@@ -73,21 +65,15 @@ static void export_imc_mode_and_cmd(stru
- loc = (u64)(pmu_ptr->mem_info[chip].vbase) + cb_offset;
- imc_mode_addr = (u64 *)(loc + IMC_CNTL_BLK_MODE_OFFSET);
- sprintf(mode, "imc_mode_%d", nid);
-- if (!imc_debugfs_create_x64(mode, 0600, imc_debugfs_parent,
-- imc_mode_addr))
-- goto err;
-+ imc_debugfs_create_x64(mode, 0600, imc_debugfs_parent,
-+ imc_mode_addr);
-
- imc_cmd_addr = (u64 *)(loc + IMC_CNTL_BLK_CMD_OFFSET);
- sprintf(cmd, "imc_cmd_%d", nid);
-- if (!imc_debugfs_create_x64(cmd, 0600, imc_debugfs_parent,
-- imc_cmd_addr))
-- goto err;
-+ imc_debugfs_create_x64(cmd, 0600, imc_debugfs_parent,
-+ imc_cmd_addr);
- chip++;
- }
-- return;
--
--err:
-- debugfs_remove_recursive(imc_debugfs_parent);
- }
-
- /*
---- a/arch/powerpc/platforms/powernv/pci-ioda.c
-+++ b/arch/powerpc/platforms/powernv/pci-ioda.c
-@@ -3116,11 +3116,6 @@ static void pnv_pci_ioda_create_dbgfs(vo
-
- sprintf(name, "PCI%04x", hose->global_number);
- phb->dbgfs = debugfs_create_dir(name, powerpc_debugfs_root);
-- if (!phb->dbgfs) {
-- pr_warn("%s: Error on creating debugfs on PHB#%x\n",
-- __func__, hose->global_number);
-- continue;
-- }
-
- debugfs_create_file("dump_diag_regs", 0200, phb->dbgfs, hose,
- &pnv_pci_diag_data_fops);
---- a/arch/powerpc/platforms/powernv/vas-debug.c
-+++ b/arch/powerpc/platforms/powernv/vas-debug.c
-@@ -115,7 +115,7 @@ void vas_window_free_dbgdir(struct vas_w
-
- void vas_window_init_dbgdir(struct vas_window *window)
- {
-- struct dentry *f, *d;
-+ struct dentry *d;
-
- if (!window->vinst->dbgdir)
- return;
-@@ -127,28 +127,10 @@ void vas_window_init_dbgdir(struct vas_w
- snprintf(window->dbgname, 16, "w%d", window->winid);
-
- d = debugfs_create_dir(window->dbgname, window->vinst->dbgdir);
-- if (IS_ERR(d))
-- goto free_name;
--
- window->dbgdir = d;
-
-- f = debugfs_create_file("info", 0444, d, window, &info_fops);
-- if (IS_ERR(f))
-- goto remove_dir;
--
-- f = debugfs_create_file("hvwc", 0444, d, window, &hvwc_fops);
-- if (IS_ERR(f))
-- goto remove_dir;
--
-- return;
--
--remove_dir:
-- debugfs_remove_recursive(window->dbgdir);
-- window->dbgdir = NULL;
--
--free_name:
-- kfree(window->dbgname);
-- window->dbgname = NULL;
-+ debugfs_create_file("info", 0444, d, window, &info_fops);
-+ debugfs_create_file("hvwc", 0444, d, window, &hvwc_fops);
- }
-
- void vas_instance_init_dbgdir(struct vas_instance *vinst)
-@@ -156,8 +138,6 @@ void vas_instance_init_dbgdir(struct vas
- struct dentry *d;
-
- vas_init_dbgdir();
-- if (!vas_debugfs)
-- return;
-
- vinst->dbgname = kzalloc(16, GFP_KERNEL);
- if (!vinst->dbgname)
-@@ -166,16 +146,7 @@ void vas_instance_init_dbgdir(struct vas
- snprintf(vinst->dbgname, 16, "v%d", vinst->vas_id);
-
- d = debugfs_create_dir(vinst->dbgname, vas_debugfs);
-- if (IS_ERR(d))
-- goto free_name;
--
- vinst->dbgdir = d;
-- return;
--
--free_name:
-- kfree(vinst->dbgname);
-- vinst->dbgname = NULL;
-- vinst->dbgdir = NULL;
- }
-
- /*
-@@ -191,6 +162,4 @@ void vas_init_dbgdir(void)
-
- first_time = false;
- vas_debugfs = debugfs_create_dir("vas", NULL);
-- if (IS_ERR(vas_debugfs))
-- vas_debugfs = NULL;
- }
---- a/arch/powerpc/platforms/pseries/dtl.c
-+++ b/arch/powerpc/platforms/pseries/dtl.c
-@@ -19,7 +19,6 @@
-
- struct dtl {
- struct dtl_entry *buf;
-- struct dentry *file;
- int cpu;
- int buf_entries;
- u64 last_idx;
-@@ -320,22 +319,16 @@ static const struct file_operations dtl_
-
- static struct dentry *dtl_dir;
-
--static int dtl_setup_file(struct dtl *dtl)
-+static void dtl_setup_file(struct dtl *dtl)
- {
- char name[10];
-
- sprintf(name, "cpu-%d", dtl->cpu);
--
-- dtl->file = debugfs_create_file(name, 0400, dtl_dir, dtl, &dtl_fops);
-- if (!dtl->file)
-- return -ENOMEM;
--
-- return 0;
-+ debugfs_create_file(name, 0400, dtl_dir, dtl, &dtl_fops);
- }
-
- static int dtl_init(void)
- {
-- struct dentry *event_mask_file, *buf_entries_file;
- int rc, i;
-
- if (!firmware_has_feature(FW_FEATURE_SPLPAR))
-@@ -345,21 +338,9 @@ static int dtl_init(void)
-
- rc = -ENOMEM;
- dtl_dir = debugfs_create_dir("dtl", powerpc_debugfs_root);
-- if (!dtl_dir) {
-- printk(KERN_WARNING "%s: can't create dtl root dir\n",
-- __func__);
-- goto err;
-- }
-
-- event_mask_file = debugfs_create_x8("dtl_event_mask", 0600,
-- dtl_dir, &dtl_event_mask);
-- buf_entries_file = debugfs_create_u32("dtl_buf_entries", 0400,
-- dtl_dir, &dtl_buf_entries);
--
-- if (!event_mask_file || !buf_entries_file) {
-- printk(KERN_WARNING "%s: can't create dtl files\n", __func__);
-- goto err_remove_dir;
-- }
-+ debugfs_create_x8("dtl_event_mask", 0600, dtl_dir, &dtl_event_mask);
-+ debugfs_create_u32("dtl_buf_entries", 0400, dtl_dir, &dtl_buf_entries);
-
- /* set up the per-cpu log structures */
- for_each_possible_cpu(i) {
-@@ -367,16 +348,9 @@ static int dtl_init(void)
- spin_lock_init(&dtl->lock);
- dtl->cpu = i;
-
-- rc = dtl_setup_file(dtl);
-- if (rc)
-- goto err_remove_dir;
-+ dtl_setup_file(dtl);
- }
-
- return 0;
--
--err_remove_dir:
-- debugfs_remove_recursive(dtl_dir);
--err:
-- return rc;
- }
- machine_arch_initcall(pseries, dtl_init);
---- a/arch/powerpc/platforms/pseries/hvCall_inst.c
-+++ b/arch/powerpc/platforms/pseries/hvCall_inst.c
-@@ -129,7 +129,6 @@ static void probe_hcall_exit(void *ignor
- static int __init hcall_inst_init(void)
- {
- struct dentry *hcall_root;
-- struct dentry *hcall_file;
- char cpu_name_buf[CPU_NAME_BUF_SIZE];
- int cpu;
-
-@@ -145,17 +144,12 @@ static int __init hcall_inst_init(void)
- }
-
- hcall_root = debugfs_create_dir(HCALL_ROOT_DIR, NULL);
-- if (!hcall_root)
-- return -ENOMEM;
-
- for_each_possible_cpu(cpu) {
- snprintf(cpu_name_buf, CPU_NAME_BUF_SIZE, "cpu%d", cpu);
-- hcall_file = debugfs_create_file(cpu_name_buf, 0444,
-- hcall_root,
-- per_cpu(hcall_stats, cpu),
-- &hcall_inst_seq_fops);
-- if (!hcall_file)
-- return -ENOMEM;
-+ debugfs_create_file(cpu_name_buf, 0444, hcall_root,
-+ per_cpu(hcall_stats, cpu),
-+ &hcall_inst_seq_fops);
- }
-
- return 0;
---- a/arch/powerpc/sysdev/scom.c
-+++ b/arch/powerpc/sysdev/scom.c
-@@ -185,12 +185,6 @@ static int scom_debug_init_one(struct de
- ent->path.size = strlen((char *)ent->path.data);
-
- dir = debugfs_create_dir(ent->name, root);
-- if (!dir) {
-- of_node_put(dn);
-- kfree(ent->path.data);
-- kfree(ent);
-- return -1;
-- }
-
- debugfs_create_blob("devspec", 0400, dir, &ent->path);
- debugfs_create_file("access", 0600, dir, ent, &scom_debug_fops);
-@@ -205,8 +199,6 @@ static int scom_debug_init(void)
- int i, rc;
-
- root = debugfs_create_dir("scom", powerpc_debugfs_root);
-- if (!root)
-- return -1;
-
- i = rc = 0;
- for_each_node_with_property(dn, "scom-controller") {
diff --git a/series b/series
index 48ed8720300f83..6702faa6dedb2d 100644
--- a/series
+++ b/series
@@ -1,6 +1,6 @@
#
-maintainers-add-entry-for-licenses-and-spdx-stuff.patch
-cp210x.patch
+dynamic_debug-allow-to-work-if-debugfs-is-disabled.patch
+lib-raid6-fix-awk-build-warnings.patch
spdxcheck-print-out-files-without-any-spdx-lines.patch
0001-tty-n_r3964-locking-fixups.patch
@@ -18,7 +18,6 @@ spdxcheck-print-out-files-without-any-spdx-lines.patch
0013-tty-n_r3964-properly-protect-sig_flags-of-client-str.patch
0014-tty-n_r3964-properly-reference-count-pids.patch
0015-tty-n_r3964-add-reference-counting-to-the-client-str.patch
-p04
usb_DEVICE_ATTR.patch
diff --git a/usb_DEVICE_ATTR.patch b/usb_DEVICE_ATTR.patch
index 216419ce0a59ee..87fb4c20bba97b 100644
--- a/usb_DEVICE_ATTR.patch
+++ b/usb_DEVICE_ATTR.patch
@@ -12,49 +12,13 @@ future.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
+ drivers/staging/wusbcore/cbaf.c | 82 +++++++++++----------------
drivers/usb/gadget/function/f_mass_storage.c | 5 -
drivers/usb/phy/phy-fsl-usb.c | 6 -
- drivers/usb/wusbcore/cbaf.c | 82 +++++++++++----------------
3 files changed, 41 insertions(+), 52 deletions(-)
---- a/drivers/usb/gadget/function/f_mass_storage.c
-+++ b/drivers/usb/gadget/function/f_mass_storage.c
-@@ -2544,9 +2544,8 @@ static ssize_t file_store(struct device
- }
-
- static DEVICE_ATTR_RW(nofua);
--/* mode wil be set in fsg_lun_attr_is_visible() */
--static DEVICE_ATTR(ro, 0, ro_show, ro_store);
--static DEVICE_ATTR(file, 0, file_show, file_store);
-+static DEVICE_ATTR_RW(ro);
-+static DEVICE_ATTR_RW(file);
-
- /****************************** FSG COMMON ******************************/
-
---- a/drivers/usb/phy/phy-fsl-usb.c
-+++ b/drivers/usb/phy/phy-fsl-usb.c
-@@ -960,8 +960,8 @@ int usb_otg_start(struct platform_device
- /*
- * state file in sysfs
- */
--static ssize_t show_fsl_usb2_otg_state(struct device *dev,
-- struct device_attribute *attr, char *buf)
-+static ssize_t fsl_usb2_otg_state_show(struct device *dev,
-+ struct device_attribute *attr, char *buf)
- {
- struct otg_fsm *fsm = &fsl_otg_dev->fsm;
- char *next = buf;
-@@ -1041,7 +1041,7 @@ static ssize_t show_fsl_usb2_otg_state(s
- return PAGE_SIZE - size;
- }
-
--static DEVICE_ATTR(fsl_usb2_otg_state, S_IRUGO, show_fsl_usb2_otg_state, NULL);
-+static DEVICE_ATTR_RO(fsl_usb2_otg_state);
-
-
- /* Char driver interface to control some OTG input */
---- a/drivers/usb/wusbcore/cbaf.c
-+++ b/drivers/usb/wusbcore/cbaf.c
+--- a/drivers/staging/wusbcore/cbaf.c
++++ b/drivers/staging/wusbcore/cbaf.c
@@ -296,9 +296,8 @@ static int cbaf_cdid_get(struct cbaf *cb
return 0;
}
@@ -237,3 +201,39 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
static struct attribute *cbaf_dev_attrs[] = {
&dev_attr_wusb_host_name.attr,
+--- a/drivers/usb/gadget/function/f_mass_storage.c
++++ b/drivers/usb/gadget/function/f_mass_storage.c
+@@ -2553,9 +2553,8 @@ static ssize_t file_store(struct device
+ }
+
+ static DEVICE_ATTR_RW(nofua);
+-/* mode wil be set in fsg_lun_attr_is_visible() */
+-static DEVICE_ATTR(ro, 0, ro_show, ro_store);
+-static DEVICE_ATTR(file, 0, file_show, file_store);
++static DEVICE_ATTR_RW(ro);
++static DEVICE_ATTR_RW(file);
+
+ /****************************** FSG COMMON ******************************/
+
+--- a/drivers/usb/phy/phy-fsl-usb.c
++++ b/drivers/usb/phy/phy-fsl-usb.c
+@@ -960,8 +960,8 @@ int usb_otg_start(struct platform_device
+ /*
+ * state file in sysfs
+ */
+-static ssize_t show_fsl_usb2_otg_state(struct device *dev,
+- struct device_attribute *attr, char *buf)
++static ssize_t fsl_usb2_otg_state_show(struct device *dev,
++ struct device_attribute *attr, char *buf)
+ {
+ struct otg_fsm *fsm = &fsl_otg_dev->fsm;
+ char *next = buf;
+@@ -1041,7 +1041,7 @@ static ssize_t show_fsl_usb2_otg_state(s
+ return PAGE_SIZE - size;
+ }
+
+-static DEVICE_ATTR(fsl_usb2_otg_state, S_IRUGO, show_fsl_usb2_otg_state, NULL);
++static DEVICE_ATTR_RO(fsl_usb2_otg_state);
+
+ static struct attribute *fsl_otg_attrs[] = {
+ &dev_attr_fsl_usb2_otg_state.attr,