drm/nouveau/disp/nv50-gp10x: fix coverity warning
authorBen Skeggs <bskeggs@redhat.com>
Thu, 14 Jun 2018 22:02:33 +0000 (08:02 +1000)
committerBen Skeggs <bskeggs@redhat.com>
Mon, 16 Jul 2018 08:06:29 +0000 (18:06 +1000)
Change values to u32, there's no need for them to be 64-bit.

Reported-by: Colin Ian King <colin.king@canonical.com>
Suggested-by: Ilia Mirkin <imirkin@alum.mit.edu>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
drivers/gpu/drm/nouveau/nvkm/engine/disp/changf119.c
drivers/gpu/drm/nouveau/nvkm/engine/disp/channv50.c

index 29e6dd58ac48ccc896d93eee82201fe5126ae174..525f95d064290d9971876fa8d307dd7fb5c98e6b 100644 (file)
@@ -52,7 +52,7 @@ void
 gf119_disp_chan_intr(struct nv50_disp_chan *chan, bool en)
 {
        struct nvkm_device *device = chan->disp->base.engine.subdev.device;
-       const u64 mask = 0x00000001 << chan->chid.user;
+       const u32 mask = 0x00000001 << chan->chid.user;
        if (!en) {
                nvkm_mask(device, 0x610090, mask, 0x00000000);
                nvkm_mask(device, 0x6100a0, mask, 0x00000000);
index 57719f675eec92ae32640cd0cd160c5cef481bae..bcf32d92ee5a9ec28de558715566e5eccc89432a 100644 (file)
@@ -166,8 +166,8 @@ void
 nv50_disp_chan_intr(struct nv50_disp_chan *chan, bool en)
 {
        struct nvkm_device *device = chan->disp->base.engine.subdev.device;
-       const u64 mask = 0x00010001 << chan->chid.user;
-       const u64 data = en ? 0x00010000 : 0x00000000;
+       const u32 mask = 0x00010001 << chan->chid.user;
+       const u32 data = en ? 0x00010000 << chan->chid.user : 0x00000000;
        nvkm_mask(device, 0x610028, mask, data);
 }