Re: [PATCH] drm/radeon/kms: suppress a build warning (unused variable)

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

 



On Tue, May 25, 2010 at 5:03 PM, Stefan Richter
<stefanr@xxxxxxxxxxxxxxxxx> wrote:
> At least 'make CONFIG_DEBUG_SECTION_MISMATCH=y' causes
>  drivers/gpu/drm/radeon/atombios_crtc.c: In function 'atombios_crtc_set_pll':
>  drivers/gpu/drm/radeon/atombios_crtc.c:684: warning: 'pll' may be used uninitialized in this function
> which has the looks of a falso positive.
>
> Add a default: case so that gcc rests assured that all possible pll_id's are covered.
> Keep the present cases that fall through to the default one for self-documentation.
>
> Signed-off-by: Stefan Richter <stefanr@xxxxxxxxxxxxxxxxx>

looks good.

Reviewed-by: Alex Deucher <alexdeucher@xxxxxxxxx>

> ---
>  drivers/gpu/drm/radeon/atombios_crtc.c |    1 +
>  1 files changed, 1 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/gpu/drm/radeon/atombios_crtc.c b/drivers/gpu/drm/radeon/atombios_crtc.c
> index 03dd6c4..f3f2827 100644
> --- a/drivers/gpu/drm/radeon/atombios_crtc.c
> +++ b/drivers/gpu/drm/radeon/atombios_crtc.c
> @@ -707,6 +707,7 @@ static void atombios_crtc_set_pll(struct drm_crtc *crtc, struct drm_display_mode
>                break;
>        case ATOM_DCPLL:
>        case ATOM_PPLL_INVALID:
> +       default:
>                pll = &rdev->clock.dcpll;
>                break;
>        }
> --
> Stefan Richter
> -=====-==-=- -=-= ==--=
> http://arcgraph.de/sr/
>
>
_______________________________________________
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