From patchwork Fri Apr 16 14:36:49 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 422508 Delivered-To: patch@linaro.org Received: by 2002:a02:6a6f:0:0:0:0:0 with SMTP id m47csp447341jaf; Fri, 16 Apr 2021 07:37:44 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz8074oDZfdg9n1pj0A2kcIgJXt/SZ6E8sahykcHYpPGLc8gCo0beEsnlYWTZKL0E6LvhwY X-Received: by 2002:a17:90a:4381:: with SMTP id r1mr10564171pjg.214.1618583864589; Fri, 16 Apr 2021 07:37:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618583864; cv=none; d=google.com; s=arc-20160816; b=crvV5rd5/DVcKSBvC4WrSudu0mSENWFdwvwiWFgLk6Fw7Mt+hdgwEPAX5NQ6PK+6yk RquHDoPGDMBb/cwVDArzxiorCdbHfMqi1A7P6tPYfye8RNGyfEh/jOOzKHLe9pinNuZm 5xg0opin4y9uN0tbIGqjkwsszBDCNrTbfIXzG/8UvghuGQEFBe2BtYF0/tt3T2yiuVj1 7kqkefPnZO9PGtFdTLZKJ3qz4gUiuzehyKa3LeuvbwAbBwK8O4cPwghmRkT0lRusx7zq /tExl3SWZ3s0cEbnWnwTZgjcfbRzK4Us5KJ/IuEdKvmUAZ2t+Gg+2sfytKaUqa6t1GmY b8Zg== 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:dkim-signature:delivered-to; bh=PWAskBpraYbb+m0s5jHvu/6w6dbPnrxZWZwxiQAOdYE=; b=F63nCgdrdL9K2l5BllzvTihQomLKufqPKVAKg+pGbdi2kvTbTx1GQf3ZTtVbpEmLok Ob0CiflRu+DmCGm+Yl/hlv5zM5EUSarHkfTTDmuyW+FSK7HStDTX9RGUE6BkDor9qEWv txqcc0IJpV1hSdtYKq+fo7dDskgr2U1NM2wbq+e9ZcObYvIgzAY7u+rWSctGKrrJ1LW4 Q6wbFxla3nFsQrJt65Za01eAbjAHAW+ME4TcfUhZ0DdarmFhDjryWhHu9v5xBevuMMIk /9bG5csd355NqBdSUesjl3z1dRxy1H1YrXgd/6tYEfHEnemVjUh3y54fbUWhz4DHE/Re EPxQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=Oh8pAFgT; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from gabe.freedesktop.org (gabe.freedesktop.org. [131.252.210.177]) by mx.google.com with ESMTPS id p14si4252099pgb.45.2021.04.16.07.37.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 16 Apr 2021 07:37:44 -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; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=Oh8pAFgT; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 92A1C6EBB7; Fri, 16 Apr 2021 14:37:37 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-ed1-x52e.google.com (mail-ed1-x52e.google.com [IPv6:2a00:1450:4864:20::52e]) by gabe.freedesktop.org (Postfix) with ESMTPS id D3A306EBB7 for ; Fri, 16 Apr 2021 14:37:35 +0000 (UTC) Received: by mail-ed1-x52e.google.com with SMTP id z1so32558499edb.8 for ; Fri, 16 Apr 2021 07:37:35 -0700 (PDT) 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=tzEMJM+UnGpLFsbT1tH5hiSu2fCp7n+uz2nhd5JCrjs=; b=Oh8pAFgTSoI3mZ3oqNkCqeRUimxHAuKsuYJLMVyb3itxERn7cUAjgXwN3aQXU3NW9D SJypAlB2KHK9CjP1CUJ8U3jtKHbngA4R+T+3CcDXj99EVKHdstCDlL53QQ4V1QaZOG/p EPi9QzropfpMVm6xCAxpBm8SsH9x4EtDZ2eT3IUZPmgFjt0Ff9vO3L3dIVDXAV5M0SVy X6hhCJ6VmWiqQYBSWFX+AFNGdnhEpk4O7fJDepod9pJ/VNiFmbv1hH5fgM1efHxKgU8P KPtnVqEUe3gVluffqqAZVlpYVAzLD51k70RwnPEp7yY2vUJU9ONcXQ3LsYra3Djr5FCp 6bHQ== 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=tzEMJM+UnGpLFsbT1tH5hiSu2fCp7n+uz2nhd5JCrjs=; b=HKcZw3AJryYbdZTKw+264S6VQD/DPcVFKJNNIKkuHmFO0fcWb80eqRjHrtxr3hSmQt umcX+fHJW9ZC0NpCcbdrwMPCkeqh+3duZq2VAEMKa+qQrbMVbxJ3molKYup5MAsTgVPc odgYOOyHaz5YRg+smDIGyCjarnpNWUqQu9WUxPyG818fnXc0GQSWk7mHVLuinP7BhFzd 9Pf7yMCFCzEcX9LvPoOY+aLXvpCC2gupdO3HT6jzAOT3taMTAlCJQK0BEDWCfKd8PGxq 0tGN0zlIU4AsyEIYM42VxJoPUIfOtHBWP19l+ipWBQtAoLeskoSnB0VvJhyf90ScbqtV Rkog== X-Gm-Message-State: AOAM530gn8jmN4gweqIUHW5MDKktT5LSPt69wiAYgfMq5uwjOZWMsHyE p1G0SdrTPlDw+JZveCChtIrikQ== X-Received: by 2002:a05:6402:c8:: with SMTP id i8mr10526627edu.57.1618583854534; Fri, 16 Apr 2021 07:37:34 -0700 (PDT) Received: from dell.default ([91.110.221.215]) by smtp.gmail.com with ESMTPSA id j10sm1326523ejk.93.2021.04.16.07.37.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 16 Apr 2021 07:37:34 -0700 (PDT) From: Lee Jones To: lee.jones@linaro.org Subject: [PATCH 04/40] include: drm: drm_atomic: Make use of 'new_plane_state' Date: Fri, 16 Apr 2021 15:36:49 +0100 Message-Id: <20210416143725.2769053-5-lee.jones@linaro.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20210416143725.2769053-1-lee.jones@linaro.org> References: <20210416143725.2769053-1-lee.jones@linaro.org> MIME-Version: 1.0 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: David Airlie , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Thomas Zimmermann Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" 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 ac5a28eff2c86..259e6970dc836 100644 --- a/include/drm/drm_atomic.h +++ b/include/drm/drm_atomic.h @@ -871,7 +871,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