[PATCH 04/40] drm/amd/amdgpu/amdgpu_drv: Move 'amdgpu_info_ioctl()'s prototype to shared header

Lee Jones lee.jones at linaro.org
Wed Nov 18 10:24:19 UTC 2020


On Fri, 13 Nov 2020, Alex Deucher wrote:

> On Fri, Nov 13, 2020 at 8:49 AM Lee Jones <lee.jones at linaro.org> wrote:
> >
> > Fixes the following W=1 kernel build warning(s):
> >
> >  drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c:486:5: warning: no previous prototype for ‘amdgpu_info_ioctl’ [-Wmissing-prototypes]
> >  486 | int amdgpu_info_ioctl(struct drm_device *dev, void *data, struct drm_file *filp)
> >  | ^~~~~~~~~~~~~~~~~
> >
> > Cc: Alex Deucher <alexander.deucher at amd.com>
> > Cc: "Christian König" <christian.koenig at amd.com>
> > Cc: David Airlie <airlied at linux.ie>
> > Cc: Daniel Vetter <daniel at ffwll.ch>
> > Cc: amd-gfx at lists.freedesktop.org
> > Cc: dri-devel at lists.freedesktop.org
> > Signed-off-by: Lee Jones <lee.jones at linaro.org>
> 
> Luben already sent a patch to fix this one.  I'll be picking up that one.

FYI: Looks like this is still broken in today's -next.

> > ---
> >  drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c |  4 +---
> >  drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c |  1 +
> >  drivers/gpu/drm/amd/amdgpu/amdgpu_kms.h | 31 +++++++++++++++++++++++++
> >  3 files changed, 33 insertions(+), 3 deletions(-)
> >  create mode 100644 drivers/gpu/drm/amd/amdgpu/amdgpu_kms.h
> >
> > diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
> > index 1dfea15bbec36..afd357df0f886 100644
> > --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
> > +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
> > @@ -43,7 +43,7 @@
> >  #include "amdgpu_sched.h"
> >
> >  #include "amdgpu_amdkfd.h"
> > -
> > +#include "amdgpu_kms.h"
> >  #include "amdgpu_ras.h"
> >
> >  /*
> > @@ -1521,8 +1521,6 @@ int amdgpu_file_to_fpriv(struct file *filp, struct amdgpu_fpriv **fpriv)
> >         return 0;
> >  }
> >
> > -int amdgpu_info_ioctl(struct drm_device *dev, void *data, struct drm_file *filp);
> > -
> >  const struct drm_ioctl_desc amdgpu_ioctls_kms[] = {
> >         DRM_IOCTL_DEF_DRV(AMDGPU_GEM_CREATE, amdgpu_gem_create_ioctl, DRM_AUTH|DRM_RENDER_ALLOW),
> >         DRM_IOCTL_DEF_DRV(AMDGPU_CTX, amdgpu_ctx_ioctl, DRM_AUTH|DRM_RENDER_ALLOW),
> > diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
> > index 98721ae931841..54c4ee6d230d8 100644
> > --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
> > +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
> > @@ -41,6 +41,7 @@
> >  #include "amdgpu_amdkfd.h"
> >  #include "amdgpu_gem.h"
> >  #include "amdgpu_display.h"
> > +#include "amdgpu_kms.h"
> >  #include "amdgpu_ras.h"
> >
> >  void amdgpu_unregister_gpu_instance(struct amdgpu_device *adev)
> > diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.h
> > new file mode 100644
> > index 0000000000000..f3111aef76cae
> > --- /dev/null
> > +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.h
> > @@ -0,0 +1,31 @@
> > +/* amdgpu_kms.h -- Private header for radeon driver -*- linux-c -*-
> > + *
> > + * Copyright 2008 Advanced Micro Devices, Inc.
> > + * Copyright 2008 Red Hat Inc.
> > + * Copyright 2009 Jerome Glisse.
> > + *
> > + * Permission is hereby granted, free of charge, to any person obtaining a
> > + * copy of this software and associated documentation files (the "Software"),
> > + * to deal in the Software without restriction, including without limitation
> > + * the rights to use, copy, modify, merge, publish, distribute, sublicense,
> > + * and/or sell copies of the Software, and to permit persons to whom the
> > + * Software is furnished to do so, subject to the following conditions:
> > + *
> > + * The above copyright notice and this permission notice shall be included in
> > + * all copies or substantial portions of the Software.
> > + *
> > + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
> > + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
> > + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
> > + * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
> > + * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
> > + * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
> > + * OTHER DEALINGS IN THE SOFTWARE.
> > + */
> > +
> > +#ifndef __AMDGPU_KMS_H__
> > +#define __AMDGPU_KMS_H__
> > +
> > +int amdgpu_info_ioctl(struct drm_device *dev, void *data, struct drm_file *filp);
> > +
> > +#endif                         /* __AMDGPU_KMS_H__ */
> >
> > _______________________________________________
> > dri-devel mailing list
> > dri-devel at lists.freedesktop.org
> > https://lists.freedesktop.org/mailman/listinfo/dri-devel

-- 
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog


More information about the amd-gfx mailing list