linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH][drm-next] drm/radeon: make functions alloc_pasid and free_pasid static
@ 2017-09-28 13:46 Colin King
  2017-09-29 20:13 ` Alex Deucher
  0 siblings, 1 reply; 2+ messages in thread
From: Colin King @ 2017-09-28 13:46 UTC (permalink / raw)
  To: Oded Gabbay, Alex Deucher, Christian König, David Airlie,
	dri-devel, amd-gfx
  Cc: kernel-janitors, linux-kernel

From: Colin Ian King <colin.king@canonical.com>

The functions alloc_pasid  and free_pasid are local to the
source and do not need to be in global scope, so make them static.

Cleans up sparse warnings:
warning: symbol 'alloc_pasid' was not declared. Should it be static?
warning: symbol 'free_pasid' was not declared. Should it be static?

Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 drivers/gpu/drm/radeon/radeon_kfd.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/radeon/radeon_kfd.c b/drivers/gpu/drm/radeon/radeon_kfd.c
index a2ac8ac0930d..385b4d76956d 100644
--- a/drivers/gpu/drm/radeon/radeon_kfd.c
+++ b/drivers/gpu/drm/radeon/radeon_kfd.c
@@ -352,7 +352,7 @@ static uint32_t get_max_engine_clock_in_mhz(struct kgd_dev *kgd)
  */
 static DEFINE_IDA(pasid_ida);
 
-int alloc_pasid(unsigned int bits)
+static int alloc_pasid(unsigned int bits)
 {
 	int pasid = -EINVAL;
 
@@ -367,7 +367,7 @@ int alloc_pasid(unsigned int bits)
 	return pasid;
 }
 
-void free_pasid(unsigned int pasid)
+static void free_pasid(unsigned int pasid)
 {
 	ida_simple_remove(&pasid_ida, pasid);
 }
-- 
2.14.1

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH][drm-next] drm/radeon: make functions alloc_pasid and free_pasid static
  2017-09-28 13:46 [PATCH][drm-next] drm/radeon: make functions alloc_pasid and free_pasid static Colin King
@ 2017-09-29 20:13 ` Alex Deucher
  0 siblings, 0 replies; 2+ messages in thread
From: Alex Deucher @ 2017-09-29 20:13 UTC (permalink / raw)
  To: Colin King
  Cc: Oded Gabbay, Alex Deucher, Christian König, David Airlie,
	Maling list - DRI developers, amd-gfx list, kernel-janitors,
	LKML

On Thu, Sep 28, 2017 at 9:46 AM, Colin King <colin.king@canonical.com> wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> The functions alloc_pasid  and free_pasid are local to the
> source and do not need to be in global scope, so make them static.
>
> Cleans up sparse warnings:
> warning: symbol 'alloc_pasid' was not declared. Should it be static?
> warning: symbol 'free_pasid' was not declared. Should it be static?
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>

Applied.  thanks!

Alex


> ---
>  drivers/gpu/drm/radeon/radeon_kfd.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/radeon/radeon_kfd.c b/drivers/gpu/drm/radeon/radeon_kfd.c
> index a2ac8ac0930d..385b4d76956d 100644
> --- a/drivers/gpu/drm/radeon/radeon_kfd.c
> +++ b/drivers/gpu/drm/radeon/radeon_kfd.c
> @@ -352,7 +352,7 @@ static uint32_t get_max_engine_clock_in_mhz(struct kgd_dev *kgd)
>   */
>  static DEFINE_IDA(pasid_ida);
>
> -int alloc_pasid(unsigned int bits)
> +static int alloc_pasid(unsigned int bits)
>  {
>         int pasid = -EINVAL;
>
> @@ -367,7 +367,7 @@ int alloc_pasid(unsigned int bits)
>         return pasid;
>  }
>
> -void free_pasid(unsigned int pasid)
> +static void free_pasid(unsigned int pasid)
>  {
>         ida_simple_remove(&pasid_ida, pasid);
>  }
> --
> 2.14.1
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-09-29 20:13 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-09-28 13:46 [PATCH][drm-next] drm/radeon: make functions alloc_pasid and free_pasid static Colin King
2017-09-29 20:13 ` Alex Deucher

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).