Received: by 2002:a05:7412:7c14:b0:fa:6e18:a558 with SMTP id ii20csp387564rdb; Mon, 22 Jan 2024 07:18:30 -0800 (PST) X-Google-Smtp-Source: AGHT+IHsR5/40BHHN1xCVpWGB64rXZ3ro6R0KUsjS4D0JifRUaE12tKX0IaEO3C5OwZ5Ccqz+EjS X-Received: by 2002:aa7:9ed0:0:b0:6db:6e99:a306 with SMTP id r16-20020aa79ed0000000b006db6e99a306mr2057039pfq.31.1705936710260; Mon, 22 Jan 2024 07:18:30 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1705936710; cv=pass; d=google.com; s=arc-20160816; b=AbvnGgI0PSrldQnTltj8ecPHDLuU6pvXJbtxUroAqtRq6eKsmCWC0wgUsWfdTeNoW1 jPYv6RnbK0k5NqqHRz/H3u8pE2sKgqqK5+rl8Lqhd54i7jR1Nq0SJh5KY6Ag0PIV2sjI nX9zPfeRJLh7XPEhivkDoWF2csp/ggqXP0Jqloc+4NqLtRi7Xe99e5fx4z5mYiPgve7g p45YoiR/ho3zU3XmUMvPs/vx1gVwY5l/t39ivdGwM4RN561p/o6DQUkMKEY7ZZFqXXkm 18JA+p7AwuItrjlKH6ANY6ncb9pdrgPEi3SnfwIYKGCo9JQFTrqIIMQ5tUFwCJO/BeBH ME2A== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=stsk98cZQTh7F/ttyk9voxB69TcJHXPLoZkgJ5fGbvs=; fh=qUhNiWmuvgeKxd8ksQn0SBQq2+lcviE4ETpnrchaCJc=; b=C/PGKOdpRNceMzC8l0OWsPJpq0vnDTcQTq+Guh40iCqcvoJIfzLUsiFjvguNu4uxBG 0v1aIhorwI8u3V1UbSvyZ1caq20awR6WEOkBWH4Py4SpE3P+Wm6qwW7AWXswrs8RsBp3 3emWMWcwjMAAwwaPz/UldK0gXannyuF+yrqGhPwsAAMGOw6i1U123dFyaXZBh7NjeemD j7HkARNfG/4F7gC2jw5aCZjB6CqDqXP2NCn9tgVLBpkXkxv6hNc5xxV6/565pAKt1dPM YSOHfQSQ4dbxoHvmtRKd736QaAN9tPR2gwmfGMeu+cX+R0OkCASSRsmrcV2A7kloWHY/ ZcUQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=iBi83o0r; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-33242-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-33242-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id fb12-20020a056a002d8c00b006daa8095833si10784239pfb.189.2024.01.22.07.18.30 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Jan 2024 07:18:30 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-33242-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=iBi83o0r; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-33242-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-33242-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id C86BA28DCD0 for ; Mon, 22 Jan 2024 15:11:13 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C8F964E1D0; Mon, 22 Jan 2024 14:57:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="iBi83o0r" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id F34484D596; Mon, 22 Jan 2024 14:57:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705935478; cv=none; b=UC6XhacSsXWSchibm0ZkuHr1ktZ3BTggerKR/WJtOtuISjvBk0VZm+twON05LIF/SXB9EfQ2DEPThA2FdqRJ/j1r2ZfZPklroNy9c6PBJl6L6FbnIvWNaR/wmBelRvjU2WxrXzhmSGoUbt1rGUlHK5en+sD4zobUZJH9mUhllyE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705935478; c=relaxed/simple; bh=I32G/hUKa6KyI2BniBMuFm3YI0BHeflPK5hT6eizRBI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=WMuMMMQnPkZ4/fZXW8rqkmA9njFK3neVhHsfIyJw1p24uHqg6eli2RG1rI5bSl8eutOg78hvuAv3Go/RruL+p8Eh7zGESnkOAJRqGH5pGwKSXU0JpKWwf6P0NAaNsUeHakKpTPl2YlkrhJXfhSe4bgrLIMZUEUnFHJZ2YEFKYuk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=iBi83o0r; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4C10FC43399; Mon, 22 Jan 2024 14:57:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1705935477; bh=I32G/hUKa6KyI2BniBMuFm3YI0BHeflPK5hT6eizRBI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=iBi83o0rYTEEVl+gzRnGQY0VTm9tgJHYzUVAFBfqa5UQUt8Br4PpYTNEKOCUFr7X0 McUfPxh9PHyIwTl52jwq6GWxHR/LMdKLUCD23Vve61DAG3Mb79yzdf/e6h2Jy6t4r1 +7Nafpu9BlZeG+rgSbqG7zeXqWOKeST78GP3wBjr0M6Otwmb7u7bBJW+TzG29W70QZ YRZ1gOpoA8g5n6se2jYMYjul9zRbxJ4EZgB1736wwmiPwM3yQx4bxdh+6FMGYeEwYU LVQNgJUZvTjV7VLALC8mKhj2m47AB4Lefzl34K5LYWzovfUzPywYjjxlR9r3zFvyxj R5nFk5I+fUSpw== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Tomi Valkeinen , Laurent Pinchart , Maxime Ripard , Sasha Levin , maarten.lankhorst@linux.intel.com, tzimmermann@suse.de, airlied@gmail.com, daniel@ffwll.ch, dri-devel@lists.freedesktop.org Subject: [PATCH AUTOSEL 6.7 24/88] drm/drm_file: fix use of uninitialized variable Date: Mon, 22 Jan 2024 09:50:57 -0500 Message-ID: <20240122145608.990137-24-sashal@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240122145608.990137-1-sashal@kernel.org> References: <20240122145608.990137-1-sashal@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore X-stable-base: Linux 6.7.1 Content-Transfer-Encoding: 8bit From: Tomi Valkeinen [ Upstream commit 1d3062fad9c7313fff9970a88e0538a24480ffb8 ] smatch reports: drivers/gpu/drm/drm_file.c:967 drm_show_memory_stats() error: uninitialized symbol 'supported_status'. 'supported_status' is only set in one code path. I'm not familiar with the code to say if that path will always be ran in real life, but whether that is the case or not, I think it is good to initialize 'supported_status' to 0 to silence the warning (and possibly fix a bug). Reviewed-by: Laurent Pinchart Acked-by: Maxime Ripard Signed-off-by: Tomi Valkeinen Link: https://patchwork.freedesktop.org/patch/msgid/20231103-uninit-fixes-v2-1-c22b2444f5f5@ideasonboard.com Signed-off-by: Sasha Levin --- drivers/gpu/drm/drm_file.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/drm_file.c b/drivers/gpu/drm/drm_file.c index 446458aca8e9..54a7103c1c0f 100644 --- a/drivers/gpu/drm/drm_file.c +++ b/drivers/gpu/drm/drm_file.c @@ -958,7 +958,7 @@ void drm_show_memory_stats(struct drm_printer *p, struct drm_file *file) { struct drm_gem_object *obj; struct drm_memory_stats status = {}; - enum drm_gem_object_status supported_status; + enum drm_gem_object_status supported_status = 0; int id; spin_lock(&file->table_lock); -- 2.43.0