From patchwork Fri Aug 17 23:36:31 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bjorn Helgaas X-Patchwork-Id: 1340141 X-Patchwork-Delegate: bhelgaas@google.com Return-Path: X-Original-To: patchwork-linux-pci@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 4444D3FC81 for ; Fri, 17 Aug 2012 23:36:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757196Ab2HQXgd (ORCPT ); Fri, 17 Aug 2012 19:36:33 -0400 Received: from mail-ob0-f202.google.com ([209.85.214.202]:34062 "EHLO mail-ob0-f202.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755445Ab2HQXgc (ORCPT ); Fri, 17 Aug 2012 19:36:32 -0400 Received: by mail-ob0-f202.google.com with SMTP id wc20so3010724obb.1 for ; Fri, 17 Aug 2012 16:36:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=subject:to:from:cc:date:message-id:in-reply-to:references :user-agent:mime-version:content-type:content-transfer-encoding; bh=9mK/gtmxHaAGU8L5iClLs6ghADUNpWY/7584UahCk1s=; b=CwvQ5WFmKsXDeCth68+lbR5dKsWkU4CuWt+/W7vJf4ilTxIRox/TS7xTRi0cbhvHAB aDApSaKvtwTq+wJAWgEjIxqAvgaP31fylwjhoCS1oUND6ge75D2qgaqzV3M6G26b8Qvc NWGi6z6+E+Xk0lAhqkZHYs4TCcCWn8UxKUCK50Bwn8CPbaITQf8gOAi6mVoI4CFsm+sh pMg5XCf+rMmoq1a0uWH7OWrff93N/ZXX7ogRWu09zi1bcoRA6w6M5cv/7c7BB8k/r/97 UnRDOhfgVqJT2K/HWBBIYljk477l6QgEPZC7e+QJlt6JDhKUbJjKYvMJu3yCodWFUdcF JaAA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=subject:to:from:cc:date:message-id:in-reply-to:references :user-agent:mime-version:content-type:content-transfer-encoding :x-gm-message-state; bh=9mK/gtmxHaAGU8L5iClLs6ghADUNpWY/7584UahCk1s=; b=KkqhlgzEJKZgTOz3PUMMoFCFrxBemgE+AQCr+wxajY1J1CcpKps/0deDVOf/UGh2BB DagqEQlgRNmpR6Pt5Av73lU4rj/0EhMV4kHtTB1GJpW8yjYzb4SC7vM8VngPQ8TYkQTo W3+X88cMpB3Pa54GRIGorFoECkhdIyFYvk+xY5s59ejCYshhCNtnfLYDN2BMrQ++Ozi1 gHWLgDyyAdf5/sO/lsgnkCOPNm2VJnl1h3Lx2LRgB5aaj08al465f+MKaFgKEBLQUlpS MmR52YmvbFgYK820UKJ9vsDN55OsA7nGf3E5Wtd1sn5kBWdQxsjfu9+L+nx15BZGrWGJ wqlA== Received: by 10.42.94.16 with SMTP id z16mr2636195icm.32.1345246592233; Fri, 17 Aug 2012 16:36:32 -0700 (PDT) Received: by 10.42.94.16 with SMTP id z16mr2636190icm.32.1345246592193; Fri, 17 Aug 2012 16:36:32 -0700 (PDT) Received: from wpzn3.hot.corp.google.com (216-239-44-65.google.com [216.239.44.65]) by gmr-mx.google.com with ESMTPS id dd6si550507igc.0.2012.08.17.16.36.32 (version=TLSv1/SSLv3 cipher=AES128-SHA); Fri, 17 Aug 2012 16:36:32 -0700 (PDT) Received: from bhelgaas.mtv.corp.google.com (bhelgaas.mtv.corp.google.com [172.18.96.155]) by wpzn3.hot.corp.google.com (Postfix) with ESMTP id B07F8100047; Fri, 17 Aug 2012 16:36:31 -0700 (PDT) Received: from bhelgaas.mtv.corp.google.com (unknown [IPv6:::1]) by bhelgaas.mtv.corp.google.com (Postfix) with ESMTP id 5DEB81801BB; Fri, 17 Aug 2012 16:36:31 -0700 (PDT) Subject: [PATCH v2 09/16] PCI: Remove unused, commented-out, code To: linux-pci@vger.kernel.org From: Bjorn Helgaas Cc: linux-pcmcia@lists.infradead.org, Yinghai Lu , Kenji Kaneshige Date: Fri, 17 Aug 2012 17:36:31 -0600 Message-ID: <20120817233631.10973.50100.stgit@bhelgaas.mtv.corp.google.com> In-Reply-To: <20120817233100.10973.59521.stgit@bhelgaas.mtv.corp.google.com> References: <20120817233100.10973.59521.stgit@bhelgaas.mtv.corp.google.com> User-Agent: StGit/0.15 MIME-Version: 1.0 X-Gm-Message-State: ALoCoQnpZ1CrSPaACg1Z/aAQpJo3+RgllKfes+Ds9Ow6t771PpqBqMyuwYfEyBnA9tFd3Lj3N2QOF7ywHhTuHxssjHTlrUyfmt/pp0Q+7gLCLu+LUVBjqyxRnSTiM5kY8XhKVyuRosyAeFBvnYJ7Lb3cc8blNOC8ueF6wtK6GMCLzSXOTbF3l7wOfE9VZ29tY2atrFZoFb8Ly8lRBMWXNZx6SNp3ppybCA== Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org Signed-off-by: Bjorn Helgaas --- drivers/pci/hotplug/acpiphp_glue.c | 28 ----------------- drivers/pci/proc.c | 19 ------------ drivers/pci/remove.c | 19 ------------ drivers/pci/rom.c | 59 ------------------------------------ 4 files changed, 0 insertions(+), 125 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 diff --git a/drivers/pci/hotplug/acpiphp_glue.c b/drivers/pci/hotplug/acpiphp_glue.c index b5d798e..7be4ca5 100644 --- a/drivers/pci/hotplug/acpiphp_glue.c +++ b/drivers/pci/hotplug/acpiphp_glue.c @@ -1461,34 +1461,6 @@ int __init acpiphp_get_num_slots(void) } -#if 0 -/** - * acpiphp_for_each_slot - call function for each slot - * @fn: callback function - * @data: context to be passed to callback function - */ -static int acpiphp_for_each_slot(acpiphp_callback fn, void *data) -{ - struct list_head *node; - struct acpiphp_bridge *bridge; - struct acpiphp_slot *slot; - int retval = 0; - - list_for_each (node, &bridge_list) { - bridge = (struct acpiphp_bridge *)node; - for (slot = bridge->slots; slot; slot = slot->next) { - retval = fn(slot, data); - if (!retval) - goto err_exit; - } - } - - err_exit: - return retval; -} -#endif - - /** * acpiphp_enable_slot - power on slot * @slot: ACPI PHP slot diff --git a/drivers/pci/proc.c b/drivers/pci/proc.c index 27911b5..eb907a8f 100644 --- a/drivers/pci/proc.c +++ b/drivers/pci/proc.c @@ -434,25 +434,6 @@ int pci_proc_detach_device(struct pci_dev *dev) return 0; } -#if 0 -int pci_proc_attach_bus(struct pci_bus* bus) -{ - struct proc_dir_entry *de = bus->procdir; - - if (!proc_initialized) - return -EACCES; - - if (!de) { - char name[16]; - sprintf(name, "%02x", bus->number); - de = bus->procdir = proc_mkdir(name, proc_bus_pci_dir); - if (!de) - return -ENOMEM; - } - return 0; -} -#endif /* 0 */ - int pci_proc_detach_bus(struct pci_bus* bus) { struct proc_dir_entry *de = bus->procdir; diff --git a/drivers/pci/remove.c b/drivers/pci/remove.c index 3828104..44f479f 100644 --- a/drivers/pci/remove.c +++ b/drivers/pci/remove.c @@ -43,25 +43,6 @@ static void pci_destroy_dev(struct pci_dev *dev) pci_dev_put(dev); } -/** - * pci_remove_device_safe - remove an unused hotplug device - * @dev: the device to remove - * - * Delete the device structure from the device lists and - * notify userspace (/sbin/hotplug), but only if the device - * in question is not being used by a driver. - * Returns 0 on success. - */ -#if 0 -int pci_remove_device_safe(struct pci_dev *dev) -{ - if (pci_dev_driver(dev)) - return -EBUSY; - pci_destroy_dev(dev); - return 0; -} -#endif /* 0 */ - void pci_remove_bus(struct pci_bus *pci_bus) { pci_proc_detach_bus(pci_bus); diff --git a/drivers/pci/rom.c b/drivers/pci/rom.c index 48ebdb2..0b3037a 100644 --- a/drivers/pci/rom.c +++ b/drivers/pci/rom.c @@ -167,44 +167,6 @@ void __iomem *pci_map_rom(struct pci_dev *pdev, size_t *size) return rom; } -#if 0 -/** - * pci_map_rom_copy - map a PCI ROM to kernel space, create a copy - * @pdev: pointer to pci device struct - * @size: pointer to receive size of pci window over ROM - * - * Return: kernel virtual pointer to image of ROM - * - * Map a PCI ROM into kernel space. If ROM is boot video ROM, - * the shadow BIOS copy will be returned instead of the - * actual ROM. - */ -void __iomem *pci_map_rom_copy(struct pci_dev *pdev, size_t *size) -{ - struct resource *res = &pdev->resource[PCI_ROM_RESOURCE]; - void __iomem *rom; - - rom = pci_map_rom(pdev, size); - if (!rom) - return NULL; - - if (res->flags & (IORESOURCE_ROM_COPY | IORESOURCE_ROM_SHADOW | - IORESOURCE_ROM_BIOS_COPY)) - return rom; - - res->start = (unsigned long)kmalloc(*size, GFP_KERNEL); - if (!res->start) - return rom; - - res->end = res->start + *size; - memcpy_fromio((void*)(unsigned long)res->start, rom, *size); - pci_unmap_rom(pdev, rom); - res->flags |= IORESOURCE_ROM_COPY; - - return (void __iomem *)(unsigned long)res->start; -} -#endif /* 0 */ - /** * pci_unmap_rom - unmap the ROM from kernel space * @pdev: pointer to pci device struct @@ -226,27 +188,6 @@ void pci_unmap_rom(struct pci_dev *pdev, void __iomem *rom) pci_disable_rom(pdev); } -#if 0 -/** - * pci_remove_rom - disable the ROM and remove its sysfs attribute - * @pdev: pointer to pci device struct - * - * Remove the rom file in sysfs and disable ROM decoding. - */ -void pci_remove_rom(struct pci_dev *pdev) -{ - struct resource *res = &pdev->resource[PCI_ROM_RESOURCE]; - - if (pci_resource_len(pdev, PCI_ROM_RESOURCE)) - sysfs_remove_bin_file(&pdev->dev.kobj, pdev->rom_attr); - if (!(res->flags & (IORESOURCE_ROM_ENABLE | - IORESOURCE_ROM_SHADOW | - IORESOURCE_ROM_BIOS_COPY | - IORESOURCE_ROM_COPY))) - pci_disable_rom(pdev); -} -#endif /* 0 */ - /** * pci_cleanup_rom - free the ROM copy created by pci_map_rom_copy * @pdev: pointer to pci device struct