From patchwork Sat Nov 23 19:36:39 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nathan Chancellor X-Patchwork-Id: 11259949 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 5EEED6C1 for ; Mon, 25 Nov 2019 08:07:52 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 47139207FD for ; Mon, 25 Nov 2019 08:07:52 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 47139207FD Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none 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 239D989317; Mon, 25 Nov 2019 08:07:42 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-oi1-x244.google.com (mail-oi1-x244.google.com [IPv6:2607:f8b0:4864:20::244]) by gabe.freedesktop.org (Postfix) with ESMTPS id DEC126E0F4; Sat, 23 Nov 2019 19:36:45 +0000 (UTC) Received: by mail-oi1-x244.google.com with SMTP id x21so2511703oic.0; Sat, 23 Nov 2019 11:36:45 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=oSQc37dqCsKmcQ7zoyXBibnTMKn/Bl9FPXqYEwoE1CQ=; b=EV30RktEsBwRGxlq74vFWTcFgHfC5nFtPoYqIudyRw6orwrklDMx4RRaPJWIfDx2SR tUECJnS6KqCJyV2jHMzTUIWUVeFHEDN0GycgB8cZTptxwP2c7dlV4SetGYCxf7I2Z5Zs 2qn6QoSe/9gOfMLnas82A3g3GpN5lgIPEs+its5HXSQCW2DvhvRwnEpAmzKmFhokHMWj Cuyv7qrPC7pwa9m/yAZrwpEHNcc5And6QHWPil4nqAMyHf03e7QizvWyGTClNRVqUA1t JyfUNkhMX3eXJI6CxbVuc2zsP5Or+BS3qjl6wmPYPs3fKIECWwzfziVTpYGKjEaNOSX+ 6ufg== X-Gm-Message-State: APjAAAX5HRFIjw+nm679UJY/V+IWC0mwagiKLE971WbjsQu8CNdDo+FS 2hoGlHfE9SVhJUlXYj8pb9E= X-Google-Smtp-Source: APXvYqw88oFHCtkJk2ssxIM4pcvPnzipOe00LVFTxu4p4QE+zj9SziILY4FsQ/PNgyJqg+LhgSX0hQ== X-Received: by 2002:aca:1715:: with SMTP id j21mr16374553oii.6.1574537804955; Sat, 23 Nov 2019 11:36:44 -0800 (PST) Received: from localhost.localdomain ([2604:1380:4111:8b00::7]) by smtp.gmail.com with ESMTPSA id q3sm551968oti.49.2019.11.23.11.36.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 23 Nov 2019 11:36:44 -0800 (PST) From: Nathan Chancellor To: Harry Wentland , Leo Li , Alex Deucher , =?utf-8?q?Christian_K=C3=B6nig?= , "David (ChunMing) Zhou" Subject: [PATCH] drm/amd/display: Use NULL for pointer assignment in copy_stream_update_to_stream Date: Sat, 23 Nov 2019 12:36:39 -0700 Message-Id: <20191123193639.55297-1-natechancellor@gmail.com> X-Mailer: git-send-email 2.24.0 MIME-Version: 1.0 X-Patchwork-Bot: notify X-Mailman-Approved-At: Mon, 25 Nov 2019 08:07:41 +0000 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=oSQc37dqCsKmcQ7zoyXBibnTMKn/Bl9FPXqYEwoE1CQ=; b=WbGn4JFxkkTuruODpeF0BiqIiobfrQaqt4UfNgnpPqG1TPanPiI6XYwkF1u77Wlf0x VhxD/a/EOS73a8zJp9qKrc7iX8zceDLI+AnOY7X0TYYEZq3rJSTzU7P2qojhdMUFWeKM Uz8yowHqgIaVwF6dV+5dZyBLMAz5x5ZXUzR3UvfWD5BWf3VbbHI06nncpAqYr7+WDDRZ vg+/vScXkLKb7RppS4/yzuaNhxsiqhuE85puhcDYDaGDITEv9jTFHXG5HlDfejIp6Q+d DEXwi2vDvjLuCPATa/70h8DBhHniolPlDfqCASW1kQ8N/iVhQEZBDbrGbOT7w0sgl6r8 xoZg== X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Rodrigo Siqueira , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Nikola Cornij , clang-built-linux@googlegroups.com, Dmytro Laktyushkin , amd-gfx@lists.freedesktop.org, Nathan Chancellor Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Clang warns: ../drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc.c:1965:26: warning: expression which evaluates to zero treated as a null pointer constant of type 'struct dc_dsc_config *' [-Wnon-literal-null-conversion] update->dsc_config = false; ^~~~~ ../drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc.c:1971:25: warning: expression which evaluates to zero treated as a null pointer constant of type 'struct dc_dsc_config *' [-Wnon-literal-null-conversion] update->dsc_config = false; ^~~~~ 2 warnings generated. Fixes: f6fe4053b91f ("drm/amd/display: Use a temporary copy of the current state when updating DSC config") Link: https://github.com/ClangBuiltLinux/linux/issues/777 Signed-off-by: Nathan Chancellor Reviewed-by: Harry Wentland --- drivers/gpu/drm/amd/display/dc/core/dc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/display/dc/core/dc.c b/drivers/gpu/drm/amd/display/dc/core/dc.c index c7db4f4810c6..2645d20e8c4c 100644 --- a/drivers/gpu/drm/amd/display/dc/core/dc.c +++ b/drivers/gpu/drm/amd/display/dc/core/dc.c @@ -1962,13 +1962,13 @@ static void copy_stream_update_to_stream(struct dc *dc, if (!dc->res_pool->funcs->validate_bandwidth(dc, dsc_validate_context, true)) { stream->timing.dsc_cfg = old_dsc_cfg; stream->timing.flags.DSC = old_dsc_enabled; - update->dsc_config = false; + update->dsc_config = NULL; } dc_release_state(dsc_validate_context); } else { DC_ERROR("Failed to allocate new validate context for DSC change\n"); - update->dsc_config = false; + update->dsc_config = NULL; } } }