]> xenbits.xensource.com Git - people/aperard/linux-chromebook.git/commitdiff
CHROMIUM: drm: nouveau: initialize variables in nv40_pm
authorSimon Que <sque@chromium.org>
Thu, 31 Jan 2013 00:26:10 +0000 (16:26 -0800)
committerChromeBot <chrome-bot@google.com>
Fri, 1 Feb 2013 01:33:21 +0000 (17:33 -0800)
These variables are implicitly initialized by being passed as pointers
into nv40_calc_pll().  However, the compile still generates these
warnings:

nv40_pm.c:163:41: warning: 'log2P' may be used uninitialized in this
function
nv40_pm.c:164:38: warning: 'M2' may be used uninitialized in this
function
nv40_pm.c:164:45: warning: 'M1' may be used uninitialized in this
function
nv40_pm.c:164:25: warning: 'N2' may be used uninitialized in this
function
nv40_pm.c:164:51: warning: 'N1' may be used uninitialized in this
function

BUG=chromium-os:5542
TEST=emerge-x86-generic chromeos-kernel, make sure these warnings don't
appear.

Change-Id: Ib51a1744d809a395e2b599461f22f774313512d4
Signed-off-by: Simon Que <sque@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/42358
Reviewed-by: Mandeep Singh Baines <msb@chromium.org>
drivers/gpu/drm/nouveau/nv40_pm.c

index c7615381c5d9e287a090784c1a79f183ad0605f4..0cbed425a806315bacedf746e813f967e210160a 100644 (file)
@@ -143,7 +143,7 @@ nv40_pm_clocks_pre(struct drm_device *dev, struct nouveau_pm_level *perflvl)
 {
        struct nv40_pm_state *info;
        struct pll_lims pll;
-       int N1, N2, M1, M2, log2P;
+       int N1 = 0, N2 = 0, M1 = 0, M2 = 0, log2P = 0;
        int ret;
 
        info = kmalloc(sizeof(*info), GFP_KERNEL);