From: Greg KH <greg@kroah.com>
To: linux-kernel@vger.kernel.org, pcihpd-discuss@lists.sourceforge.net
Subject: Re: [PATCH] PCI Hotplug changes for 2.5.59
Date: Wed, 5 Feb 2003 20:08 -0800 [thread overview]
Message-ID: <10445044862346@kroah.com> (raw)
In-Reply-To: <10445044851308@kroah.com>
ChangeSet 1.947.23.5, 2003/02/05 17:17:39+11:00, greg@kroah.com
[PATCH] PCI Hotplug: change pci_hp_change_slot_info() to take a hotplug_slot and not a string.
diff -Nru a/drivers/hotplug/cpci_hotplug_core.c b/drivers/hotplug/cpci_hotplug_core.c
--- a/drivers/hotplug/cpci_hotplug_core.c Thu Feb 6 14:52:08 2003
+++ b/drivers/hotplug/cpci_hotplug_core.c Thu Feb 6 14:52:08 2003
@@ -130,7 +130,7 @@
return -EINVAL;
memcpy(&info, hotplug_slot->info, sizeof(struct hotplug_slot_info));
info.latch_status = value;
- return pci_hp_change_slot_info(hotplug_slot->name, &info);
+ return pci_hp_change_slot_info(hotplug_slot, &info);
}
static int
@@ -142,7 +142,7 @@
return -EINVAL;
memcpy(&info, hotplug_slot->info, sizeof(struct hotplug_slot_info));
info.adapter_status = value;
- return pci_hp_change_slot_info(hotplug_slot->name, &info);
+ return pci_hp_change_slot_info(hotplug_slot, &info);
}
static int
diff -Nru a/drivers/hotplug/cpqphp_ctrl.c b/drivers/hotplug/cpqphp_ctrl.c
--- a/drivers/hotplug/cpqphp_ctrl.c Thu Feb 6 14:52:08 2003
+++ b/drivers/hotplug/cpqphp_ctrl.c Thu Feb 6 14:52:08 2003
@@ -1767,19 +1767,17 @@
static int update_slot_info (struct controller *ctrl, struct slot *slot)
{
struct hotplug_slot_info *info;
- char buffer[SLOT_NAME_SIZE];
int result;
info = kmalloc (sizeof (struct hotplug_slot_info), GFP_KERNEL);
if (!info)
return -ENOMEM;
- make_slot_name (&buffer[0], SLOT_NAME_SIZE, slot);
info->power_status = get_slot_enabled(ctrl, slot);
info->attention_status = cpq_get_attention_status(ctrl, slot);
info->latch_status = cpq_get_latch_status(ctrl, slot);
info->adapter_status = get_presence_status(ctrl, slot);
- result = pci_hp_change_slot_info(buffer, info);
+ result = pci_hp_change_slot_info(slot->hotplug_slot, info);
kfree (info);
return result;
}
diff -Nru a/drivers/hotplug/ibmphp_core.c b/drivers/hotplug/ibmphp_core.c
--- a/drivers/hotplug/ibmphp_core.c Thu Feb 6 14:52:08 2003
+++ b/drivers/hotplug/ibmphp_core.c Thu Feb 6 14:52:08 2003
@@ -686,7 +686,6 @@
int ibmphp_update_slot_info (struct slot *slot_cur)
{
struct hotplug_slot_info *info;
- char buffer[30];
int rc;
u8 bus_speed;
u8 mode;
@@ -697,7 +696,6 @@
return -ENOMEM;
}
- strncpy (buffer, slot_cur->hotplug_slot->name, 30);
info->power_status = SLOT_PWRGD (slot_cur->status);
info->attention_status = SLOT_ATTN (slot_cur->status, slot_cur->ext_status);
info->latch_status = SLOT_LATCH (slot_cur->status);
@@ -735,7 +733,7 @@
info->max_bus_speed = slot_cur->hotplug_slot->info->max_bus_speed;
// To do: bus_names
- rc = pci_hp_change_slot_info (buffer, info);
+ rc = pci_hp_change_slot_info (slot_cur->hotplug_slot, info);
kfree (info);
return rc;
}
diff -Nru a/drivers/hotplug/pci_hotplug.h b/drivers/hotplug/pci_hotplug.h
--- a/drivers/hotplug/pci_hotplug.h Thu Feb 6 14:52:08 2003
+++ b/drivers/hotplug/pci_hotplug.h Thu Feb 6 14:52:08 2003
@@ -139,7 +139,7 @@
extern int pci_hp_register (struct hotplug_slot *slot);
extern int pci_hp_deregister (struct hotplug_slot *slot);
-extern int pci_hp_change_slot_info (const char *name,
+extern int pci_hp_change_slot_info (struct hotplug_slot *slot,
struct hotplug_slot_info *info);
struct pci_dev_wrapped {
diff -Nru a/drivers/hotplug/pci_hotplug_core.c b/drivers/hotplug/pci_hotplug_core.c
--- a/drivers/hotplug/pci_hotplug_core.c Thu Feb 6 14:52:08 2003
+++ b/drivers/hotplug/pci_hotplug_core.c Thu Feb 6 14:52:08 2003
@@ -529,16 +529,16 @@
/**
* pci_hp_change_slot_info - changes the slot's information structure in the core
- * @name: the name of the slot whose info has changed
+ * @slot: pointer to the slot whose info has changed
* @info: pointer to the info copy into the slot's info structure
*
- * A slot with @name must have been registered with the pci
+ * @slot must have been registered with the pci
* hotplug subsystem previously with a call to pci_hp_register().
*
* Returns 0 if successful, anything else for an error.
* Not supported by sysfs now.
*/
-int pci_hp_change_slot_info (const char *name, struct hotplug_slot_info *info)
+int pci_hp_change_slot_info (struct hotplug_slot *slot, struct hotplug_slot_info *info)
{
return 0;
}
next prev parent reply other threads:[~2003-02-06 4:04 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-02-06 4:03 [BK PATCH] PCI Hotplug changes for 2.5.59 Greg KH
2003-02-06 4:08 ` [PATCH] " Greg KH
2003-02-06 4:08 ` Greg KH
2003-02-06 4:08 ` Greg KH
2003-02-06 4:08 ` Greg KH
2003-02-06 4:08 ` Greg KH [this message]
2003-02-06 4:08 ` Greg KH
2003-02-06 4:08 ` Greg KH
2003-02-06 4:08 ` Greg KH
2003-02-06 4:08 ` Greg KH
2003-02-06 4:08 ` Greg KH
2003-02-06 4:08 ` Greg KH
2003-02-06 4:08 ` Greg KH
2003-02-06 4:08 ` Greg KH
2003-02-06 4:08 ` Greg KH
2003-02-06 4:08 ` Greg KH
2003-02-06 4:08 ` 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=10445044862346@kroah.com \
--to=greg@kroah.com \
--cc=linux-kernel@vger.kernel.org \
--cc=pcihpd-discuss@lists.sourceforge.net \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.