All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Christian König" <deathsimple-ANTagKRnAhcb1SvskN2V4Q@public.gmane.org>
To: Junwei Zhang <Jerry.Zhang-5C7GfCeVMHo@public.gmane.org>,
	alexander.deucher-5C7GfCeVMHo@public.gmane.org
Cc: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
Subject: Re: [PATCH] drm/amdgpu: fix amdgpu_vm warning
Date: Thu, 6 Apr 2017 16:03:55 +0200	[thread overview]
Message-ID: <9a03821d-09f4-2b69-543d-e2e460c9b67a@vodafone.de> (raw)
In-Reply-To: <1491487600-22722-1-git-send-email-Jerry.Zhang-5C7GfCeVMHo@public.gmane.org>

Am 06.04.2017 um 16:06 schrieb Junwei Zhang:
> drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c: In function
> 'amdgpu_vm_bo_update_mapping':
>>> drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c:1207:20: warning:
> comparison of distinct pointer types lacks a cast [enabled by default]
>
> Signed-off-by: Junwei Zhang <Jerry.Zhang@amd.com>
> ---
>   drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
> index bc2650ef..2209a6a 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
> @@ -1204,7 +1204,7 @@ static int amdgpu_vm_bo_update_mapping(struct amdgpu_device *adev,
>   	 * reserve space for one command every (1 << BLOCK_SIZE)
>   	 *  entries or 2k dwords (whatever is smaller)
>   	 */
> -	ncmds = (nptes >> min(adev->vm_manager.block_size, 11)) + 1;
> +	ncmds = (nptes >> min(adev->vm_manager.block_size, (uint32_t)11)) + 1;

Writing this as "11u" should be sufficient as well and is more convenient.

With that fixed Reviewed-by: Christian König <christian.koenig@amd.com>.

Regards,
Christian.

>   
>   	/* padding, etc. */
>   	ndw = 64;


_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

  parent reply	other threads:[~2017-04-06 14:03 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-06 14:06 [PATCH] drm/amdgpu: fix amdgpu_vm warning Junwei Zhang
     [not found] ` <1491487600-22722-1-git-send-email-Jerry.Zhang-5C7GfCeVMHo@public.gmane.org>
2017-04-06 14:03   ` Christian König [this message]
     [not found]     ` <9a03821d-09f4-2b69-543d-e2e460c9b67a-ANTagKRnAhcb1SvskN2V4Q@public.gmane.org>
2017-04-06 14:19       ` Zhang, Jerry

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9a03821d-09f4-2b69-543d-e2e460c9b67a@vodafone.de \
    --to=deathsimple-antagkrnahcb1svskn2v4q@public.gmane.org \
    --cc=Jerry.Zhang-5C7GfCeVMHo@public.gmane.org \
    --cc=alexander.deucher-5C7GfCeVMHo@public.gmane.org \
    --cc=amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.