From 63d182abd71cb47cee4adb8dd2afd71d987794d5 Mon Sep 17 00:00:00 2001 From: Rahul Krishnan Date: Sat, 24 Dec 2016 15:08:00 +0530 Subject: PCI: rpadlpar: Remove unnecessary return statement Remove unnecessary return statement using spatch tool. Signed-off-by: Rahul Krishnan Signed-off-by: Bjorn Helgaas Reviewed-by: Tyrel Datwyler --- drivers/pci/hotplug/rpadlpar_core.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'drivers/pci/hotplug') diff --git a/drivers/pci/hotplug/rpadlpar_core.c b/drivers/pci/hotplug/rpadlpar_core.c index c614ff7c3bc3..3f93a4e79595 100644 --- a/drivers/pci/hotplug/rpadlpar_core.c +++ b/drivers/pci/hotplug/rpadlpar_core.c @@ -463,7 +463,6 @@ static inline int is_dlpar_capable(void) int __init rpadlpar_io_init(void) { - int rc = 0; if (!is_dlpar_capable()) { printk(KERN_WARNING "%s: partition not DLPAR capable\n", @@ -471,8 +470,7 @@ int __init rpadlpar_io_init(void) return -EPERM; } - rc = dlpar_sysfs_init(); - return rc; + return dlpar_sysfs_init(); } void rpadlpar_io_exit(void) -- cgit v1.2.3 From 1acf8bca9cdb2443a8707ff0afc3aadbfb5669f4 Mon Sep 17 00:00:00 2001 From: Bhumika Goyal Date: Mon, 26 Dec 2016 21:06:35 +0530 Subject: PCI: acpiphp_ibm: Make ibm_apci_table_attr __ro_after_init ibm_apci_table_attr is not modified after being initialized by ibm_acpiphp_init(). It is passed as an argument to the functions sysfs_{remove/create}_bin_file(), but both the arguments are const. Add __ro_after_init to its declaration. [bhelgaas: changelog] Signed-off-by: Bhumika Goyal Signed-off-by: Bjorn Helgaas Reviewed-by: Kees Cook --- drivers/pci/hotplug/acpiphp_ibm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/pci/hotplug') diff --git a/drivers/pci/hotplug/acpiphp_ibm.c b/drivers/pci/hotplug/acpiphp_ibm.c index 68d105aaf4e2..984c7e8cec5a 100644 --- a/drivers/pci/hotplug/acpiphp_ibm.c +++ b/drivers/pci/hotplug/acpiphp_ibm.c @@ -107,7 +107,7 @@ static void __exit ibm_acpiphp_exit(void); static acpi_handle ibm_acpi_handle; static struct notification ibm_note; -static struct bin_attribute ibm_apci_table_attr = { +static struct bin_attribute ibm_apci_table_attr __ro_after_init = { .attr = { .name = "apci_table", .mode = S_IRUGO, -- cgit v1.2.3