Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp6453580ybi; Wed, 29 May 2019 08:04:40 -0700 (PDT) X-Google-Smtp-Source: APXvYqyrn4z4/H7UyB5HjBZlFDLNPmgJw9xn1FO9TlWCduKZx/ABQKPnWoomUggbcGxBUrL6nCK8 X-Received: by 2002:a17:902:7891:: with SMTP id q17mr60911869pll.236.1559142280213; Wed, 29 May 2019 08:04:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559142280; cv=none; d=google.com; s=arc-20160816; b=uz6YfVtdT3p6hQxLb81ZUua/vokqEny1+4Xs+q2Jtzzlig2f28kVDSKpovp1wVh82j tvOFwHl8S7zYwfwLDThnGUFZXskLIGj8us63KWi0zMBEjKPf6N1DJVTkDSIwWUPwUJW4 z5R8MiI0Zm0gCK9ZzXg2MlI0SMmZdxUH8pDisqGSNgLeMp7l2jWmyaCGtjWVvAHRORJS vuAQTRKS9Ry+OOOvILdcdQmbvYU4rAvYnBVFqYX5/UlHT0NXSR6XBerHdX/sdfN+FGw9 Y1LVv2az9ilK8mTYZlgbVjUHZCnTvqkZbNVSgCLHbDwv1QW+hOJc8AW8nQc/5zZwrgDt y2kg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:references :organization:in-reply-to:subject:cc:to:from; bh=tP/6GcKJO+51RxEX5i/8TPidgo8ZTwoW0k7uHjUx0Lk=; b=RXb+m7l2eUzvbPdZkSqu5yk4Eu/MUWJddS7/r2C4vVheKKm7Ahru5D6StzwBGIEv1F B6GlNPMNH7ySdPQgTWYd84cY08sOpLKj972kNkeTIDeiLijUv3YAit1crXOu3rzMOhCV /L+mD7gSUy8w7Nmd4Vc2Pyfdh11u/7x0z51uB53zu0igYDT1qFKa1d/p7jpTnpVlyfVk GAzn2fUfAd6qbkhWkBp8Gw6XWG6UWL6re9YFBUOEJzqoZVrwfx8QMTjFPKYjCUf5eKm8 39GimW2p2rfxqZ9d2GsMmH3Ogw7F/C8UgohJ6JFh9lPRWbABmX3OKYs0nHSMKoisMwiJ IEkQ== 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=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q10si25269663pli.403.2019.05.29.08.04.20; Wed, 29 May 2019 08:04:40 -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=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726912AbfE2PB3 (ORCPT + 99 others); Wed, 29 May 2019 11:01:29 -0400 Received: from mga07.intel.com ([134.134.136.100]:23070 "EHLO mga07.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726012AbfE2PB3 (ORCPT ); Wed, 29 May 2019 11:01:29 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 29 May 2019 08:01:26 -0700 X-ExtLoop1: 1 Received: from jnikula-mobl3.fi.intel.com (HELO localhost) ([10.237.66.150]) by fmsmga001.fm.intel.com with ESMTP; 29 May 2019 08:01:23 -0700 From: Jani Nikula To: Colin King , 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, Stuart Summers , Daniele Ceraolo Spurio Subject: Re: [PATCH][next] drm/i915: fix uninitialized variable 'subslice_mask' In-Reply-To: <20190529144325.17235-1-colin.king@canonical.com> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo References: <20190529144325.17235-1-colin.king@canonical.com> Date: Wed, 29 May 2019 18:04:35 +0300 Message-ID: <87lfyp47zw.fsf@intel.com> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 29 May 2019, Colin King wrote: > From: Colin Ian King > > Currently subslice_mask is not initialized and so data is being > bit-wise or'd into a garbage value. Fix this by inintializing > subslice_mask to zero. > > Addresses-Coverity: ("Uninitialized scalar variable") > Fixes: 1ac159e23c2c ("drm/i915: Expand subslice mask") This was already reverted for other reasons. Need to be fixed on the next round. For future reference, please Cc: author and reviewers of the referenced commit. BR, Jani. > Signed-off-by: Colin Ian King > --- > drivers/gpu/drm/i915/intel_device_info.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/i915/intel_device_info.c b/drivers/gpu/drm/i915/intel_device_info.c > index 3625f777f3a3..d395a09b994f 100644 > --- a/drivers/gpu/drm/i915/intel_device_info.c > +++ b/drivers/gpu/drm/i915/intel_device_info.c > @@ -298,7 +298,7 @@ static void cherryview_sseu_info_init(struct drm_i915_private *dev_priv) > { > struct sseu_dev_info *sseu = &RUNTIME_INFO(dev_priv)->sseu; > u32 fuse; > - u8 subslice_mask; > + u8 subslice_mask = 0; > > fuse = I915_READ(CHV_FUSE_GT); -- Jani Nikula, Intel Open Source Graphics Center