Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp6414838ybi; Wed, 29 May 2019 07:31:10 -0700 (PDT) X-Google-Smtp-Source: APXvYqwrh2heGkjmvWCR7eaRXwDkEDCpEdWiwgmEUGe+dVnKkziQEt+prWI1dp+nJfBLkyw7X0ER X-Received: by 2002:a17:902:7089:: with SMTP id z9mr45993813plk.335.1559140270380; Wed, 29 May 2019 07:31:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559140270; cv=none; d=google.com; s=arc-20160816; b=kA5VOhqKpgb9juQkAht5T3m/X6XsKDQJ8ZXIME5aPWkLubxBrvWKjT1TM4PkbqZQd4 1+SsMHIPVCGV8jBxGAf7NGtotHucDuoiELtzIRQ/uiTR0mfZnTFdbpM8jTlC7MA0osSC bPlheFDeOgB2er/tTOQ05vvwyQO3hpuTtkz3PtL8iBBs4HBhTcA2bPGC3C2rjQaHHupT BbvBAQECCp1XQFjUFR5B24kAUzNJNxFisy5ezeOwG2uNs3gMpKG1W80UP5Hb9qWCKj9x iFMJhu7wThCas8wZgGLZFY/wzpQ51XjOp0JdNks+d0OlEHBLTSXxn3BVsQ+J5Zop1m7G jTeQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=PfHgUYrTD10JgHbaxxPKMTwPHOTN3qNHmCM2xevq53w=; b=xiQ06pHhw3OryP7Ec6pawMrb+pQ1iPG8XzR4Q6pN/GKHhgT2Z0DdCouKxuX1yBtOau eMc0pMFO6gI6wUKtYN3czX8qfYRlixJakZf4yXyO0Yn4q9F9sivm0gmgiKRYz/IprDU/ PlHU01uoh0nJuJ7p2NBdG4LZIv+LITHO/JtZsW3lQt+Wpag57drpZA4MJ7RbR+RlXQ0e c6fh645z9EQM4Xvrd2jmtadLKqe4j7zEfqrv8CMbG/oTxLHXeLcQf0LIDJWQmvdK4Oyq pM9b8DjbvFoax0RA1ovL5tBKTAhV3XSmev38HyqhpgzFKm2FuEYCZJW3uOQRg8cfyrP0 PpEA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=canonical.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g20si25539601pgi.193.2019.05.29.07.30.50; Wed, 29 May 2019 07:31:10 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=canonical.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726843AbfE2O3e (ORCPT + 99 others); Wed, 29 May 2019 10:29:34 -0400 Received: from youngberry.canonical.com ([91.189.89.112]:47727 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726118AbfE2O3d (ORCPT ); Wed, 29 May 2019 10:29:33 -0400 Received: from 1.general.cking.uk.vpn ([10.172.193.212] helo=localhost) by youngberry.canonical.com with esmtpsa (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.76) (envelope-from ) id 1hVza3-0000sX-ED; Wed, 29 May 2019 14:29:27 +0000 From: Colin King To: Jani Nikula , Joonas Lahtinen , Rodrigo Vivi , David Airlie , Daniel Vetter , intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH][next] drm/i915: fix uninitialized variable 'mask' Date: Wed, 29 May 2019 15:29:27 +0100 Message-Id: <20190529142927.16699-1-colin.king@canonical.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Colin Ian King Currently mask is not initialized and so data is being bit-wise or'd into a garbage value. Fix this by inintializing mask to zero. Addresses-Coverity: ("Uninitialized scalar variable") Fixes: 1ac159e23c2c ("drm/i915: Expand subslice mask") Signed-off-by: Colin Ian King --- drivers/gpu/drm/i915/gt/intel_sseu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/gt/intel_sseu.c b/drivers/gpu/drm/i915/gt/intel_sseu.c index 763b811f2c9d..5a89672d98a2 100644 --- a/drivers/gpu/drm/i915/gt/intel_sseu.c +++ b/drivers/gpu/drm/i915/gt/intel_sseu.c @@ -41,7 +41,7 @@ void intel_sseu_copy_subslices(const struct sseu_dev_info *sseu, int slice, u32 intel_sseu_get_subslices(const struct sseu_dev_info *sseu, u8 slice) { int i, offset = slice * sseu->ss_stride; - u32 mask; + u32 mask = 0; GEM_BUG_ON(slice >= sseu->max_slices); -- 2.20.1