From patchwork Tue Feb 12 21:43:45 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bjorn Helgaas X-Patchwork-Id: 2132231 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by patchwork2.kernel.org (Postfix) with ESMTP id 5731FDFB7B for ; Tue, 12 Feb 2013 21:43:57 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 2366DE64AE for ; Tue, 12 Feb 2013 13:43:57 -0800 (PST) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-qc0-f201.google.com (mail-qc0-f201.google.com [209.85.216.201]) by gabe.freedesktop.org (Postfix) with ESMTP id 1C095E5DD8 for ; Tue, 12 Feb 2013 13:43:47 -0800 (PST) Received: by mail-qc0-f201.google.com with SMTP id o22so61254qcr.4 for ; Tue, 12 Feb 2013 13:43:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:date:from:to:cc:subject:message-id:references :mime-version:content-type:content-disposition:in-reply-to :user-agent; bh=KIY7vg9Nkr4+RNzhe12pqd5+ohxAOFe2ny2/ULMhIqo=; b=htADA3dm19Gi+uQrlX8LMai2fD2o69wm6sQSNlbiGjuCxLoxR7Vzq2w5QwyZHM9evq NXzb6irqSZrBkhf6LU793Jq3KcQEcjKF/6lqKdFi0OhOW32tpPKxBuzSdRI0fkeFlPm2 eBUJsEHath5BqjufSwjJA/Rl00kKm6eil+xE9pBBuF4FuPtDsFAQJbTNcsYTQWwulXf9 Wvt+2t0yrMLEb0gZCWNUwxOnJoTaxVip1dPKEIqoaomDRpkbLkpHAIsHPfbIhoBX06H9 7ibsHVYiWGFUxPgvav9fIfJSc0/ykBHXtef/flH7psmmkM6qAE7SSEVrlAfGpQDc4hiN 2TCg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:date:from:to:cc:subject:message-id:references :mime-version:content-type:content-disposition:in-reply-to :user-agent:x-gm-message-state; bh=KIY7vg9Nkr4+RNzhe12pqd5+ohxAOFe2ny2/ULMhIqo=; b=c0608ioLd2Ll1LsEB4jxwstH+GAufLRAnzz7r5ufzrazIHS9OTxLowffKeB9shKgP+ UfrD+X0nW4cHkakC1hVX5190nuUxHFt8jpLQS9T7619l4TJHpHD81+RAk0V6oD2KjVdJ HsK3w06TUqHk8JkU6hNyDnlmaq0qyubZFfUu7PqhYh5bHYCmU8O1ahS6TMgmLtumg66k oMNeb+JFcjndCD00cf9lBP89gisy9xQE4dG7Uan7NrlbDn2cF21aNk7V9qmTLmaKAdEW Tj5gt0vW1T1bCIKwKykL42yDsd666ZNwhtxo33lWxHcWFvqnA5pFN4uFf8/PUy+kDeqT HyRw== X-Received: by 10.236.59.202 with SMTP id s50mr8935533yhc.47.1360705426343; Tue, 12 Feb 2013 13:43:46 -0800 (PST) Received: from corp2gmr1-1.hot.corp.google.com (corp2gmr1-1.hot.corp.google.com [172.24.189.92]) by gmr-mx.google.com with ESMTPS id u21si1902288yhj.0.2013.02.12.13.43.46 (version=TLSv1.1 cipher=AES128-SHA bits=128/128); Tue, 12 Feb 2013 13:43:46 -0800 (PST) Received: from bhelgaas.mtv.corp.google.com (bhelgaas.mtv.corp.google.com [172.17.131.112]) by corp2gmr1-1.hot.corp.google.com (Postfix) with ESMTP id 3417B31C1CF; Tue, 12 Feb 2013 13:43:46 -0800 (PST) Received: by bhelgaas.mtv.corp.google.com (Postfix, from userid 131485) id D2C3218115D; Tue, 12 Feb 2013 13:43:45 -0800 (PST) Date: Tue, 12 Feb 2013 14:43:45 -0700 From: Bjorn Helgaas To: Randy Dunlap Subject: Re: linux-next: Tree for Feb 12 (drm_pci.c) Message-ID: <20130212214345.GB27624@google.com> References: <20130212160953.b80a57fec99e4bd9afb4b601@canb.auug.org.au> <511A6868.5010605@infradead.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <511A6868.5010605@infradead.org> User-Agent: Mutt/1.5.20 (2009-06-14) X-Gm-Message-State: ALoCoQmoOXYSF1DROWEBB0xY8D/fXsLYnQMtJzfRpCRFJ0VD6mVGcVah63jfaPQOstujPcUK6u2kNcDGzmIrsSDse3q/zuB1GobLg8eLhaQjQWuLwPHUQOz+F0guPn5TQYZ8yJCkgfEGbV5AJLh6hpQsGsoo1b7t/kYbd8l+y2C5CiIc0rfvQ1XPkMJ+R1V7gvd8lF9SSO/yM6OzWt3SAKU+SoDE6wFZ0Q== Cc: Stephen Rothwell , linux-next@vger.kernel.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org Errors-To: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org On Tue, Feb 12, 2013 at 08:06:00AM -0800, Randy Dunlap wrote: > On 02/11/13 21:09, Stephen Rothwell wrote: > > Hi all, > > > > Changes since 20130211: > > > > > when CONFIG_PCI is not enabled (on x86_64): > > CC [M] drivers/gpu/drm/drm_pci.o > drivers/gpu/drm/drm_pci.c: In function 'drm_pcie_get_speed_cap_mask': > drivers/gpu/drm/drm_pci.c:485:2: error: implicit declaration of function 'pcie_capability_read_dword' [-Werror=implicit-function-declaration] > cc1: some warnings being treated as errors > make[4]: *** [drivers/gpu/drm/drm_pci.o] Error 1 This one is my fault. I sent the following patch to Dave to fix it up. commit ed0708e69f71fab656afc1c891f3c54c9b105664 Author: Bjorn Helgaas Date: Fri Feb 8 15:18:35 2013 -0700 drm/pci: define drm_pcie_get_speed_cap_mask() only when CONFIG_PCI=y Move drm_pcie_get_speed_cap_mask() under #ifdef CONFIG_PCI because it it used only for PCI devices (evergreen, r600, r770), and it uses PCI interfaces that only exist when CONFIG_PCI=y. Previously, we tried to compile drm_pcie_get_speed_cap_mask() even when CONFIG_PCI=n, which fails. Tested-by: Fengguang Wu Signed-off-by: Bjorn Helgaas diff --git a/drivers/gpu/drm/drm_pci.c b/drivers/gpu/drm/drm_pci.c index 754bc96..2b818c7 100644 --- a/drivers/gpu/drm/drm_pci.c +++ b/drivers/gpu/drm/drm_pci.c @@ -439,33 +439,6 @@ int drm_pci_init(struct drm_driver *driver, struct pci_driver *pdriver) return 0; } -#else - -int drm_pci_init(struct drm_driver *driver, struct pci_driver *pdriver) -{ - return -1; -} - -#endif - -EXPORT_SYMBOL(drm_pci_init); - -/*@}*/ -void drm_pci_exit(struct drm_driver *driver, struct pci_driver *pdriver) -{ - struct drm_device *dev, *tmp; - DRM_DEBUG("\n"); - - if (driver->driver_features & DRIVER_MODESET) { - pci_unregister_driver(pdriver); - } else { - list_for_each_entry_safe(dev, tmp, &driver->device_list, driver_item) - drm_put_dev(dev); - } - DRM_INFO("Module unloaded\n"); -} -EXPORT_SYMBOL(drm_pci_exit); - int drm_pcie_get_speed_cap_mask(struct drm_device *dev, u32 *mask) { struct pci_dev *root; @@ -514,3 +487,30 @@ int drm_pcie_get_speed_cap_mask(struct drm_device *dev, u32 *mask) return 0; } EXPORT_SYMBOL(drm_pcie_get_speed_cap_mask); + +#else + +int drm_pci_init(struct drm_driver *driver, struct pci_driver *pdriver) +{ + return -1; +} + +#endif + +EXPORT_SYMBOL(drm_pci_init); + +/*@}*/ +void drm_pci_exit(struct drm_driver *driver, struct pci_driver *pdriver) +{ + struct drm_device *dev, *tmp; + DRM_DEBUG("\n"); + + if (driver->driver_features & DRIVER_MODESET) { + pci_unregister_driver(pdriver); + } else { + list_for_each_entry_safe(dev, tmp, &driver->device_list, driver_item) + drm_put_dev(dev); + } + DRM_INFO("Module unloaded\n"); +} +EXPORT_SYMBOL(drm_pci_exit);