Received: by 2002:a05:6a10:2785:0:0:0:0 with SMTP id ia5csp579372pxb; Fri, 8 Jan 2021 12:21:22 -0800 (PST) X-Google-Smtp-Source: ABdhPJwXmlmD16VUhzfPndrRiRbz4moKKRs2I20NI/hgzqgm3E8Q0AZO5fAAtg3m3GVDM+PKl7er X-Received: by 2002:a17:906:7fca:: with SMTP id r10mr3827521ejs.24.1610137281927; Fri, 08 Jan 2021 12:21:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610137281; cv=none; d=google.com; s=arc-20160816; b=kKNBPM8aXs42IlKhtCP8NGnwye80J5FioSUUB9XW2cDOX22UfSseer+wtphDP9A9R6 2fv9cMm+aMocO2D5O8y4UbGMcZF8fax70qiEHinlZNLb6KAPvhfVb2U1UMcJQpomPqYF L7na1auj2Fat7oRJiKg4x5cTisoccPkzvyS4Xr/ecq3NxayuPhknmAq22mO3fIbuio9m gze1viUS41y9p83/1KZs/P5tNoQ1xlO70xRHlw2udXdxW3Dbtjs8tJ4XfkYPrXywHrrF siGxpggiaBcA/Uh2KH8CTtHLN13fKAE9Gj8L0V+SpyTqPaHf5XFTGBfDDzqeGgjjG5Hz olhQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=5gaclGYPTxeR7WBpYSGtVJvFJoT+8qY5x3DkdzDetH8=; b=ma4L/eAtENYvjpj0naLgUB75ZhYca1IjKw9MWggeUNPKa3m7u+t78H8zSfsEGKl/nW dWxoARFqn23aPu7lybzsB/ttJny6mZZhYdUyfOtF/pBr/B7t/6pucBW5ZUTIYJ4HSEP/ 3DCP+wUIgXwCyrqxwil/r9+rZw+lZHIoVm8xFHIVznvTRSl1gsPveE4Z27khpSdz77hF bO5FsI2WDARcO0idyU6YEijjvj3JOfhXA+KDIkrg2fMtAecbeUduARQjk5W4dC818/BP j0lyYi+L859pq60vezeeITUtz8CxVFE4LFqjImSlsD38UivXw72j4cAqDzoFtxMrzBpD a9aQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="SqJbv6z/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v21si3863155edt.309.2021.01.08.12.20.58; Fri, 08 Jan 2021 12:21:21 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="SqJbv6z/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729262AbhAHUQm (ORCPT + 99 others); Fri, 8 Jan 2021 15:16:42 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52484 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729164AbhAHUQl (ORCPT ); Fri, 8 Jan 2021 15:16:41 -0500 Received: from mail-wr1-x433.google.com (mail-wr1-x433.google.com [IPv6:2a00:1450:4864:20::433]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 20A03C0612B1 for ; Fri, 8 Jan 2021 12:15:35 -0800 (PST) Received: by mail-wr1-x433.google.com with SMTP id d26so10109808wrb.12 for ; Fri, 08 Jan 2021 12:15:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=5gaclGYPTxeR7WBpYSGtVJvFJoT+8qY5x3DkdzDetH8=; b=SqJbv6z/H/h280tKiGBaUND1On2N5BCO4srcqVAHaTgcNtV7jTozwCRnj4CHVMkOUa hwMmdG80+qYFg7oT+DYhrpWzZ2CifvdrKfhMenuiFXpC0TyuJfb2jTby9FLrOF7E6E9d r4OIe6PSFoLIJvJKD14l8vN2kr3wcW6855SxatxD7IgJmsrcUPMCL3pA/qshHfneN1b2 gqJK74bskfTblQATgZFm7+u6+PvytMZNaEh6y5TrI1If+L63a3PCQeByFRzEunJz/lud DjKVXydiJxhmQDCkT8dz8+SUfLB66A2MrIrPEVIMwREIctYSfOqDT445cHOLpewGSEML 7zOA== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=5gaclGYPTxeR7WBpYSGtVJvFJoT+8qY5x3DkdzDetH8=; b=Gpe6u32pCFK8ciEAQ8TqZERslpEXZKWPILv67NKef2Yoa2UndUbcF7WNpMTOfBCHSa DiuJ85co+5y9UinPU5X9f2nvdMS3K8JY6XdrLl5OjufqRfNMyVHN7CE5C8rfr4xq7VdK 6OBtukvFtfwqI8n0PRGJQMZ1DsrN+P0I20APB6ZNWe9kx9AW2DP0Mnc0wuLBxxlVQmle llH5g1TrWELPGw9QHQIDWDOnpbO6fC9aA4KtWzJCfXkoqUAsTUSC69qafYvimd1aao7F r2oHnvsLqxZkVf/WNN2d1xIMnkSyLnHoOxtcQbsX8r6VVKU7ngHbz8V4qR6PixTRPR18 6y8w== X-Gm-Message-State: AOAM532ZN+eNu8Jl+/atN6/J4M80s6J+sR+N+xGkWmC4F/39gxYq+hey bzl/LvFS6gzbXgwGJO6Q7y5dwA== X-Received: by 2002:adf:e512:: with SMTP id j18mr5227504wrm.52.1610136933894; Fri, 08 Jan 2021 12:15:33 -0800 (PST) Received: from dell.default ([91.110.221.229]) by smtp.gmail.com with ESMTPSA id l8sm15598671wrb.73.2021.01.08.12.15.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Jan 2021 12:15:33 -0800 (PST) From: Lee Jones To: lee.jones@linaro.org Cc: linux-kernel@vger.kernel.org, Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Daniel Vetter , Rob Clark , dri-devel@lists.freedesktop.org Subject: [PATCH 20/40] include: drm: drm_atomic: Make use of 'new_plane_state' Date: Fri, 8 Jan 2021 20:14:37 +0000 Message-Id: <20210108201457.3078600-21-lee.jones@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210108201457.3078600-1-lee.jones@linaro.org> References: <20210108201457.3078600-1-lee.jones@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org In the macro for_each_oldnew_plane_in_state() 'new_plane_state' is provided as a container for state->planes[i].new_state, but is not utilised in some use-cases, so we fake-use it instead. Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c: In function ‘amdgpu_dm_commit_cursors’: drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:7649:44: warning: variable ‘new_plane_state’ set but not used [-Wunused-but-set-variable] Cc: Maarten Lankhorst Cc: Maxime Ripard Cc: Thomas Zimmermann Cc: David Airlie Cc: Daniel Vetter Cc: Rob Clark Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones --- include/drm/drm_atomic.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/drm/drm_atomic.h b/include/drm/drm_atomic.h index 54e051a957dfc..866daba4c4a55 100644 --- a/include/drm/drm_atomic.h +++ b/include/drm/drm_atomic.h @@ -847,7 +847,8 @@ void drm_state_dump(struct drm_device *dev, struct drm_printer *p); ((plane) = (__state)->planes[__i].ptr, \ (void)(plane) /* Only to avoid unused-but-set-variable warning */, \ (old_plane_state) = (__state)->planes[__i].old_state,\ - (new_plane_state) = (__state)->planes[__i].new_state, 1)) + (new_plane_state) = (__state)->planes[__i].new_state, \ + (void)(new_plane_state) /* Only to avoid unused-but-set-variable warning */, 1)) /** * for_each_oldnew_plane_in_state_reverse - iterate over all planes in an atomic -- 2.25.1