drm/nv50-/disp: audit and version DAC_LOAD method
Ben Skeggs
bskeggs at redhat.com
Wed Aug 13 16:30:40 PDT 2014
----- Original Message -----
> From: "Dan Carpenter" <dan.carpenter at oracle.com>
> To: bskeggs at redhat.com
> Cc: dri-devel at lists.freedesktop.org
> Sent: Wednesday, 13 August, 2014 9:29:16 PM
> Subject: re: drm/nv50-/disp: audit and version DAC_LOAD method
>
> Hello Ben Skeggs,
>
> The patch c4abd3178e11: "drm/nv50-/disp: audit and version DAC_LOAD
> method" from Aug 10, 2014, leads to the following static checker
> warning:
>
> drivers/gpu/drm/nouveau/core/engine/disp/dacnv50.c:78 nv50_dac_sense()
> warn: 0xfff00000 is larger than 16 bits
There was a mess-up when I cleaned up the structs, I've got a fix in my tree that I'll get to Linus in -fixes.
Thanks,
Ben.
>
> drivers/gpu/drm/nouveau/core/engine/disp/dacnv50.c
> 65 nv50_dac_sense(NV50_DISP_MTHD_V1)
> 66 {
> 67 union {
> 68 struct nv50_disp_dac_load_v0 v0;
> 69 } *args = data;
> 70 const u32 doff = outp->or * 0x800;
> 71 u32 loadval;
> 72 int ret;
> 73
> 74 nv_ioctl(object, "disp dac load size %d\n", size);
> 75 if (nvif_unpack(args->v0, 0, 0, false)) {
> 76 nv_ioctl(object, "disp dac load vers %d data %08x\n",
> 77 args->v0.version, args->v0.data);
> 78 if (args->v0.data & 0xfff00000)
> ^^^^^^^^^^^^^^^^^^^^^^^^^^
> This condition can't be true. It's not clear what was intended.
>
> 79 return -EINVAL;
> 80 loadval = args->v0.data;
> 81 } else
> 82 return ret;
>
>
> regards,
> dan carpenter
>
More information about the dri-devel
mailing list