kernel/kernel-std/debian/patches/0022-driver-core-auxiliary-bus-make-remove-function-retur.patch
Li Zhou 998d337c2b Debian: porting kernel commits from centos
To keep kernel debian stx aligned with centos stx, porting below commits
from centos stx to debian stx:
(1)patches related
   ef3c9a4 kernel: Add auxiliary bus support
   19ca0df kernel: Backport IRQ affinity patches
   a10b746 workqueue affinity: Remove unused variable
   8fde1a8 kthread_cpus: Avoid large stack allocation
   bb6ec66 scsi: Make the disk detection order more consistent
   bf940a8 rcu: Avoid RCU-related unexpected reboot
   cfe452a workqueue: Affine rescuer threads and unbound wqs
(2)config related
   6fe8d60 kernel: Disable NVMe multi-path kconfig option
   c9cdb90 Fixup recent kconfig cleanup
   8551799 Resolve v5.10 kernel configuration file differences
(3)kernel-modules related
   7ded004 kernel-modules: IRQ affinity hint fix-ups

Please pay attention to:
[ef3c9a4 kernel: Add auxiliary bus support]
which is not only related with kernel patches but also related with
kernel-modules.
It removes the auxiliary.ko from the oot ice package because auxiliary
bus device driver is built into kernel. But the detecting of builtin
auxiliary driver in intel-iavf/intel-ice oot driver will fail because
debian has 2 linux header packages. So extra patches are added for
intel-iavf and intel-ice to pass linux common header to check_aux_bus
to make builtin auxiliary driver detected. At the same time the patch
[check_aux_bus: Look for kernel headers in the right location]
for the oot drivers is removed because it isn't needed any more if
the right header path is passed.

Test Plan:
 - PASS: Build kernel-std/kernel-rt.
 - PASS: Build the 7 oot kernel modules for kernel-std/kernel-rt.
 - PASS: Build the iso for kernel-std and modules and boot up on qemu.
 - PASS: Build the test iso for kernel-rt and modules and boot up
         on qemu.

Story: 2009221
Task: 44989
Signed-off-by: Li Zhou <li.zhou@windriver.com>
Change-Id: Ic7cddc068eab1516800e90bfe431d042274f86d3
2022-04-14 21:33:05 -04:00

80 lines
3.3 KiB
Diff

From 1eef241f79083237468a534e739ae053f2b7cfd5 Mon Sep 17 00:00:00 2001
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Date: Fri, 4 Dec 2020 12:44:07 +0100
Subject: [PATCH] driver core: auxiliary bus: make remove function return void
There's an effort to move the remove() callback in the driver core to
not return an int, as nothing can be done if this function fails. To
make that effort easier, make the aux bus remove function void to start
with so that no users have to be changed sometime in the future.
Cc: Dan Williams <dan.j.williams@intel.com>
Cc: Dave Ertman <david.m.ertman@intel.com>
Cc: Fred Oh <fred.oh@linux.intel.com>
Cc: Kiran Patil <kiran.patil@intel.com>
Cc: Leon Romanovsky <leonro@nvidia.com>
Cc: Martin Habets <mhabets@solarflare.com>
Cc: Parav Pandit <parav@mellanox.com>
Cc: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Cc: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Cc: Shiraz Saleem <shiraz.saleem@intel.com>
Link: https://lore.kernel.org/r/X8ohB1ks1NK7kPop@kroah.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 8142a46c50d2dd8160c42284e1044eed3bec0d18)
Signed-off-by: M. Vefa Bicakci <vefa.bicakci@windriver.com>
---
Documentation/driver-api/auxiliary_bus.rst | 2 +-
drivers/base/auxiliary.c | 5 ++---
include/linux/auxiliary_bus.h | 2 +-
3 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/Documentation/driver-api/auxiliary_bus.rst b/Documentation/driver-api/auxiliary_bus.rst
index 5dd7804631ef..2312506b0674 100644
--- a/Documentation/driver-api/auxiliary_bus.rst
+++ b/Documentation/driver-api/auxiliary_bus.rst
@@ -150,7 +150,7 @@ and shutdown notifications using the standard conventions.
struct auxiliary_driver {
int (*probe)(struct auxiliary_device *,
const struct auxiliary_device_id *id);
- int (*remove)(struct auxiliary_device *);
+ void (*remove)(struct auxiliary_device *);
void (*shutdown)(struct auxiliary_device *);
int (*suspend)(struct auxiliary_device *, pm_message_t);
int (*resume)(struct auxiliary_device *);
diff --git a/drivers/base/auxiliary.c b/drivers/base/auxiliary.c
index eca36d6284d0..c44e85802b43 100644
--- a/drivers/base/auxiliary.c
+++ b/drivers/base/auxiliary.c
@@ -82,13 +82,12 @@ static int auxiliary_bus_remove(struct device *dev)
{
struct auxiliary_driver *auxdrv = to_auxiliary_drv(dev->driver);
struct auxiliary_device *auxdev = to_auxiliary_dev(dev);
- int ret = 0;
if (auxdrv->remove)
- ret = auxdrv->remove(auxdev);
+ auxdrv->remove(auxdev);
dev_pm_domain_detach(dev, true);
- return ret;
+ return 0;
}
static void auxiliary_bus_shutdown(struct device *dev)
diff --git a/include/linux/auxiliary_bus.h b/include/linux/auxiliary_bus.h
index 3580743d0e8d..d67b17606210 100644
--- a/include/linux/auxiliary_bus.h
+++ b/include/linux/auxiliary_bus.h
@@ -19,7 +19,7 @@ struct auxiliary_device {
struct auxiliary_driver {
int (*probe)(struct auxiliary_device *auxdev, const struct auxiliary_device_id *id);
- int (*remove)(struct auxiliary_device *auxdev);
+ void (*remove)(struct auxiliary_device *auxdev);
void (*shutdown)(struct auxiliary_device *auxdev);
int (*suspend)(struct auxiliary_device *auxdev, pm_message_t state);
int (*resume)(struct auxiliary_device *auxdev);
--
2.29.2