From: Alex Chiang <achiang@hp.com>
To: gregkh@suse.de, kristen.c.accardi@intel.com, lenb@kernel.org,
matthew@wil.cx, rick.jones2@hp.com, linux-kernel@vger.kernel.org,
linux-pci@atrey.karlin.mff.cuni.cz, pcihpd-discuss@list
Subject: [PATCH 1/5] Remove path attribute from sgi_hotplug
Date: Mon, 12 Nov 2007 17:12:29 -0700 [thread overview]
Message-ID: <20071113001229.GB13341@ldl.fc.hp.com> (raw)
In-Reply-To: <20071113000853.GA13341@ldl.fc.hp.com>
[Please note, I got Rick Jones' email screwed up in the 0/5
email; it's corrected above.]
From: Alex Chiang <achiang@hp.com>
Rename the slot to be the contents of the 'path' sysfs attribute, and
delete the attribute. The mapping from pci address to slot name is
supposed to be done through the 'address' file, which will be provided
automatically later in this series of patches.
Signed-off-by: Alex Chiang <achiang@hp.com>
Signed-off-by: Matthew Wilcox <matthew@wil.cx>
---
drivers/pci/hotplug/sgi_hotplug.c | 27 +--------------------------
1 files changed, 1 insertions(+), 26 deletions(-)
diff --git a/drivers/pci/hotplug/sgi_hotplug.c b/drivers/pci/hotplug/sgi_hotplug.c
index ef07c36..e1e7c9d 100644
--- a/drivers/pci/hotplug/sgi_hotplug.c
+++ b/drivers/pci/hotplug/sgi_hotplug.c
@@ -91,21 +91,6 @@ static struct hotplug_slot_ops sn_hotplug_slot_ops = {
static DEFINE_MUTEX(sn_hotplug_mutex);
-static ssize_t path_show (struct hotplug_slot *bss_hotplug_slot,
- char *buf)
-{
- int retval = -ENOENT;
- struct slot *slot = bss_hotplug_slot->private;
-
- if (!slot)
- return retval;
-
- retval = sprintf (buf, "%s\n", slot->physical_path);
- return retval;
-}
-
-static struct hotplug_slot_attribute sn_slot_path_attr = __ATTR_RO(path);
-
static int sn_pci_slot_valid(struct pci_bus *pci_bus, int device)
{
struct pcibus_info *pcibus_info;
@@ -173,18 +158,10 @@ static int sn_hp_slot_private_alloc(struct hotplug_slot *bss_hotplug_slot,
return -ENOMEM;
bss_hotplug_slot->private = slot;
- bss_hotplug_slot->name = kmalloc(SN_SLOT_NAME_SIZE, GFP_KERNEL);
- if (!bss_hotplug_slot->name) {
- kfree(bss_hotplug_slot->private);
- return -ENOMEM;
- }
+ bss_hotplug_slot->name = slot->physical_path;
slot->device_num = device;
slot->pci_bus = pci_bus;
- sprintf(bss_hotplug_slot->name, "%04x:%02x:%02x",
- pci_domain_nr(pci_bus),
- ((u16)pcibus_info->pbi_buscommon.bs_persist_busnum),
- device + 1);
sn_generate_path(pci_bus, slot->physical_path);
@@ -203,8 +180,6 @@ static struct hotplug_slot * sn_hp_destroy(void)
bss_hotplug_slot = slot->hotplug_slot;
list_del(&((struct slot *)bss_hotplug_slot->private)->
hp_list);
- sysfs_remove_file(&bss_hotplug_slot->kobj,
- &sn_slot_path_attr.attr);
break;
}
return bss_hotplug_slot;
--
1.5.3.1.1.g1e61
next prev parent reply other threads:[~2007-11-13 0:12 UTC|newest]
Thread overview: 69+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-13 0:08 [PATCH 0/5][RFC] Physical PCI slot objects Alex Chiang
2007-11-13 0:12 ` Alex Chiang [this message]
2007-11-13 0:13 ` [PATCH 2/5] Construct one fakephp slot per pci slot Alex Chiang
2007-11-13 19:48 ` Linas Vepstas
2007-11-13 19:52 ` Matthew Wilcox
2007-11-14 12:39 ` [Pcihpd-discuss] " Rolf Eike Beer
2007-11-14 14:17 ` Alex Chiang
2007-11-14 14:49 ` Rolf Eike Beer
2007-11-14 15:01 ` Alex Chiang
2007-11-13 0:14 ` [PATCH 3/5, RFC] Introduce pci_slot Alex Chiang
2007-11-13 19:56 ` Linas Vepstas
2007-11-13 20:03 ` Matthew Wilcox
2007-11-13 0:17 ` [PATCH 4/5, RFC] ACPI PCI slot detection driver Alex Chiang
2007-11-13 0:18 ` [PATCH 5/5] Add pci_slot_add_hotplug() interface Alex Chiang
2007-11-13 17:01 ` [PATCH 0/5][RFC] Physical PCI slot objects Greg KH
2007-11-13 18:33 ` Matthew Wilcox
2007-11-13 18:51 ` Greg KH
2007-11-13 20:11 ` Matthew Wilcox
2007-11-13 20:19 ` Greg KH
2007-11-13 23:08 ` Gary Hade
2007-11-14 1:37 ` Alex Chiang
2007-11-15 0:40 ` Gary Hade
2007-11-15 17:36 ` Alex Chiang
2007-11-15 23:38 ` Gary Hade
2007-11-14 14:42 ` Alex Chiang
[not found] ` <20071114181337.GA6269@us.ibm.com>
2007-11-14 18:36 ` Alex Chiang
2007-11-13 20:36 ` Alex Chiang
2007-11-13 21:30 ` Greg KH
2007-11-13 22:01 ` Bjorn Helgaas
2007-11-13 22:16 ` Greg KH
2007-11-13 21:15 ` Matt Domsch
2007-11-13 21:31 ` Alex Chiang
2007-11-13 21:36 ` Greg KH
[not found] ` <20071113213646.GB4426@kroah.com>
2007-11-13 23:14 ` Alex Chiang
2007-11-13 21:32 ` Greg KH
2007-11-13 20:21 ` Alex Chiang
2007-11-13 20:26 ` Greg KH
2007-11-13 22:51 ` Rick Jones
2007-11-13 22:56 ` Greg KH
2007-11-13 23:04 ` Matthew Wilcox
2007-11-13 23:07 ` Greg KH
2007-11-14 6:00 ` Scott Murray
2007-11-13 23:33 ` Kristen Carlson Accardi
2007-11-14 0:10 ` Matthew Wilcox
2007-11-14 9:55 ` Kenji Kaneshige
2007-11-14 18:38 ` Kristen Carlson Accardi
2007-11-13 22:59 ` Kristen Carlson Accardi
2007-11-14 17:37 ` Bjorn Helgaas
2007-11-14 17:53 ` Greg KH
2007-11-14 19:53 ` Alex Chiang
2007-11-14 21:24 ` Alex Chiang
2007-11-14 21:42 ` Alex Chiang
2007-11-14 22:00 ` Greg KH
2007-11-15 20:20 ` Alex Chiang
2007-11-14 17:44 ` Matthew Garrett
2007-11-14 17:51 ` Greg KH
2007-11-14 18:03 ` Matthew Garrett
2007-11-13 20:24 ` Linas Vepstas
2007-11-13 20:59 ` Alex Chiang
[not found] ` <20071113214121.GC8509@austin.ibm.com>
2007-11-13 21:58 ` Matthew Wilcox
2007-11-14 1:07 ` Andi Kleen
2007-11-14 14:17 ` Matthew Wilcox
2007-11-14 14:35 ` Andi Kleen
2007-11-14 15:00 ` Matthew Wilcox
2007-11-14 15:08 ` Andi Kleen
2007-11-14 15:12 ` Matthew Wilcox
2007-11-14 15:20 ` Alex Chiang
2007-11-14 11:43 ` Kenji Kaneshige
-- strict thread matches above, loose matches on Subject: below --
2007-11-14 19:36 [PATCH 0/5, v2] " Alex Chiang
2007-11-14 19:37 ` [PATCH 1/5] Remove path attribute from sgi_hotplug Alex Chiang
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=20071113001229.GB13341@ldl.fc.hp.com \
--to=achiang@hp.com \
--cc=gregkh@suse.de \
--cc=kristen.c.accardi@intel.com \
--cc=lenb@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@atrey.karlin.mff.cuni.cz \
--cc=matthew@wil.cx \
--cc=pcihpd-discuss@list \
--cc=rick.jones2@hp.com \
/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