Marcin Slusarz
2010-Jun-01 16:46 UTC
[Nouveau] "typo" in "drm/nv50: cast IGP memory location to u64 before shifting"
Hi This does not look right: diff --git a/drivers/gpu/drm/nouveau/nouveau_mem.c b/drivers/gpu/drm/nouveau/nouveau_mem.c index 775a701..c1fd42b 100644 --- a/drivers/gpu/drm/nouveau/nouveau_mem.c +++ b/drivers/gpu/drm/nouveau/nouveau_mem.c @@ -540,7 +540,8 @@ nouveau_mem_detect(struct drm_device *dev) dev_priv->vram_size = nv_rd32(dev, NV04_FIFO_DATA); dev_priv->vram_size &= NV10_FIFO_DATA_RAM_AMOUNT_MB_MASK; if (dev_priv->chipset == 0xaa || dev_priv->chipset == 0xac) - dev_priv->vram_sys_base = nv_rd32(dev, 0x100e10) << 12; + dev_priv->vram_sys_base = nv_rd32(dev, 0x100e10); + dev_priv->vram_sys_base <<= 12; } NV_INFO(dev, "Detected %dMiB VRAM\n", (int)(dev_priv->vram_size >> 20)); You forgot to add {} around these lines... Marcin
Ben Skeggs
2010-Jun-01 22:40 UTC
[Nouveau] "typo" in "drm/nv50: cast IGP memory location to u64 before shifting"
On Tue, 2010-06-01 at 18:46 +0200, Marcin Slusarz wrote:> Hi > > This does not look right: > > diff --git a/drivers/gpu/drm/nouveau/nouveau_mem.c b/drivers/gpu/drm/nouveau/nouveau_mem.c > index 775a701..c1fd42b 100644 > --- a/drivers/gpu/drm/nouveau/nouveau_mem.c > +++ b/drivers/gpu/drm/nouveau/nouveau_mem.c > @@ -540,7 +540,8 @@ nouveau_mem_detect(struct drm_device *dev) > dev_priv->vram_size = nv_rd32(dev, NV04_FIFO_DATA); > dev_priv->vram_size &= NV10_FIFO_DATA_RAM_AMOUNT_MB_MASK; > if (dev_priv->chipset == 0xaa || dev_priv->chipset == 0xac) > - dev_priv->vram_sys_base = nv_rd32(dev, 0x100e10) << 12; > + dev_priv->vram_sys_base = nv_rd32(dev, 0x100e10); > + dev_priv->vram_sys_base <<= 12; > } > > NV_INFO(dev, "Detected %dMiB VRAM\n", (int)(dev_priv->vram_size >> 20)); > > You forgot to add {} around these lines...Oops, fail. Luckily it doesn't actually matter at all in this case, but I've fixed it anyway. Thanks! Ben.> > Marcin > > _______________________________________________ > Nouveau mailing list > Nouveau at lists.freedesktop.org > http://lists.freedesktop.org/mailman/listinfo/nouveau
Apparently Analagous Threads
- [PATCH 3/8] virtio: do not export "u16" and "u64" to userspace
- [PATCH 3/8] virtio: do not export "u16" and "u64" to userspace
- [PATCH RESEND 2/3] Btrfs: use u64 for subvolid when parsing mount options
- [PATCH 05/15] ocfs2: Pass raw u64 to filldir
- [PATCH] btrfs-progs: cast u64 to long long to avoid printf warnings