public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <gregkh@suse.de>
To: linux-kernel@vger.kernel.org
Cc: linas@austin.ibm.com
Subject: [PATCH] powerpc/PCI hotplug: cleanup: add prefix
Date: Fri, 20 Jan 2006 11:04:39 -0800	[thread overview]
Message-ID: <1137783879512@kroah.com> (raw)
In-Reply-To: <1137783879143@kroah.com>

[PATCH] powerpc/PCI hotplug: cleanup: add prefix

Minor cleanup. Add the prefix rpaphp_* to several generic-sounding routines.
Remove rpaphp_remove_slot(), which is a one-liner.

Signed-off-by: Linas Vepstas <linas@austin.ibm.com>
Acked-by: John Rose <johnrose@austin.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
commit 170aa7441c7f262b09b85ab21948bd95f3d80887
tree a66122a1f1da2f7dfb940eddc6815aea42029e2a
parent 259d8eac4d548e0e0fdbe25227e2ead29e73feb9
author linas@austin.ibm.com <linas@austin.ibm.com> Thu, 12 Jan 2006 18:31:01 -0600
committer Greg Kroah-Hartman <gregkh@suse.de> Fri, 20 Jan 2006 10:29:35 -0800

 drivers/pci/hotplug/rpadlpar_core.c |    4 ++--
 drivers/pci/hotplug/rpaphp.h        |    6 +++---
 drivers/pci/hotplug/rpaphp_core.c   |   14 +++++---------
 drivers/pci/hotplug/rpaphp_pci.c    |    4 ++--
 drivers/pci/hotplug/rpaphp_slot.c   |   16 ++++++++--------
 5 files changed, 20 insertions(+), 24 deletions(-)

