- pcie-check-and-return-bus_register-errors.patch removed from -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled

     PCIE: check and return bus_register errors

has been removed from the -mm tree.  Its filename is

     pcie-check-and-return-bus_register-errors.patch

This patch was dropped because it was merged into mainline or a subsystem tree

------------------------------------------------------
Subject: PCIE: check and return bus_register errors
From: Randy Dunlap <rdunlap@xxxxxxxxxxxx>

Have pcie_port_bus_register() notice and return errors.  Mark it
__must_check so that its caller(s) must check its return value.

Signed-off-by: Randy Dunlap <rdunlap@xxxxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxx>
---

 drivers/pci/pcie/portdrv.h      |    2 +-
 drivers/pci/pcie/portdrv_core.c |    5 +++--
 drivers/pci/pcie/portdrv_pci.c  |    9 +++++++--
 3 files changed, 11 insertions(+), 5 deletions(-)

diff -puN drivers/pci/pcie/portdrv.h~pcie-check-and-return-bus_register-errors drivers/pci/pcie/portdrv.h
--- a/drivers/pci/pcie/portdrv.h~pcie-check-and-return-bus_register-errors
+++ a/drivers/pci/pcie/portdrv.h
@@ -39,7 +39,7 @@ extern int pcie_port_device_suspend(stru
 extern int pcie_port_device_resume(struct pci_dev *dev);
 #endif
 extern void pcie_port_device_remove(struct pci_dev *dev);
-extern void pcie_port_bus_register(void);
+extern int pcie_port_bus_register(void);
 extern void pcie_port_bus_unregister(void);
 
 #endif /* _PORTDRV_H_ */
diff -puN drivers/pci/pcie/portdrv_core.c~pcie-check-and-return-bus_register-errors drivers/pci/pcie/portdrv_core.c
--- a/drivers/pci/pcie/portdrv_core.c~pcie-check-and-return-bus_register-errors
+++ a/drivers/pci/pcie/portdrv_core.c
@@ -6,6 +6,7 @@
  * Copyright (C) Tom Long Nguyen (tom.l.nguyen@xxxxxxxxx)
  */
 
+#include <linux/compiler.h>
 #include <linux/module.h>
 #include <linux/pci.h>
 #include <linux/kernel.h>
@@ -402,9 +403,9 @@ void pcie_port_device_remove(struct pci_
 		pci_disable_msi(dev);
 }
 
-void pcie_port_bus_register(void)
+int __must_check pcie_port_bus_register(void)
 {
-	bus_register(&pcie_port_bus_type);
+	return bus_register(&pcie_port_bus_type);
 }
 
 void pcie_port_bus_unregister(void)
diff -puN drivers/pci/pcie/portdrv_pci.c~pcie-check-and-return-bus_register-errors drivers/pci/pcie/portdrv_pci.c
--- a/drivers/pci/pcie/portdrv_pci.c~pcie-check-and-return-bus_register-errors
+++ a/drivers/pci/pcie/portdrv_pci.c
@@ -282,12 +282,17 @@ static struct pci_driver pcie_portdrv = 
 
 static int __init pcie_portdrv_init(void)
 {
-	int retval = 0;
+	int retval;
 
-	pcie_port_bus_register();
+	retval = pcie_port_bus_register();
+	if (retval) {
+		printk(KERN_WARNING "PCIE: bus_register error: %d\n", retval);
+		goto out;
+	}
 	retval = pci_register_driver(&pcie_portdrv);
 	if (retval)
 		pcie_port_bus_unregister();
+ out:
 	return retval;
 }
 
_

Patches currently in -mm which might be from rdunlap@xxxxxxxxxxxx are

acpi-bus-add-missing-newline.patch
acpi-handle-firmware_register-init-errors.patch
acpi-scan-handle-kset-kobject-errors.patch
acpi-fix-printk-format-warnings.patch
drivers-base-check-errors.patch
sysfs-add-proper-sysfs_init-prototype.patch
bttv-must_check-fixes.patch
git-lxdialog.patch
mtd-printk-format-warning.patch
pcmcia-ds-must_check-fixes.patch
libsas-externs-not-needed.patch
pcie-check-and-return-bus_register-errors-fix.patch
git-scsi-misc.patch
aic7-cleanup-module_parm_desc-strings.patch
dc395x-fix-printk-format-warning.patch
scsi-target-printk-format-warnings.patch
add-kerneldocs-for-some-functions-in-mm-memoryc.patch
tiacx-sparse-cleanups.patch
consistently-use-max_errno-in-__syscall_return.patch
consistently-use-max_errno-in-__syscall_return-fix.patch
eisa-bus-modalias-attributes-support-1.patch
kernel-params-must_check-fixes.patch
blockdevc-check-errors.patch
block-handle-subsystem_register-init-errors.patch
fs-namespace-handle-init-registration-errors.patch
kernel-doc-for-relay-interface.patch
kernel-doc-move-filesystems-together.patch
include-documentation-for-functions-in-drivers-base-classc.patch
fix-parameter-names-in-drivers-base-classc.patch
fix-kerneldoc-comments-in-kernel-timerc-fix.patch
fs-cache-cachefiles-a-cache-that-backs-onto-a-mounted-filesystem-cachefiles-printk-format-warning.patch
ecryptfs-fix-printk-format-warnings.patch
ide-core-must_check-fixes.patch

-
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux