diff mbox

[05/10] drm: Give drm_agp_clear drm_legacy_ prefix

Message ID 1459331120-27864-6-git-send-email-daniel.vetter@ffwll.ch (mailing list archive)
State New, archived
Headers show

Commit Message

Daniel Vetter March 30, 2016, 9:45 a.m. UTC
It has a  DRIVER_MODESET check to sure make it's not creating havoc
for drm drivers. Make that clear in the name too.

Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
---
 drivers/gpu/drm/drm_agpsupport.c | 4 ++--
 drivers/gpu/drm/drm_fops.c       | 2 +-
 drivers/gpu/drm/drm_pci.c        | 2 +-
 include/drm/drm_agpsupport.h     | 2 +-
 4 files changed, 5 insertions(+), 5 deletions(-)

Comments

kernel test robot March 30, 2016, 10:09 a.m. UTC | #1
Hi Daniel,

[auto build test ERROR on drm/drm-next]
[also build test ERROR on v4.6-rc1 next-20160330]
[if your patch is applied to the wrong git tree, please drop us a note to help improving the system]

url:    https://github.com/0day-ci/linux/commits/Daniel-Vetter/Another-shot-at-cruft-removal/20160330-174803
base:   git://people.freedesktop.org/~airlied/linux.git drm-next
config: sparc64-allmodconfig (attached as .config)
reproduce:
        wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # save the attached .config to linux build tree
        make.cross ARCH=sparc64 

Note: the linux-review/Daniel-Vetter/Another-shot-at-cruft-removal/20160330-174803 HEAD 0ef75daff5d81f77ebd5796d853c534749223b2e builds fine.
      It only hurts bisectibility.

All errors (new ones prefixed by >>):

   drivers/gpu/drm/drm_fops.c: In function 'drm_lastclose':
>> drivers/gpu/drm/drm_fops.c:416:2: error: implicit declaration of function 'drm_legacy_agp_clear' [-Werror=implicit-function-declaration]
     drm_legacy_agp_clear(dev);
     ^
   cc1: some warnings being treated as errors
--
   drivers/gpu/drm/drm_pci.c: In function 'drm_pci_agp_destroy':
>> drivers/gpu/drm/drm_pci.c:253:3: error: implicit declaration of function 'drm_legacy_agp_clear' [-Werror=implicit-function-declaration]
      drm_legacy_agp_clear(dev);
      ^
   cc1: some warnings being treated as errors

vim +/drm_legacy_agp_clear +416 drivers/gpu/drm/drm_fops.c

   410	
   411		if (dev->irq_enabled && !drm_core_check_feature(dev, DRIVER_MODESET))
   412			drm_irq_uninstall(dev);
   413	
   414		mutex_lock(&dev->struct_mutex);
   415	
 > 416		drm_legacy_agp_clear(dev);
   417	
   418		drm_legacy_sg_cleanup(dev);
   419		drm_legacy_vma_flush(dev);

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation
Thierry Reding March 30, 2016, 12:59 p.m. UTC | #2
On Wed, Mar 30, 2016 at 06:09:04PM +0800, kbuild test robot wrote:
> Hi Daniel,
> 
> [auto build test ERROR on drm/drm-next]
> [also build test ERROR on v4.6-rc1 next-20160330]
> [if your patch is applied to the wrong git tree, please drop us a note to help improving the system]
> 
> url:    https://github.com/0day-ci/linux/commits/Daniel-Vetter/Another-shot-at-cruft-removal/20160330-174803
> base:   git://people.freedesktop.org/~airlied/linux.git drm-next
> config: sparc64-allmodconfig (attached as .config)
> reproduce:
>         wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross
>         chmod +x ~/bin/make.cross
>         # save the attached .config to linux build tree
>         make.cross ARCH=sparc64 
> 
> Note: the linux-review/Daniel-Vetter/Another-shot-at-cruft-removal/20160330-174803 HEAD 0ef75daff5d81f77ebd5796d853c534749223b2e builds fine.
>       It only hurts bisectibility.
> 
> All errors (new ones prefixed by >>):
> 
>    drivers/gpu/drm/drm_fops.c: In function 'drm_lastclose':
> >> drivers/gpu/drm/drm_fops.c:416:2: error: implicit declaration of function 'drm_legacy_agp_clear' [-Werror=implicit-function-declaration]
>      drm_legacy_agp_clear(dev);
>      ^
>    cc1: some warnings being treated as errors
> --
>    drivers/gpu/drm/drm_pci.c: In function 'drm_pci_agp_destroy':
> >> drivers/gpu/drm/drm_pci.c:253:3: error: implicit declaration of function 'drm_legacy_agp_clear' [-Werror=implicit-function-declaration]
>       drm_legacy_agp_clear(dev);
>       ^
>    cc1: some warnings being treated as errors
> 
> vim +/drm_legacy_agp_clear +416 drivers/gpu/drm/drm_fops.c
> 
>    410	
>    411		if (dev->irq_enabled && !drm_core_check_feature(dev, DRIVER_MODESET))
>    412			drm_irq_uninstall(dev);
>    413	
>    414		mutex_lock(&dev->struct_mutex);
>    415	
>  > 416		drm_legacy_agp_clear(dev);
>    417	
>    418		drm_legacy_sg_cleanup(dev);
>    419		drm_legacy_vma_flush(dev);

FWIW, this is because the dummy implementation wasn't renamed.

Thierry
diff mbox

Patch

diff --git a/drivers/gpu/drm/drm_agpsupport.c b/drivers/gpu/drm/drm_agpsupport.c
index a10ea6aec629..605bd243fb36 100644
--- a/drivers/gpu/drm/drm_agpsupport.c
+++ b/drivers/gpu/drm/drm_agpsupport.c
@@ -423,7 +423,7 @@  struct drm_agp_head *drm_agp_init(struct drm_device *dev)
 }
 
 /**
- * drm_agp_clear - Clear AGP resource list
+ * drm_legacy_agp_clear - Clear AGP resource list
  * @dev: DRM device
  *
  * Iterate over all AGP resources and remove them. But keep the AGP head
@@ -434,7 +434,7 @@  struct drm_agp_head *drm_agp_init(struct drm_device *dev)
  * resources from getting destroyed. Drivers are responsible of cleaning them up
  * during device shutdown.
  */
-void drm_agp_clear(struct drm_device *dev)
+void drm_legacy_agp_clear(struct drm_device *dev)
 {
 	struct drm_agp_mem *entry, *tempe;
 
diff --git a/drivers/gpu/drm/drm_fops.c b/drivers/gpu/drm/drm_fops.c
index aeef58ed359b..7b5a13cda7a6 100644
--- a/drivers/gpu/drm/drm_fops.c
+++ b/drivers/gpu/drm/drm_fops.c
@@ -413,7 +413,7 @@  int drm_lastclose(struct drm_device * dev)
 
 	mutex_lock(&dev->struct_mutex);
 
-	drm_agp_clear(dev);
+	drm_legacy_agp_clear(dev);
 
 	drm_legacy_sg_cleanup(dev);
 	drm_legacy_vma_flush(dev);
diff --git a/drivers/gpu/drm/drm_pci.c b/drivers/gpu/drm/drm_pci.c
index a1fff1179a97..29d5a548d07a 100644
--- a/drivers/gpu/drm/drm_pci.c
+++ b/drivers/gpu/drm/drm_pci.c
@@ -250,7 +250,7 @@  void drm_pci_agp_destroy(struct drm_device *dev)
 {
 	if (dev->agp) {
 		arch_phys_wc_del(dev->agp->agp_mtrr);
-		drm_agp_clear(dev);
+		drm_legacy_agp_clear(dev);
 		kfree(dev->agp);
 		dev->agp = NULL;
 	}
diff --git a/include/drm/drm_agpsupport.h b/include/drm/drm_agpsupport.h
index 193ef19dfc5c..e134e9ca422b 100644
--- a/include/drm/drm_agpsupport.h
+++ b/include/drm/drm_agpsupport.h
@@ -37,7 +37,7 @@  struct agp_memory *drm_agp_bind_pages(struct drm_device *dev,
 				uint32_t type);
 
 struct drm_agp_head *drm_agp_init(struct drm_device *dev);
-void drm_agp_clear(struct drm_device *dev);
+void drm_legacy_agp_clear(struct drm_device *dev);
 int drm_agp_acquire(struct drm_device *dev);
 int drm_agp_acquire_ioctl(struct drm_device *dev, void *data,
 			  struct drm_file *file_priv);