diff --git a/drivers/pci/hotplug/rpadlpar_core.c b/drivers/pci/hotplug/rpadlpar_core.c
index 15e853e..d3aa9df 100644
--- a/drivers/pci/hotplug/rpadlpar_core.c
+++ b/drivers/pci/hotplug/rpadlpar_core.c
@@ -227,7 +227,7 @@ static int dlpar_remove_phb(char *drc_na
 	slot = find_slot(dn);
 	if (slot) {
 		/* Remove hotplug slot */
-		if (rpaphp_remove_slot(slot)) {
+		if (rpaphp_deregister_slot(slot)) {
 			printk(KERN_ERR
 				"%s: unable to remove hotplug slot %s\n",
 				__FUNCTION__, drc_name);
@@ -373,7 +373,7 @@ int dlpar_remove_pci_slot(char *drc_name
 	slot = find_slot(dn);
 	if (slot) {
 		/* Remove hotplug slot */
-		if (rpaphp_remove_slot(slot)) {
+		if (rpaphp_deregister_slot(slot)) {
 			printk(KERN_ERR
 				"%s: unable to remove hotplug slot %s\n",
 				__FUNCTION__, drc_name);
diff --git a/drivers/pci/hotplug/rpaphp.h b/drivers/pci/hotplug/rpaphp.h
index 095c9aa..310b618 100644
--- a/drivers/pci/hotplug/rpaphp.h
+++ b/drivers/pci/hotplug/rpaphp.h
@@ -89,7 +89,7 @@ extern int num_slots;
 
 /* rpaphp_pci.c */
 extern int rpaphp_enable_pci_slot(struct slot *slot);
-extern int register_pci_slot(struct slot *slot);
+extern int rpaphp_register_pci_slot(struct slot *slot);
 extern int rpaphp_get_pci_adapter_status(struct slot *slot, int is_init, u8 * value);
 extern int rpaphp_get_sensor_state(struct slot *slot, int *state);
 
@@ -102,8 +102,8 @@ extern int rpaphp_get_drc_props(struct d
 /* rpaphp_slot.c */
 extern void dealloc_slot_struct(struct slot *slot);
 extern struct slot *alloc_slot_struct(struct device_node *dn, int drc_index, char *drc_name, int power_domain);
-extern int register_slot(struct slot *slot);
-extern int deregister_slot(struct slot *slot);
+extern int rpaphp_register_slot(struct slot *slot);
+extern int rpaphp_deregister_slot(struct slot *slot);
 extern int rpaphp_get_power_status(struct slot *slot, u8 * value);
 extern int rpaphp_set_attention_status(struct slot *slot, u8 status);
 	
diff --git a/drivers/pci/hotplug/rpaphp_core.c b/drivers/pci/hotplug/rpaphp_core.c
index 341fdd5..c0e521c 100644
--- a/drivers/pci/hotplug/rpaphp_core.c
+++ b/drivers/pci/hotplug/rpaphp_core.c
@@ -196,11 +196,6 @@ static int get_max_bus_speed(struct hotp
 	return 0;
 }
 
-int rpaphp_remove_slot(struct slot *slot)
-{
-	return deregister_slot(slot);
-}
-
 static int get_children_props(struct device_node *dn, int **drc_indexes,
 		int **drc_names, int **drc_types, int **drc_power_domains)
 {
@@ -307,13 +302,15 @@ static int is_php_dn(struct device_node 
 	return 0;
 }
 
-/****************************************************************
+/**
+ * rpaphp_add_slot -- add hotplug or dlpar slot
+ *
  *	rpaphp not only registers PCI hotplug slots(HOTPLUG), 
  *	but also logical DR slots(EMBEDDED).
  *	HOTPLUG slot: An adapter can be physically added/removed. 
  *	EMBEDDED slot: An adapter can be logically removed/added
  *		  from/to a partition with the slot.
- ***************************************************************/
+ */
 int rpaphp_add_slot(struct device_node *dn)
 {
 	struct slot *slot;
@@ -344,7 +341,7 @@ int rpaphp_add_slot(struct device_node *
 			dbg("Found drc-index:0x%x drc-name:%s drc-type:%s\n",
 					indexes[i + 1], name, type);
 
-			retval = register_pci_slot(slot);
+			retval = rpaphp_register_pci_slot(slot);
 		}
 	}
 exit:
@@ -462,6 +459,5 @@ module_init(rpaphp_init);
 module_exit(rpaphp_exit);
 
 EXPORT_SYMBOL_GPL(rpaphp_add_slot);
-EXPORT_SYMBOL_GPL(rpaphp_remove_slot);
 EXPORT_SYMBOL_GPL(rpaphp_slot_head);
 EXPORT_SYMBOL_GPL(rpaphp_get_drc_props);
diff --git a/drivers/pci/hotplug/rpaphp_pci.c b/drivers/pci/hotplug/rpaphp_pci.c
index d1297d0..6f6cbed 100644
--- a/drivers/pci/hotplug/rpaphp_pci.c
+++ b/drivers/pci/hotplug/rpaphp_pci.c
@@ -199,7 +199,7 @@ exit_rc:
 	return -EINVAL;
 }
 
-int register_pci_slot(struct slot *slot)
+int rpaphp_register_pci_slot(struct slot *slot)
 {
 	int rc = -EINVAL;
 
@@ -207,7 +207,7 @@ int register_pci_slot(struct slot *slot)
 		goto exit_rc;
 	if (setup_pci_slot(slot))
 		goto exit_rc;
-	rc = register_slot(slot);
+	rc = rpaphp_register_slot(slot);
 exit_rc:
 	return rc;
 }
diff --git a/drivers/pci/hotplug/rpaphp_slot.c b/drivers/pci/hotplug/rpaphp_slot.c
index daa89ae..04cc1e7 100644
--- a/drivers/pci/hotplug/rpaphp_slot.c
+++ b/drivers/pci/hotplug/rpaphp_slot.c
@@ -35,16 +35,16 @@
 
 static ssize_t location_read_file (struct hotplug_slot *php_slot, char *buf)
 {
-        char *value;
-        int retval = -ENOENT;
+	char *value;
+	int retval = -ENOENT;
 	struct slot *slot = (struct slot *)php_slot->private;
 
 	if (!slot)
 		return retval;
 
-        value = slot->location;
-        retval = sprintf (buf, "%s\n", value);
-        return retval;
+	value = slot->location;
+	retval = sprintf (buf, "%s\n", value);
+	return retval;
 }
 
 static struct hotplug_slot_attribute hotplug_slot_attr_location = {
@@ -137,7 +137,7 @@ static int is_registered(struct slot *sl
 	return 0;
 }
 
-int deregister_slot(struct slot *slot)
+int rpaphp_deregister_slot(struct slot *slot)
 {
 	int retval = 0;
 	struct hotplug_slot *php_slot = slot->hotplug_slot;
@@ -160,7 +160,7 @@ int deregister_slot(struct slot *slot)
 	return retval;
 }
 
-int register_slot(struct slot *slot)
+int rpaphp_register_slot(struct slot *slot)
 {
 	int retval;
 
@@ -169,7 +169,7 @@ int register_slot(struct slot *slot)
 		slot->power_domain, slot->type);
 	/* should not try to register the same slot twice */
 	if (is_registered(slot)) { /* should't be here */
-		err("register_slot: slot[%s] is already registered\n", slot->name);
+		err("rpaphp_register_slot: slot[%s] is already registered\n", slot->name);
 		rpaphp_release_slot(slot->hotplug_slot);
 		return -EAGAIN;
 	}	


  reply	other threads:[~2006-01-20 19:13 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-01-20 19:04 [GIT PATCH] PCI patches for 2.6.16-rc1 Greg KH
2006-01-20 19:04 ` [PATCH] PCI: irq and pci_ids: patch for Intel ICH8 Greg KH
2006-01-20 19:04   ` [PATCH] PCI: schedule PCI_LEGACY_PROC for removal Greg KH
2006-01-20 19:04     ` [PATCH] pci: Schedule removal of pci_module_init Greg KH
2006-01-20 19:04       ` [PATCH] PCI: drivers/pci/pci.c: #if 0 pci_find_ext_capability() Greg KH
2006-01-20 19:04         ` [PATCH] PCI Hotplug: PCI panic on dlpar add (add pci slot to running partition) Greg KH
2006-01-20 19:04           ` [PATCH] PCI Hotplug: fix up coding style issues Greg KH
2006-01-20 19:04             ` [PATCH] PCI: pci_ids: remove duplicates gathered during merge period Greg KH
2006-01-20 19:04               ` [PATCH] PCI: make it easier to see that set_msi_affinity() is used Greg KH
2006-01-20 19:04                 ` [PATCH] PCI Hotplug: shpchp: AMD POGO errata fix Greg KH
2006-01-20 19:04                   ` [PATCH] PCI: restore 2 missing pci ids Greg KH
2006-01-20 19:04                     ` [PATCH] PCI Hotplug/powerpc: module build break Greg KH
2006-01-20 19:04                       ` [PATCH] PCI Hotplug: fix up Kconfig help text Greg KH
2006-01-20 19:04                         ` Greg KH [this message]
2006-01-20 19:04                           ` [PATCH] powerpc/PCI hotplug: remove rpaphp_fixup_new_pci_devices() Greg KH
2006-01-20 19:04                             ` [PATCH] powerpc/PCI hotplug: merge rpaphp_enable_pci_slot() Greg KH
2006-01-20 19:04                               ` [PATCH] powerpc/PCI hotplug: merge config_pci_adapter Greg KH
2006-01-20 19:04                                 ` [PATCH] powerpc/PCI hotplug: minor cleanup forward decls Greg KH
2006-01-20 19:04                                   ` [PATCH] powerpc/PCI hotplug: remove rpaphp_find_bus() Greg KH
2006-01-20 19:04                                     ` [PATCH] powerpc/PCI hotplug: remove remove_bus_device() Greg KH
2006-01-20 19:04                                       ` [PATCH] powerpc/PCI hotplug: de-convolute rpaphp_unconfig_pci_adap Greg KH
2006-01-20 19:04                                         ` [PATCH] powerpc/PCI hotplug: shuffle error checking to better location Greg KH
2006-01-20 19:04                                           ` [PATCH] PCI: cyblafb: remove pci_module_init() return, really Greg KH
2006-01-20 19:23 ` [GIT PATCH] PCI patches for 2.6.16-rc1 Greg KH

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1137783879512@kroah.com \
    --to=gregkh@suse.de \
    --cc=greg@kroah.com \
    --cc=linas@austin.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox