From patchwork Wed May 27 14:05:09 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 187271 Delivered-To: patch@linaro.org Received: by 2002:a92:5b0a:0:0:0:0:0 with SMTP id p10csp1152163ilb; Wed, 27 May 2020 07:05:51 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwQBe40Nez7Ap0iTvtsWZ0Aqo8yzBgITGeOKX0g+5PEq9XCXrKgDEGg0250oaTFWacw1l3+ X-Received: by 2002:a63:f304:: with SMTP id l4mr4262532pgh.235.1590588350969; Wed, 27 May 2020 07:05:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590588350; cv=none; d=google.com; s=arc-20160816; b=QsTr1Y2v65IORM3K61IMoEW3Q2GW7+lQRATPtO0H4Hnmch/QYOq0CSNMVZTQNmCcs3 VrHdARH5imxXkQbXRalQRwGq0K8buXQvU6wTDy0FZoLffaJYIwH0mxtmq1jgqPGbnfB+ 8A6dMGOgNsim1CyjAFwNPVcfTxxv+9tuvkhMG1YfQRLG+BKPSHYEtH4+hl+GdZxgmc1t Ef6sLLUBDWjFZRhur7/2tE4nQxejoem3ztTHVW5JaCyj2H4o0ggthKAACMrdBBWfkGbF OpE+YCymwnszZWkx0E6hqDXfkOp+feFbkUUlAnrO9HL+BnUFyWdH7n07Do9MZwGDTxD3 PhbA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:cc:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:mime-version:references:in-reply-to:message-id:date :subject:to:from:delivered-to; bh=+dYWe85JFloc9+h7/cLyqb3YigcX8/f1MjOoeZy2nAE=; b=TmrebqRSfKQiM60A14I3OespD7G10x0S9sY6SWWyTH4AiT49k6o6mijocmWrl/vJpJ 3GJg19v5xTbie/sfxf9+TFYniis/rgd+DBkOw4KuHcGE2888iWP2VzbIU3wAQ9onGKNd +ermogmWemlOPgDKxx1hDSZBypyKfwMoxfrDfXZMnkfoO4yrazuWUxTzwiSmxzw/53On MAMIquq8Z58YLZaogypW0x58tFUwv/rwNkTK7+1wS49k4q56lXmLjq7bK9erLv5U6y0G NO41Flsw9jKo+BkDpVgIjd8Ga/h9URlwAWUMvBCWEJX2CsEmybDLvArsBuBz48SJSJ6d YlrQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Return-Path: Received: from gabe.freedesktop.org (gabe.freedesktop.org. [131.252.210.177]) by mx.google.com with ESMTPS id o25si2439071pgc.147.2020.05.27.07.05.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 May 2020 07:05:50 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) client-ip=131.252.210.177; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id F19AB899DC; Wed, 27 May 2020 14:05:49 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mout.kundenserver.de (mout.kundenserver.de [212.227.126.187]) by gabe.freedesktop.org (Postfix) with ESMTPS id 51804899DC for ; Wed, 27 May 2020 14:05:47 +0000 (UTC) Received: from threadripper.lan ([149.172.98.151]) by mrelayeu.kundenserver.de (mreue012 [212.227.15.129]) with ESMTPA (Nemesis) id 1MLiXQ-1jMHJG1tIG-00HfcC; Wed, 27 May 2020 16:05:34 +0200 From: Arnd Bergmann To: Jani Nikula , Joonas Lahtinen , Rodrigo Vivi , David Airlie , Daniel Vetter , Tvrtko Ursulin , John Harrison Subject: [PATCH 2/3] drm/i915: work around false-positive maybe-uninitialized warning Date: Wed, 27 May 2020 16:05:09 +0200 Message-Id: <20200527140526.1458215-2-arnd@arndb.de> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200527140526.1458215-1-arnd@arndb.de> References: <20200527140526.1458215-1-arnd@arndb.de> MIME-Version: 1.0 X-Provags-ID: V03:K1:XhGV89xHEat1ahk9vDcOini1cTFmNy3hR/+IomNkF0dDIF4zpZG mVIweZpVkM1y3GUbDfSqkcJna53e8KALJOgJZmp7Twzav4yEeJLd9a6aGl9MuGJqv39Lm+1 UtuYJ1CEH/1ruBsaqZOgZiXbw7k0vnL6MV+C46oN8FSuiZglkpaYnFEdXhsjxXy83Lxm7fj j/oHTDzvKdfuKAtc5lVow== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1; V03:K0:6q9GEMSIHfE=:SltPygotEWIkp2d4ogF7Xh /11yqp6Cat0DU8un95gA2KmZtYE9HHXVtHZWdKUFy8jKARI09BnD2IaSlg+gSu+qXXjECpw8O Nmssz5cvCcpTfBEv7Pg/cq/E9/ovouVQKX2MWMwY5ErZZRWmfc20gWK1T89hu+THfWJqGzOe6 CzA7LNT3yMZcHdJggP/7tfUkYqXAD1CSFsNyVug8P2XohAYxcgOIVSUFAPWO5jlaT4CViV8j/ 3+JnU9ZXvcj3AVo284Hl+LeQFkDHLgK3oyxmlqn2WekqfQwm98VFnDVy7+BMKPvN7mabLSObM O5L7RvJkLuJQ/jqervAFpQIQadbT5KmsAg/eozGNXzwF6b5TQbmSUqacFl1xkTDtbHGtRRxmD 9OlJxUwEUprL7JYG+SPKYYtESmYyJBpl2gwRGZbrEsK+sglA3RT5UBg7JjcTLSFJoQ1keu5fd bmkQgC54zI0YVmzI2wTKO/WhGLYvD/sgEe0FchAyRtG5TmxCwg1750u88DoGWLJt+d4IlGvXI 4Mc5eM6xRxA7FWg/7nKQHN91Y60RdBMuBEJL4Fn4pLRc7e87OE2gcRg49T1zA7hGhfoAWNNne IHZs7ga+SUKRamSlNHYzv3X+PwqrpO95LlHdYUZdGZoRYsLjygLNFSwZ8awuZ/wjRWasrPX22 XntKSboFHKLVVtGycIjfMi6oiWKOUr/u+gNXpcCHIGIJbg+KkSg08qHassdnEP5BWJeFPfR/i 0TJrW0I6oAV8Rg1e4jyE26Q+iP61WXH4YquhmXgh0hIyx5YpSDYXTZQyVgs5DgqZjuZC0Fl5o 7OoEUiu1SKQ7zRG7QhhQL0dEeqyQ6EKyJ++8ntVMyzszopcOLc= X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: dri-devel@lists.freedesktop.org, Arnd Bergmann , Mika Kuoppala , intel-gfx@lists.freedesktop.org, linux-kernel@vger.kernel.org, Chris Wilson , Daniele Ceraolo Spurio , Matthew Auld , "Robert M. Fosha" Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" gcc-9 gets confused by the code flow in check_dirty_whitelist: drivers/gpu/drm/i915/gt/selftest_workarounds.c: In function 'check_dirty_whitelist': drivers/gpu/drm/i915/gt/selftest_workarounds.c:492:17: error: 'rsvd' may be used uninitialized in this function [-Werror=maybe-uninitialized] I could not figure out a good way to do this in a way that gcc understands better, so initialize the variable to zero, as last resort. Fixes: aee20aaed887 ("drm/i915: Implement read-only support in whitelist selftest") Signed-off-by: Arnd Bergmann --- drivers/gpu/drm/i915/gt/selftest_workarounds.c | 2 ++ 1 file changed, 2 insertions(+) -- 2.26.2 _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel Reviewed-by: Chris Wilson diff --git a/drivers/gpu/drm/i915/gt/selftest_workarounds.c b/drivers/gpu/drm/i915/gt/selftest_workarounds.c index 5ed323254ee1..32785463ec9e 100644 --- a/drivers/gpu/drm/i915/gt/selftest_workarounds.c +++ b/drivers/gpu/drm/i915/gt/selftest_workarounds.c @@ -623,6 +623,8 @@ static int check_dirty_whitelist(struct intel_context *ce) err = -EINVAL; goto out_unpin; } + } else { + rsvd = 0; } expect = results[0];