Dan Carpenter
2018-Jul-03 11:51 UTC
[Nouveau] [bug report] drm/nouveau/disp/nv50-: add channel interfaces to control error interrupts
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/changf119.c:55 gf119_disp_chan_intr() warn: should '1 << chan->chid.user' be a 64 bit type? drivers/gpu/drm/nouveau/nvkm/engine/disp/changf119.c 51 void 52 gf119_disp_chan_intr(struct nv50_disp_chan *chan, bool en) 53 { 54 struct nvkm_device *device = chan->disp->base.engine.subdev.device; 55 const u64 mask = 0x00000001 << chan->chid.user; ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 56 if (!en) { 57 nvkm_mask(device, 0x610090, mask, 0x00000000); 58 nvkm_mask(device, 0x6100a0, mask, 0x00000000); 59 } else { 60 nvkm_mask(device, 0x6100a0, mask, mask); 61 } 62 } regards, dan carpenter
Ben Skeggs
2018-Jul-03 12:28 UTC
[Nouveau] [bug report] drm/nouveau/disp/nv50-: add channel interfaces to control error interrupts
On Tue, Jul 3, 2018 at 9:51 PM 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/changf119.c:55 gf119_disp_chan_intr() > warn: should '1 << chan->chid.user' be a 64 bit type?I have a patch queued in my tree already to fix this, it'll be sent in the next merge window. The value can't overflow 32-bits, so the warning is harmless. Ben.> > drivers/gpu/drm/nouveau/nvkm/engine/disp/changf119.c > 51 void > 52 gf119_disp_chan_intr(struct nv50_disp_chan *chan, bool en) > 53 { > 54 struct nvkm_device *device = chan->disp->base.engine.subdev.device; > 55 const u64 mask = 0x00000001 << chan->chid.user; > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > 56 if (!en) { > 57 nvkm_mask(device, 0x610090, mask, 0x00000000); > 58 nvkm_mask(device, 0x6100a0, mask, 0x00000000); > 59 } else { > 60 nvkm_mask(device, 0x6100a0, mask, mask); > 61 } > 62 } > > > regards, > dan carpenter
Reasonably Related Threads
- [PATCH][next] drm/nouveau/disp: avoid potential overflow on shift of int value
- [bug report] drm/nouveau/disp/nv50-: add channel interfaces to control error interrupts
- [PATCH v3] clk: Restore BYPASS_PLL_CHECK from PLLs
- [PATCH 1/2] secboot: don't use hardcoded mask to enable falcon
- [PATCH 2/2] drm/nouveau: Fix GM107 disp dmac chan init on ThinkPad P50