diff mbox series

[09/43] drm/radeon/rv770: Move 'rv770_set_clk_bypass_mode' prototype to shared location

Message ID 20201116173005.1825880-10-lee.jones@linaro.org
State Superseded
Headers show
Series Rid W=1 warnings from GPU | expand

Commit Message

Lee Jones Nov. 16, 2020, 5:29 p.m. UTC
Fixes the following W=1 kernel build warning(s):

 drivers/gpu/drm/radeon/rv770.c:1138:6: warning: no previous prototype for ‘rv770_set_clk_bypass_mode’ [-Wmissing-prototypes]
 1138 | void rv770_set_clk_bypass_mode(struct radeon_device *rdev)
 | ^~~~~~~~~~~~~~~~~~~~~~~~~

Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: "Christian König" <christian.koenig@amd.com>
Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: amd-gfx@lists.freedesktop.org
Cc: dri-devel@lists.freedesktop.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/gpu/drm/radeon/evergreen.c |  2 +-
 drivers/gpu/drm/radeon/r600.c      |  2 +-
 drivers/gpu/drm/radeon/rv770.c     |  1 +
 drivers/gpu/drm/radeon/rv770.h     | 35 ++++++++++++++++++++++++++++++
 4 files changed, 38 insertions(+), 2 deletions(-)
 create mode 100644 drivers/gpu/drm/radeon/rv770.h

Comments

Alex Deucher Nov. 16, 2020, 7:42 p.m. UTC | #1
On Mon, Nov 16, 2020 at 12:30 PM Lee Jones <lee.jones@linaro.org> wrote:
>
> Fixes the following W=1 kernel build warning(s):
>
>  drivers/gpu/drm/radeon/rv770.c:1138:6: warning: no previous prototype for ‘rv770_set_clk_bypass_mode’ [-Wmissing-prototypes]
>  1138 | void rv770_set_clk_bypass_mode(struct radeon_device *rdev)
>  | ^~~~~~~~~~~~~~~~~~~~~~~~~
>
> Cc: Alex Deucher <alexander.deucher@amd.com>
> Cc: "Christian König" <christian.koenig@amd.com>
> Cc: David Airlie <airlied@linux.ie>
> Cc: Daniel Vetter <daniel@ffwll.ch>
> Cc: amd-gfx@lists.freedesktop.org
> Cc: dri-devel@lists.freedesktop.org
> Signed-off-by: Lee Jones <lee.jones@linaro.org>

Applied with minor changes.

Thanks!

Alex

