[Nouveau] [bug report] drm/nouveau/disp/nv50-: add channel interfaces to control error interrupts

Ilia Mirkin imirkin at alum.mit.edu
Tue Jun 26 11:54:47 UTC 2018


On Tue, Jun 26, 2018, 04:49 Dan Carpenter <dan.carpenter at oracle.com> wrote:

> Hello Ben Skeggs,
>
> The patch a9c44a88ca2f: "drm/nouveau/disp/nv50-: add channel
> interfaces to control error interrupts" from May 8, 2018, leads to
> the following static checker warning:
>
>         drivers/gpu/drm/nouveau/nvkm/engine/disp/channv50.c:169
> nv50_disp_chan_intr()
>         warn: should '65537 << chan->chid.user' be a 64 bit type?
>
> drivers/gpu/drm/nouveau/nvkm/engine/disp/channv50.c
>    165  void
>    166  nv50_disp_chan_intr(struct nv50_disp_chan *chan, bool en)
>    167  {
>    168          struct nvkm_device *device =
> chan->disp->base.engine.subdev.device;
>    169          const u64 mask = 0x00010001 << chan->chid.user;
>                                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> Can this shift wrap?
>

This should be a u32, not u64. Same for mask below. The value of user is
<16.


>    170          const u64 data = en ? 0x00010000 : 0x00000000;
>

Ben, is this a bug? Shouldn't this also be shifted?

   171          nvkm_mask(device, 0x610028, mask, data);

   172  }
>
> regards,
> dan carpenter
> _______________________________________________
> Nouveau mailing list
> Nouveau at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/nouveau
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/nouveau/attachments/20180626/2198a351/attachment.html>


More information about the Nouveau mailing list