All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Zhang, Jerry" <Jerry.Zhang-5C7GfCeVMHo@public.gmane.org>
To: "Christian König" <deathsimple-ANTagKRnAhcb1SvskN2V4Q@public.gmane.org>
Cc: "Zhang, Jerry" <Jerry.Zhang-5C7GfCeVMHo@public.gmane.org>,
	"Deucher,
	Alexander" <Alexander.Deucher-5C7GfCeVMHo@public.gmane.org>,
	"amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org"
	<amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org>
Subject: Re: [PATCH] drm/amdgpu: fix amdgpu_vm warning
Date: Thu, 6 Apr 2017 14:19:20 +0000	[thread overview]
Message-ID: <BE8EC3A7-889B-48CE-8ED2-0044E4171495@amd.com> (raw)
In-Reply-To: <9a03821d-09f4-2b69-543d-e2e460c9b67a-ANTagKRnAhcb1SvskN2V4Q@public.gmane.org>


> 在 2017年4月6日,22:03,Christian König <deathsimple@vodafone.de> 写道:
> 
> 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.

Good point.
Will update.

Jerry

> 
> 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:19 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
     [not found]     ` <9a03821d-09f4-2b69-543d-e2e460c9b67a-ANTagKRnAhcb1SvskN2V4Q@public.gmane.org>
2017-04-06 14:19       ` Zhang, Jerry [this message]

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=BE8EC3A7-889B-48CE-8ED2-0044E4171495@amd.com \
    --to=jerry.zhang-5c7gfcevmho@public.gmane.org \
    --cc=Alexander.Deucher-5C7GfCeVMHo@public.gmane.org \
    --cc=amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
    --cc=deathsimple-ANTagKRnAhcb1SvskN2V4Q@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.