diff mbox series

drm/i915/gem: Mark private i915_gem_stolen functions as static

Message ID 20210115142623.29897-1-chris@chris-wilson.co.uk (mailing list archive)
State New, archived
Headers show
Series drm/i915/gem: Mark private i915_gem_stolen functions as static | expand

Commit Message

Chris Wilson Jan. 15, 2021, 2:26 p.m. UTC
drivers/gpu/drm/i915/gem/i915_gem_stolen.c:624:5: error: no previous prototype for ‘__i915_gem_object_create_stolen’ [-Werror=missing-prototypes]
 int __i915_gem_object_create_stolen(struct intel_memory_region *mem,
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/i915/gem/i915_gem_stolen.c:649:5: error: no previous prototype for ‘_i915_gem_object_stolen_init’ [-Werror=missing-prototypes]
 int _i915_gem_object_stolen_init(struct intel_memory_region *mem,
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Matthew Auld <matthew.auld@intel.com>
---
 drivers/gpu/drm/i915/gem/i915_gem_stolen.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

Comments

Rodrigo Vivi Jan. 15, 2021, 3:56 p.m. UTC | #1
On Fri, Jan 15, 2021 at 02:26:23PM +0000, Chris Wilson wrote:
> drivers/gpu/drm/i915/gem/i915_gem_stolen.c:624:5: error: no previous prototype for ‘__i915_gem_object_create_stolen’ [-Werror=missing-prototypes]
>  int __i915_gem_object_create_stolen(struct intel_memory_region *mem,
>      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> drivers/gpu/drm/i915/gem/i915_gem_stolen.c:649:5: error: no previous prototype for ‘_i915_gem_object_stolen_init’ [-Werror=missing-prototypes]
>  int _i915_gem_object_stolen_init(struct intel_memory_region *mem,
>      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
> 
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Matthew Auld <matthew.auld@intel.com>

Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>

> ---
>  drivers/gpu/drm/i915/gem/i915_gem_stolen.c | 14 +++++++-------
>  1 file changed, 7 insertions(+), 7 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/gem/i915_gem_stolen.c b/drivers/gpu/drm/i915/gem/i915_gem_stolen.c
> index 27d95bddbf4d..b221492531ef 100644
> --- a/drivers/gpu/drm/i915/gem/i915_gem_stolen.c
> +++ b/drivers/gpu/drm/i915/gem/i915_gem_stolen.c
> @@ -621,9 +621,9 @@ static const struct drm_i915_gem_object_ops i915_gem_object_stolen_ops = {
>  	.release = i915_gem_object_release_stolen,
>  };
>  
> -int __i915_gem_object_create_stolen(struct intel_memory_region *mem,
> -				    struct drm_i915_gem_object *obj,
> -				    struct drm_mm_node *stolen)
> +static int __i915_gem_object_create_stolen(struct intel_memory_region *mem,
> +					   struct drm_i915_gem_object *obj,
> +					   struct drm_mm_node *stolen)
>  {
>  	static struct lock_class_key lock_class;
>  	unsigned int cache_level;
> @@ -646,10 +646,10 @@ int __i915_gem_object_create_stolen(struct intel_memory_region *mem,
>  	return 0;
>  }
>  
> -int _i915_gem_object_stolen_init(struct intel_memory_region *mem,
> -				 struct drm_i915_gem_object *obj,
> -				 resource_size_t size,
> -				 unsigned int flags)
> +static int _i915_gem_object_stolen_init(struct intel_memory_region *mem,
> +					struct drm_i915_gem_object *obj,
> +					resource_size_t size,
> +					unsigned int flags)
>  {
>  	struct drm_i915_private *i915 = mem->i915;
>  	struct drm_mm_node *stolen;
> -- 
> 2.20.1
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
diff mbox series

Patch

diff --git a/drivers/gpu/drm/i915/gem/i915_gem_stolen.c b/drivers/gpu/drm/i915/gem/i915_gem_stolen.c
index 27d95bddbf4d..b221492531ef 100644
--- a/drivers/gpu/drm/i915/gem/i915_gem_stolen.c
+++ b/drivers/gpu/drm/i915/gem/i915_gem_stolen.c
@@ -621,9 +621,9 @@  static const struct drm_i915_gem_object_ops i915_gem_object_stolen_ops = {
 	.release = i915_gem_object_release_stolen,
 };
 
-int __i915_gem_object_create_stolen(struct intel_memory_region *mem,
-				    struct drm_i915_gem_object *obj,
-				    struct drm_mm_node *stolen)
+static int __i915_gem_object_create_stolen(struct intel_memory_region *mem,
+					   struct drm_i915_gem_object *obj,
+					   struct drm_mm_node *stolen)
 {
 	static struct lock_class_key lock_class;
 	unsigned int cache_level;
@@ -646,10 +646,10 @@  int __i915_gem_object_create_stolen(struct intel_memory_region *mem,
 	return 0;
 }
 
-int _i915_gem_object_stolen_init(struct intel_memory_region *mem,
-				 struct drm_i915_gem_object *obj,
-				 resource_size_t size,
-				 unsigned int flags)
+static int _i915_gem_object_stolen_init(struct intel_memory_region *mem,
+					struct drm_i915_gem_object *obj,
+					resource_size_t size,
+					unsigned int flags)
 {
 	struct drm_i915_private *i915 = mem->i915;
 	struct drm_mm_node *stolen;