From: Dan Carpenter <dan.carpenter@oracle.com>
To: "Zhou, David(ChunMing)" <David1.Zhou@amd.com>
Cc: "dri-devel@lists.freedesktop.org" <dri-devel@lists.freedesktop.org>
Subject: Re: drm/amdgpu: implement cgs gpu memory callbacks
Date: Mon, 24 Aug 2015 22:51:08 +0300 [thread overview]
Message-ID: <20150824195108.GT5610@mwanda> (raw)
In-Reply-To: <D36C73F882E55E4099382C5DF018E8252FCAA643@SCYBEXDAG01.amd.com>
On Mon, Aug 24, 2015 at 07:09:15AM +0000, Zhou, David(ChunMing) wrote:
> Hi Dan,
> Thanks for figuring out that.
> > 274 min_offset = obj->placements[0].fpfn << PAGE_SHIFT;
> > 275 max_offset = obj->placements[0].lpfn << PAGE_SHIFT;
> Maybe should be:
> min_offset = obj->placements[0].fpfn;
> min_offset <<= PAGE_SHIFT;
> max_offset = obj->placements[0].lpfn;
> max_offset <<= PAGE_SHIFT;
It's probably just simpler to be:
min_offset = (u64)obj->placements[0].fpfn << PAGE_SHIFT;
max_offset = (u64)obj->placements[0].lpfn << PAGE_SHIFT;
But the larger questions aer why is min_offset a u64, and can the shift
actually wrap? I'm just looking at static checker warnings, and I'm
not very familiar with this code so I don't know the answers.
regards,
dan carpenter
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2015-08-24 19:51 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-21 16:23 drm/amdgpu: implement cgs gpu memory callbacks Dan Carpenter
2015-08-24 7:09 ` Zhou, David(ChunMing)
2015-08-24 19:51 ` Dan Carpenter [this message]
2015-08-25 2:07 ` Zhou, David(ChunMing)
2015-08-25 5:50 ` Dan Carpenter
2015-08-25 6:00 ` Zhou, David(ChunMing)
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=20150824195108.GT5610@mwanda \
--to=dan.carpenter@oracle.com \
--cc=David1.Zhou@amd.com \
--cc=dri-devel@lists.freedesktop.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.