From patchwork Tue Sep 15 08:31:16 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kenji Kaneshige X-Patchwork-Id: 47616 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n8F8VkxL016540 for ; Tue, 15 Sep 2009 08:31:46 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751366AbZIOIb2 (ORCPT ); Tue, 15 Sep 2009 04:31:28 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751454AbZIOIb2 (ORCPT ); Tue, 15 Sep 2009 04:31:28 -0400 Received: from fgwmail6.fujitsu.co.jp ([192.51.44.36]:35341 "EHLO fgwmail6.fujitsu.co.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751366AbZIOIb1 (ORCPT ); Tue, 15 Sep 2009 04:31:27 -0400 Received: from m3.gw.fujitsu.co.jp ([10.0.50.73]) by fgwmail6.fujitsu.co.jp (Fujitsu Gateway) with ESMTP id n8F8VTS3024521 for (envelope-from kaneshige.kenji@jp.fujitsu.com); Tue, 15 Sep 2009 17:31:29 +0900 Received: from smail (m3 [127.0.0.1]) by outgoing.m3.gw.fujitsu.co.jp (Postfix) with ESMTP id 9BD8C45DE4F for ; Tue, 15 Sep 2009 17:31:29 +0900 (JST) Received: from s3.gw.fujitsu.co.jp (s3.gw.fujitsu.co.jp [10.0.50.93]) by m3.gw.fujitsu.co.jp (Postfix) with ESMTP id 667CA45DE52 for ; Tue, 15 Sep 2009 17:31:29 +0900 (JST) Received: from s3.gw.fujitsu.co.jp (localhost.localdomain [127.0.0.1]) by s3.gw.fujitsu.co.jp (Postfix) with ESMTP id 33FADE08002 for ; Tue, 15 Sep 2009 17:31:29 +0900 (JST) Received: from m106.s.css.fujitsu.com (m106.s.css.fujitsu.com [10.249.87.106]) by s3.gw.fujitsu.co.jp (Postfix) with ESMTP id CD25BE08003 for ; Tue, 15 Sep 2009 17:31:28 +0900 (JST) Received: from m106.css.fujitsu.com (m106 [127.0.0.1]) by m106.s.css.fujitsu.com (Postfix) with ESMTP id A51385B88FC; Tue, 15 Sep 2009 17:31:28 +0900 (JST) Received: from [127.0.0.1] (unknown [10.124.100.137]) by m106.s.css.fujitsu.com (Postfix) with ESMTP id 4BA2E5B88D9; Tue, 15 Sep 2009 17:31:28 +0900 (JST) X-SecurityPolicyCheck-FJ: OK by FujitsuOutboundMailChecker v1.3.1 Received: from KANE-LIFEBOOK[10.124.100.137] by KANE-LIFEBOOK (FujitsuOutboundMailChecker v1.3.1/9992[10.124.100.137]); Tue, 15 Sep 2009 17:31:20 +0900 (JST) Message-ID: <4AAF50D4.2060108@jp.fujitsu.com> Date: Tue, 15 Sep 2009 17:31:16 +0900 From: Kenji Kaneshige User-Agent: Thunderbird 2.0.0.23 (Windows/20090812) MIME-Version: 1.0 To: linux-pci@vger.kernel.org, jbarnes@virtuousgeek.org CC: ebiederm@xmission.com Subject: [PATCH 13/15] pciehp: remove number field References: <4AAF4F16.802@jp.fujitsu.com> In-Reply-To: <4AAF4F16.802@jp.fujitsu.com> Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org Since slot_cap field in struct controller contains physical slot number informationq, we don't need number field in struct slot. Signed-off-by: Kenji Kaneshige --- drivers/pci/hotplug/pciehp.h | 1 - drivers/pci/hotplug/pciehp_core.c | 4 ++-- drivers/pci/hotplug/pciehp_hpc.c | 1 - 3 files changed, 2 insertions(+), 4 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-pci" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Index: 20090915/drivers/pci/hotplug/pciehp.h =================================================================== --- 20090915.orig/drivers/pci/hotplug/pciehp.h +++ 20090915/drivers/pci/hotplug/pciehp.h @@ -73,7 +73,6 @@ do { \ #define SLOT_NAME_SIZE 10 struct slot { u8 state; - u32 number; struct controller *ctrl; struct hotplug_slot *hotplug_slot; struct delayed_work work; /* work for button event */ Index: 20090915/drivers/pci/hotplug/pciehp_core.c =================================================================== --- 20090915.orig/drivers/pci/hotplug/pciehp_core.c +++ 20090915/drivers/pci/hotplug/pciehp_core.c @@ -121,11 +121,11 @@ static int init_slot(struct controller * hotplug->release = &release_slot; hotplug->ops = &pciehp_hotplug_slot_ops; slot->hotplug_slot = hotplug; - snprintf(name, SLOT_NAME_SIZE, "%u", slot->number); + snprintf(name, SLOT_NAME_SIZE, "%u", PSN(ctrl)); ctrl_dbg(ctrl, "Registering domain:bus:dev=%04x:%02x:00 sun=%x\n", pci_domain_nr(ctrl->pcie->port->subordinate), - ctrl->pcie->port->subordinate->number, slot->number); + ctrl->pcie->port->subordinate->number, PSN(ctrl)); retval = pci_hp_register(hotplug, ctrl->pcie->port->subordinate, 0, name); if (retval) { Index: 20090915/drivers/pci/hotplug/pciehp_hpc.c =================================================================== --- 20090915.orig/drivers/pci/hotplug/pciehp_hpc.c +++ 20090915/drivers/pci/hotplug/pciehp_hpc.c @@ -901,7 +901,6 @@ static int pcie_init_slot(struct control return -ENOMEM; slot->ctrl = ctrl; - slot->number = PSN(ctrl); mutex_init(&slot->lock); INIT_DELAYED_WORK(&slot->work, pciehp_queue_pushbutton_work); ctrl->slot = slot;