Re: [PATCH 01/13] drm/gma500: Sanity-check pipe index

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Aug 12, 2015 at 5:00 PM, Thierry Reding
<thierry.reding@xxxxxxxxx> wrote:
> From: Thierry Reding <treding@xxxxxxxxxx>
>
> If the DSI output isn't connected, then mdfld_dsi_encoder_get_pipe()
> will return -1. The mdfld_dsi_dp_mode_set() function doesn't properly
> check for this condition and causes the following compiler warnings:
>
>           CC      drivers/gpu/drm/gma500/mdfld_dsi_dpi.o
>         drivers/gpu/drm/gma500/mdfld_dsi_dpi.c: In function ‘mdfld_dsi_dpi_mode_set’:
>         drivers/gpu/drm/gma500/mdfld_dsi_dpi.c:828:35: warning: array subscript is below array bounds [-Warray-bounds]
>           u32 pipeconf = dev_priv->pipeconf[pipe];
>                                            ^
>         drivers/gpu/drm/gma500/mdfld_dsi_dpi.c:829:33: warning: array subscript is below array bounds [-Warray-bounds]
>           u32 dspcntr = dev_priv->dspcntr[pipe];
>                                          ^
>
> Fix this by checking for a valid pipe before indexing the pipeconf and
> dspcntr arrays.
>
> Cc: Patrik Jakobsson <patrik.r.jakobsson@xxxxxxxxx>
> Signed-off-by: Thierry Reding <treding@xxxxxxxxxx>

Reviewed-by: Patrik Jakobsson <patrik.r.jakobsson@xxxxxxxxx>
_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/dri-devel




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux