drm/radeon/kms: suppress a build warning (unused variable)
authorStefan Richter <stefanr@s5r6.in-berlin.de>
Wed, 26 May 2010 00:27:44 +0000 (10:27 +1000)
committerDave Airlie <airlied@redhat.com>
Wed, 26 May 2010 00:27:44 +0000 (10:27 +1000)
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@s5r6.in-berlin.de>
Reviewed-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
drivers/gpu/drm/radeon/atombios_crtc.c

index 03dd6c41dc192f272f6499d3bfea03a4556e7db9..f3f2827017ef39603bae514432f875a51472eec1 100644 (file)
@@ -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;
        }