From patchwork Tue Sep 15 08:28:28 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kenji Kaneshige X-Patchwork-Id: 47610 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 n8F8SkQs015770 for ; Tue, 15 Sep 2009 08:28:46 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750891AbZIOI2l (ORCPT ); Tue, 15 Sep 2009 04:28:41 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1750993AbZIOI2l (ORCPT ); Tue, 15 Sep 2009 04:28:41 -0400 Received: from fgwmail7.fujitsu.co.jp ([192.51.44.37]:55560 "EHLO fgwmail7.fujitsu.co.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750891AbZIOI2k (ORCPT ); Tue, 15 Sep 2009 04:28:40 -0400 Received: from m6.gw.fujitsu.co.jp ([10.0.50.76]) by fgwmail7.fujitsu.co.jp (Fujitsu Gateway) with ESMTP id n8F8ShOn024508 for (envelope-from kaneshige.kenji@jp.fujitsu.com); Tue, 15 Sep 2009 17:28:43 +0900 Received: from smail (m6 [127.0.0.1]) by outgoing.m6.gw.fujitsu.co.jp (Postfix) with ESMTP id 436D445DE50 for ; Tue, 15 Sep 2009 17:28:43 +0900 (JST) Received: from s6.gw.fujitsu.co.jp (s6.gw.fujitsu.co.jp [10.0.50.96]) by m6.gw.fujitsu.co.jp (Postfix) with ESMTP id 157F445DE4F for ; Tue, 15 Sep 2009 17:28:43 +0900 (JST) Received: from s6.gw.fujitsu.co.jp (localhost.localdomain [127.0.0.1]) by s6.gw.fujitsu.co.jp (Postfix) with ESMTP id E25C01DB8043 for ; Tue, 15 Sep 2009 17:28:42 +0900 (JST) Received: from m108.s.css.fujitsu.com (m108.s.css.fujitsu.com [10.249.87.108]) by s6.gw.fujitsu.co.jp (Postfix) with ESMTP id 9700A1DB8042 for ; Tue, 15 Sep 2009 17:28:42 +0900 (JST) Received: from m108.css.fujitsu.com (m108 [127.0.0.1]) by m108.s.css.fujitsu.com (Postfix) with ESMTP id 98419B6800A; Tue, 15 Sep 2009 17:28:41 +0900 (JST) Received: from [127.0.0.1] (unknown [10.124.100.137]) by m108.s.css.fujitsu.com (Postfix) with ESMTP id 0E3CCB6800E; Tue, 15 Sep 2009 17:28:41 +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:28:32 +0900 (JST) Message-ID: <4AAF502C.5080108@jp.fujitsu.com> Date: Tue, 15 Sep 2009 17:28:28 +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 7/15] pciehp: remove slot_device_offset 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 the device number of the hot-slot under the PCIe downstream port is always 0, the slot_device_offset field in the slot is meaningless and we don't need it. Signed-off-by: Kenji Kaneshige --- drivers/pci/hotplug/pciehp.h | 1 - drivers/pci/hotplug/pciehp_core.c | 6 ++---- drivers/pci/hotplug/pciehp_ctrl.c | 3 --- drivers/pci/hotplug/pciehp_hpc.c | 1 - 4 files changed, 2 insertions(+), 9 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 @@ -95,7 +95,6 @@ struct controller { struct slot *slot; struct hpc_ops *hpc_ops; wait_queue_head_t queue; /* sleep & wake process */ - u8 slot_device_offset; u32 first_slot; /* First physical slot number */ /* PCIE only has 1 slot */ u8 slot_bus; /* Bus where the slots handled by this controller sit */ u32 slot_cap; Index: 20090915/drivers/pci/hotplug/pciehp_core.c =================================================================== --- 20090915.orig/drivers/pci/hotplug/pciehp_core.c +++ 20090915/drivers/pci/hotplug/pciehp_core.c @@ -123,11 +123,9 @@ static int init_slot(struct controller * slot->hotplug_slot = hotplug; snprintf(name, SLOT_NAME_SIZE, "%u", slot->number); - ctrl_dbg(ctrl, "Registering domain:bus:dev=%04x:%02x:00 " - "sun=%x slot_device_offset=%x\n", + ctrl_dbg(ctrl, "Registering domain:bus:dev=%04x:%02x:00 sun=%x\n", pci_domain_nr(ctrl->pci_dev->subordinate), - ctrl->pci_dev->subordinate->number, - slot->number, ctrl->slot_device_offset); + ctrl->pci_dev->subordinate->number, slot->number); retval = pci_hp_register(hotplug, ctrl->pci_dev->subordinate, 0, name); if (retval) { Index: 20090915/drivers/pci/hotplug/pciehp_ctrl.c =================================================================== --- 20090915.orig/drivers/pci/hotplug/pciehp_ctrl.c +++ 20090915/drivers/pci/hotplug/pciehp_ctrl.c @@ -210,9 +210,6 @@ static int board_added(struct slot *p_sl struct controller *ctrl = p_slot->ctrl; struct pci_bus *parent = ctrl->pci_dev->subordinate; - ctrl_dbg(ctrl, "%s: slot device, slot offset = 0, %d\n", - __func__, ctrl->slot_device_offset); - if (POWER_CTRL(ctrl)) { /* Power on slot */ retval = p_slot->hpc_ops->power_on_slot(p_slot); Index: 20090915/drivers/pci/hotplug/pciehp_hpc.c =================================================================== --- 20090915.orig/drivers/pci/hotplug/pciehp_hpc.c +++ 20090915/drivers/pci/hotplug/pciehp_hpc.c @@ -1017,7 +1017,6 @@ struct controller *pcie_init(struct pcie ctrl->slot_cap = slot_cap; ctrl->first_slot = slot_cap >> 19; - ctrl->slot_device_offset = 0; ctrl->hpc_ops = &pciehp_hpc_ops; mutex_init(&ctrl->crit_sect); mutex_init(&ctrl->ctrl_lock);