> ---
>  drivers/gpu/drm/radeon/evergreen.c |  2 +-
>  drivers/gpu/drm/radeon/r600.c      |  2 +-
>  drivers/gpu/drm/radeon/rv770.c     |  1 +
>  drivers/gpu/drm/radeon/rv770.h     | 35 ++++++++++++++++++++++++++++++
>  4 files changed, 38 insertions(+), 2 deletions(-)
>  create mode 100644 drivers/gpu/drm/radeon/rv770.h
>
> diff --git a/drivers/gpu/drm/radeon/evergreen.c b/drivers/gpu/drm/radeon/evergreen.c
> index 1f2acca437abd..9a1e240b07234 100644
> --- a/drivers/gpu/drm/radeon/evergreen.c
> +++ b/drivers/gpu/drm/radeon/evergreen.c
> @@ -31,6 +31,7 @@
>
>  #include "atom.h"
>  #include "avivod.h"
> +#include "rv770.h"
>  #include "evergreen_blit_shaders.h"
>  #include "evergreen_reg.h"
>  #include "evergreend.h"
> @@ -223,7 +224,6 @@ extern u32 si_get_csb_size(struct radeon_device *rdev);
>  extern void si_get_csb_buffer(struct radeon_device *rdev, volatile u32 *buffer);
>  extern u32 cik_get_csb_size(struct radeon_device *rdev);
>  extern void cik_get_csb_buffer(struct radeon_device *rdev, volatile u32 *buffer);
> -extern void rv770_set_clk_bypass_mode(struct radeon_device *rdev);
>
>  static const u32 evergreen_golden_registers[] =
>  {
> diff --git a/drivers/gpu/drm/radeon/r600.c b/drivers/gpu/drm/radeon/r600.c
> index 12a918335ac7b..f09b6dc5cbeb3 100644
> --- a/drivers/gpu/drm/radeon/r600.c
> +++ b/drivers/gpu/drm/radeon/r600.c
> @@ -40,6 +40,7 @@
>  #include "atom.h"
>  #include "avivod.h"
>  #include "r600d.h"
> +#include "rv770.h"
>  #include "radeon.h"
>  #include "radeon_asic.h"
>  #include "radeon_audio.h"
> @@ -112,7 +113,6 @@ void r600_fini(struct radeon_device *rdev);
>  void r600_irq_disable(struct radeon_device *rdev);
>  static void r600_pcie_gen2_enable(struct radeon_device *rdev);
>  extern int evergreen_rlc_resume(struct radeon_device *rdev);
> -extern void rv770_set_clk_bypass_mode(struct radeon_device *rdev);
>
>  /*
>   * Indirect registers accessor
> diff --git a/drivers/gpu/drm/radeon/rv770.c b/drivers/gpu/drm/radeon/rv770.c
> index 21f653ae1e1bb..88e29ebaad467 100644
> --- a/drivers/gpu/drm/radeon/rv770.c
> +++ b/drivers/gpu/drm/radeon/rv770.c
> @@ -39,6 +39,7 @@
>  #include "radeon_asic.h"
>  #include "radeon_audio.h"
>  #include "rv770d.h"
> +#include "rv770.h"
>
>  #define R700_PFP_UCODE_SIZE 848
>  #define R700_PM4_UCODE_SIZE 1360
> diff --git a/drivers/gpu/drm/radeon/rv770.h b/drivers/gpu/drm/radeon/rv770.h
> new file mode 100644
> index 0000000000000..a3f2bb44979fe
> --- /dev/null
> +++ b/drivers/gpu/drm/radeon/rv770.h
> @@ -0,0 +1,35 @@
> +/* radeon_rv770.h -- Private header for radeon driver -*- linux-c -*-
> + *
> + * Copyright 1999 Precision Insight, Inc., Cedar Park, Texas.
> + * Copyright 2000 VA Linux Systems, Inc., Fremont, California.
> + * All rights reserved.
> + *
> + * 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 (including the next
> + * paragraph) 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
> + * PRECISION INSIGHT AND/OR ITS SUPPLIERS 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 __RADEON_RV770_H__
> +#define __RADEON_RV770_H__
> +
> +struct radeon_device;
> +
> +void rv770_set_clk_bypass_mode(struct radeon_device *rdev);
> +
> +#endif                         /* __RADEON_RV770_H__ */
> --
> 2.25.1
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
diff mbox series

Patch

diff --git a/drivers/gpu/drm/radeon/evergreen.c b/drivers/gpu/drm/radeon/evergreen.c
index 1f2acca437abd..9a1e240b07234 100644
--- a/drivers/gpu/drm/radeon/evergreen.c
+++ b/drivers/gpu/drm/radeon/evergreen.c
@@ -31,6 +31,7 @@ 
 
 #include "atom.h"
 #include "avivod.h"
+#include "rv770.h"
 #include "evergreen_blit_shaders.h"
 #include "evergreen_reg.h"
 #include "evergreend.h"
@@ -223,7 +224,6 @@  extern u32 si_get_csb_size(struct radeon_device *rdev);
 extern void si_get_csb_buffer(struct radeon_device *rdev, volatile u32 *buffer);
 extern u32 cik_get_csb_size(struct radeon_device *rdev);
 extern void cik_get_csb_buffer(struct radeon_device *rdev, volatile u32 *buffer);
-extern void rv770_set_clk_bypass_mode(struct radeon_device *rdev);
 
 static const u32 evergreen_golden_registers[] =
 {
diff --git a/drivers/gpu/drm/radeon/r600.c b/drivers/gpu/drm/radeon/r600.c
index 12a918335ac7b..f09b6dc5cbeb3 100644
--- a/drivers/gpu/drm/radeon/r600.c
+++ b/drivers/gpu/drm/radeon/r600.c
@@ -40,6 +40,7 @@ 
 #include "atom.h"
 #include "avivod.h"
 #include "r600d.h"
+#include "rv770.h"
 #include "radeon.h"
 #include "radeon_asic.h"
 #include "radeon_audio.h"
@@ -112,7 +113,6 @@  void r600_fini(struct radeon_device *rdev);
 void r600_irq_disable(struct radeon_device *rdev);
 static void r600_pcie_gen2_enable(struct radeon_device *rdev);
 extern int evergreen_rlc_resume(struct radeon_device *rdev);
-extern void rv770_set_clk_bypass_mode(struct radeon_device *rdev);
 
 /*
  * Indirect registers accessor
diff --git a/drivers/gpu/drm/radeon/rv770.c b/drivers/gpu/drm/radeon/rv770.c
index 21f653ae1e1bb..88e29ebaad467 100644
--- a/drivers/gpu/drm/radeon/rv770.c
+++ b/drivers/gpu/drm/radeon/rv770.c
@@ -39,6 +39,7 @@ 
 #include "radeon_asic.h"
 #include "radeon_audio.h"
 #include "rv770d.h"
+#include "rv770.h"
 
 #define R700_PFP_UCODE_SIZE 848
 #define R700_PM4_UCODE_SIZE 1360
diff --git a/drivers/gpu/drm/radeon/rv770.h b/drivers/gpu/drm/radeon/rv770.h
new file mode 100644
index 0000000000000..a3f2bb44979fe
--- /dev/null
+++ b/drivers/gpu/drm/radeon/rv770.h
@@ -0,0 +1,35 @@ 
+/* radeon_rv770.h -- Private header for radeon driver -*- linux-c -*-
+ *
+ * Copyright 1999 Precision Insight, Inc., Cedar Park, Texas.
+ * Copyright 2000 VA Linux Systems, Inc., Fremont, California.
+ * All rights reserved.
+ *
+ * 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 (including the next
+ * paragraph) 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
+ * PRECISION INSIGHT AND/OR ITS SUPPLIERS 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 __RADEON_RV770_H__
+#define __RADEON_RV770_H__
+
+struct radeon_device;
+
+void rv770_set_clk_bypass_mode(struct radeon_device *rdev);
+
+#endif				/* __RADEON_RV770_H__ */