From patchwork Tue Sep 15 08:26:32 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kenji Kaneshige X-Patchwork-Id: 47607 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 n8F8QSHP015440 for ; Tue, 15 Sep 2009 08:26:53 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750975AbZIOI0t (ORCPT ); Tue, 15 Sep 2009 04:26:49 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1750882AbZIOI0s (ORCPT ); Tue, 15 Sep 2009 04:26:48 -0400 Received: from fgwmail7.fujitsu.co.jp ([192.51.44.37]:55438 "EHLO fgwmail7.fujitsu.co.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750785AbZIOI0q (ORCPT ); Tue, 15 Sep 2009 04:26:46 -0400 Received: from m2.gw.fujitsu.co.jp ([10.0.50.72]) by fgwmail7.fujitsu.co.jp (Fujitsu Gateway) with ESMTP id n8F8Qn2v023681 for (envelope-from kaneshige.kenji@jp.fujitsu.com); Tue, 15 Sep 2009 17:26:49 +0900 Received: from smail (m2 [127.0.0.1]) by outgoing.m2.gw.fujitsu.co.jp (Postfix) with ESMTP id 2C09945DE4E for ; Tue, 15 Sep 2009 17:26:49 +0900 (JST) Received: from s2.gw.fujitsu.co.jp (s2.gw.fujitsu.co.jp [10.0.50.92]) by m2.gw.fujitsu.co.jp (Postfix) with ESMTP id F2C1045DD75 for ; Tue, 15 Sep 2009 17:26:48 +0900 (JST) Received: from s2.gw.fujitsu.co.jp (localhost.localdomain [127.0.0.1]) by s2.gw.fujitsu.co.jp (Postfix) with ESMTP id DD6741DB803B for ; Tue, 15 Sep 2009 17:26:48 +0900 (JST) Received: from m107.s.css.fujitsu.com (m107.s.css.fujitsu.com [10.249.87.107]) by s2.gw.fujitsu.co.jp (Postfix) with ESMTP id 8E6031DB803C for ; Tue, 15 Sep 2009 17:26:45 +0900 (JST) Received: from m107.css.fujitsu.com (m107 [127.0.0.1]) by m107.s.css.fujitsu.com (Postfix) with ESMTP id BBA3A670006; Tue, 15 Sep 2009 17:26:44 +0900 (JST) Received: from [127.0.0.1] (unknown [10.124.100.137]) by m107.s.css.fujitsu.com (Postfix) with ESMTP id 5C9A1670003; Tue, 15 Sep 2009 17:26:44 +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:26:36 +0900 (JST) Message-ID: <4AAF4FB8.8090301@jp.fujitsu.com> Date: Tue, 15 Sep 2009 17:26:32 +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 4/15] pciehp: remove bus 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 The bus field in struct slot is not necessary. Signed-off-by: Kenji Kaneshige --- drivers/pci/hotplug/pciehp.h | 1 - drivers/pci/hotplug/pciehp_core.c | 3 ++- drivers/pci/hotplug/pciehp_ctrl.c | 6 ++++-- drivers/pci/hotplug/pciehp_hpc.c | 1 - drivers/pci/hotplug/pciehp_pci.c | 6 ++++-- 5 files changed, 10 insertions(+), 7 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 @@ -72,7 +72,6 @@ do { \ #define SLOT_NAME_SIZE 10 struct slot { - u8 bus; u8 device; u8 state; u8 hp_slot; Index: 20090915/drivers/pci/hotplug/pciehp_core.c =================================================================== --- 20090915.orig/drivers/pci/hotplug/pciehp_core.c +++ 20090915/drivers/pci/hotplug/pciehp_core.c @@ -126,7 +126,8 @@ static int init_slot(struct controller * ctrl_dbg(ctrl, "Registering domain:bus:dev=%04x:%02x:%02x " "hp_slot=%x sun=%x slot_device_offset=%x\n", pci_domain_nr(ctrl->pci_dev->subordinate), - slot->bus, slot->device, slot->hp_slot, slot->number, + ctrl->pci_dev->subordinate->number, + slot->device, slot->hp_slot, slot->number, ctrl->slot_device_offset); retval = pci_hp_register(hotplug, ctrl->pci_dev->subordinate, Index: 20090915/drivers/pci/hotplug/pciehp_ctrl.c =================================================================== --- 20090915.orig/drivers/pci/hotplug/pciehp_ctrl.c +++ 20090915/drivers/pci/hotplug/pciehp_ctrl.c @@ -242,7 +242,8 @@ static int board_added(struct slot *p_sl retval = pciehp_configure_device(p_slot); if (retval) { ctrl_err(ctrl, "Cannot add device at %04x:%02x:%02x\n", - pci_domain_nr(parent), p_slot->bus, p_slot->device); + pci_domain_nr(parent), parent->number, + p_slot->device); goto err_exit; } @@ -319,7 +320,8 @@ static void pciehp_power_thread(struct w ctrl_dbg(p_slot->ctrl, "Disabling domain:bus:device=%04x:%02x:%02x\n", pci_domain_nr(p_slot->ctrl->pci_dev->subordinate), - p_slot->bus, p_slot->device); + p_slot->ctrl->pci_dev->subordinate->number, + p_slot->device); pciehp_disable_slot(p_slot); mutex_lock(&p_slot->lock); p_slot->state = STATIC_STATE; Index: 20090915/drivers/pci/hotplug/pciehp_hpc.c =================================================================== --- 20090915.orig/drivers/pci/hotplug/pciehp_hpc.c +++ 20090915/drivers/pci/hotplug/pciehp_hpc.c @@ -930,7 +930,6 @@ static int pcie_init_slot(struct control slot->hp_slot = 0; slot->ctrl = ctrl; - slot->bus = ctrl->pci_dev->subordinate->number; slot->device = ctrl->slot_device_offset + slot->hp_slot; slot->hpc_ops = ctrl->hpc_ops; slot->number = ctrl->first_slot; Index: 20090915/drivers/pci/hotplug/pciehp_pci.c =================================================================== --- 20090915.orig/drivers/pci/hotplug/pciehp_pci.c +++ 20090915/drivers/pci/hotplug/pciehp_pci.c @@ -71,7 +71,8 @@ int pciehp_configure_device(struct slot if (dev) { ctrl_err(ctrl, "Device %s already exists " "at %04x:%02x:%02x, cannot hot-add\n", pci_name(dev), - pci_domain_nr(parent), p_slot->bus, p_slot->device); + pci_domain_nr(parent), parent->number, + p_slot->device); pci_dev_put(dev); return -EINVAL; } @@ -116,7 +117,8 @@ int pciehp_unconfigure_device(struct slo struct controller *ctrl = p_slot->ctrl; ctrl_dbg(ctrl, "%s: domain:bus:dev = %04x:%02x:%02x\n", - __func__, pci_domain_nr(parent), p_slot->bus, p_slot->device); + __func__, pci_domain_nr(parent), parent->number, + p_slot->device); ret = p_slot->hpc_ops->get_adapter_status(p_slot, &presence); if (ret) presence = 0;