From patchwork Tue May 8 23:46:05 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bjorn Helgaas X-Patchwork-Id: 157833 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 366EAB6F13 for ; Wed, 9 May 2012 09:46:10 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755331Ab2EHXqI (ORCPT ); Tue, 8 May 2012 19:46:08 -0400 Received: from mail-yw0-f74.google.com ([209.85.213.74]:63303 "EHLO mail-yw0-f74.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755114Ab2EHXqH (ORCPT ); Tue, 8 May 2012 19:46:07 -0400 Received: by yhgm50 with SMTP id m50so854179yhg.1 for ; Tue, 08 May 2012 16:46:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=subject:to:from:date:message-id:user-agent:mime-version :content-type:content-transfer-encoding; bh=VodWIEMGmfVUISlTDhNDGa2I49ph1INE5Wi5Q+0fwAE=; b=oGjh1HEYo0e+9SEsnySljqDwd/Nk4mPrgMS9PHG3KbcQwf91ZHfXzjdcPKvTdnMC9V xZ359gYwj27Fopjy2qbA/IE2s7wC2+J8mFJoWyCIyMSIuckhLp1ldBo9IFJrLcfF0m2V r4ALcqFxihxmOa38jVekrbDs45vEcrt9DGFii/w4n3ohY1J7ChHlAocsBZjxQCAlPNty FG0unb/JgevA4Rwu8NmS6c9asIaUSpbbC083Ol3VlZVJxvDnba+qtyuN9CYg1gaWlGfb J6EQXKj+1CwawBQYRKZ6qSgdjdzJ0RmzQXSS3oQoO9rleyjP44O7VzLbBAO4Oz0JC38M Sy4A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=subject:to:from:date:message-id:user-agent:mime-version :content-type:content-transfer-encoding:x-gm-message-state; bh=VodWIEMGmfVUISlTDhNDGa2I49ph1INE5Wi5Q+0fwAE=; b=Y+7GodVVYnTgP/CqBe5eBrLM3PccxP5QQN6eckp5+nEZI7vg9KGJzoL7dA7jP9a6Cv CHcj7vyF5MzxRf8re0cAjA/aiWwQvQNSGvp6La9kn4xOPv1as6zHDZe5xbOFXTGGCMwZ YpZdnNGXIoHQazHRuvHTaZNGuX9G0/BQBhiq3yS3tRdugQU+A150McbYUw7ro80YFs7L Krc2zXwxBgWycaAj4ULra6WCrf/a6PHhjeHV3iqrlJWVOlZ+VBQS2rSrp9YE9Yq0V6Dl D63luweuDo1Om3Po/J8GpEoHDE1hBBe8pXqcYCLqhA1y54hygb9UCP8Se3mzC3kI175w kLYw== Received: by 10.101.23.6 with SMTP id a6mr9041658anj.7.1336520766620; Tue, 08 May 2012 16:46:06 -0700 (PDT) Received: by 10.101.23.6 with SMTP id a6mr9041652anj.7.1336520766526; Tue, 08 May 2012 16:46:06 -0700 (PDT) Received: from wpzn4.hot.corp.google.com (216-239-44-65.google.com [216.239.44.65]) by gmr-mx.google.com with ESMTPS id v39si264396anp.3.2012.05.08.16.46.06 (version=TLSv1/SSLv3 cipher=AES128-SHA); Tue, 08 May 2012 16:46:06 -0700 (PDT) Received: from bhelgaas.mtv.corp.google.com (bhelgaas.mtv.corp.google.com [172.18.96.155]) by wpzn4.hot.corp.google.com (Postfix) with ESMTP id 6B0061E004D for ; Tue, 8 May 2012 16:46:06 -0700 (PDT) Received: from bhelgaas.mtv.corp.google.com (unknown [IPv6:::1]) by bhelgaas.mtv.corp.google.com (Postfix) with ESMTP id 195D0180170 for ; Tue, 8 May 2012 16:46:06 -0700 (PDT) Subject: [PATCH 1/3] PCI: remove pci_bus_find_ext_capability() (unused) To: linux-pci@vger.kernel.org From: Bjorn Helgaas Date: Tue, 08 May 2012 17:46:05 -0600 Message-ID: <20120508234605.2085.32267.stgit@bhelgaas.mtv.corp.google.com> User-Agent: StGit/0.15 MIME-Version: 1.0 X-Gm-Message-State: ALoCoQkLoXDTCItuhkfnrdpwEynkk4s5xQpDYBs/cDOaR9jphkb47T25/hpOPpKwTzeYs75ZeOS8OClZ9OYK0cq5FZc06ENMEyJwLcScI4oeFq4AvS4CC+/ov2tttee24HiaSsnjpz/rN6PjBs+Zl2xpIkuY2dsD7mk/0h03KaPaDfZWJ3yRl6c= Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org pci_bus_find_ext_capability() is unused, and this patch removes it. Signed-off-by: Bjorn Helgaas --- drivers/pci/pci.c | 43 ------------------------------------------- include/linux/pci.h | 2 -- 2 files changed, 0 insertions(+), 45 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/pci.c b/drivers/pci/pci.c index 111569c..69c21f0 100644 --- a/drivers/pci/pci.c +++ b/drivers/pci/pci.c @@ -328,49 +328,6 @@ int pci_find_ext_capability(struct pci_dev *dev, int cap) } EXPORT_SYMBOL_GPL(pci_find_ext_capability); -/** - * pci_bus_find_ext_capability - find an extended capability - * @bus: the PCI bus to query - * @devfn: PCI device to query - * @cap: capability code - * - * Like pci_find_ext_capability() but works for pci devices that do not have a - * pci_dev structure set up yet. - * - * Returns the address of the requested capability structure within the - * device's PCI configuration space or 0 in case the device does not - * support it. - */ -int pci_bus_find_ext_capability(struct pci_bus *bus, unsigned int devfn, - int cap) -{ - u32 header; - int ttl; - int pos = PCI_CFG_SPACE_SIZE; - - /* minimum 8 bytes per capability */ - ttl = (PCI_CFG_SPACE_EXP_SIZE - PCI_CFG_SPACE_SIZE) / 8; - - if (!pci_bus_read_config_dword(bus, devfn, pos, &header)) - return 0; - if (header == 0xffffffff || header == 0) - return 0; - - while (ttl-- > 0) { - if (PCI_EXT_CAP_ID(header) == cap) - return pos; - - pos = PCI_EXT_CAP_NEXT(header); - if (pos < PCI_CFG_SPACE_SIZE) - break; - - if (!pci_bus_read_config_dword(bus, devfn, pos, &header)) - break; - } - - return 0; -} - static int __pci_find_next_ht_cap(struct pci_dev *dev, int pos, int ht_cap) { int rc, ttl = PCI_FIND_CAP_TTL; diff --git a/include/linux/pci.h b/include/linux/pci.h index e444f5b..0e0c489 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h @@ -707,8 +707,6 @@ enum pci_lost_interrupt_reason pci_lost_interrupt(struct pci_dev *dev); int pci_find_capability(struct pci_dev *dev, int cap); int pci_find_next_capability(struct pci_dev *dev, u8 pos, int cap); int pci_find_ext_capability(struct pci_dev *dev, int cap); -int pci_bus_find_ext_capability(struct pci_bus *bus, unsigned int devfn, - int cap); int pci_find_ht_capability(struct pci_dev *dev, int ht_cap); int pci_find_next_ht_capability(struct pci_dev *dev, int pos, int ht_cap); struct pci_bus *pci_find_next_bus(const struct pci_bus *from);