From patchwork Fri Mar 19 08:24:13 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 404753 Delivered-To: patch@linaro.org Received: by 2002:a02:8562:0:0:0:0:0 with SMTP id g89csp1170899jai; Fri, 19 Mar 2021 01:24:43 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzVTNqqCALoDMihX8llahF7tzSsJYT7Z2x0QoNU5PDe+N4DPujSXpaAtjL1i1+LwOfXQQL4 X-Received: by 2002:a05:6a00:b47:b029:20d:1c65:75f0 with SMTP id p7-20020a056a000b47b029020d1c6575f0mr8035109pfo.9.1616142283008; Fri, 19 Mar 2021 01:24:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616142283; cv=none; d=google.com; s=arc-20160816; b=pETpug386WRDNAtRZIw6UNMbPjGlen6mpq+soVkecHQqpyy1yKKAE0FS/cu8GYvOdv /7HU3izLN6eSbzL3+KJp+wJJZxQhFRQAA4LA09HG4hfwT1cOnldREprIowBqA7Ynqqo8 s7e8OBptdrhVy2M4U2AZoYXZM4MrN/5hbaeo7zY0D2UFeyQljr1EN+/P44jZAhn12CD9 Lbs0Ob1Aos+gI7tDJDOH4+63b8BCeXPoRss3drC5t4TfjS7zoIUSt+0RWairJlAPBHTh 4WpOaa8AWgUGjhiTrBVL2oHHfkvNEkWoiH8m2m1Vh91btAJxal1o9k0CMfsn/6wNFwQW hhFA== 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=xmwPn8K8XKmxAEfpycibjPxiINKnyMFTU9qBDDzh76Bdru8ljJR4MFuSV+wwuCNfh/ Ute2ExdT7eQwr4R6dHOKKyCbiy4vyCa+5IXqkce285AeW0KJp/8FLkDUk+8go0IeAKKo 29jxYrvotGgeodw5P6J4dJQ1AwNFX4FV771rva4BgEWfwtWDoY/j42jlqN5iqsqyf/z/ Ck3XdU77TpK7Jv7L96Ex1yea/N6/vSJhu+hPA8KsqmNYhHdY6qiTMr6D8w/udSsq1Mo1 gTm86pHLt++ovqGC0Hi3E6N9b176j8GF1tKqp8uC2pwpluqt/Nwy7lacu9YUPwbGbGs5 61zQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=wuUIEt9E; 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 i13si5103163pjx.13.2021.03.19.01.24.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 19 Mar 2021 01:24:42 -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=wuUIEt9E; 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 A55B76E42C; Fri, 19 Mar 2021 08:24:39 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-ej1-x631.google.com (mail-ej1-x631.google.com [IPv6:2a00:1450:4864:20::631]) by gabe.freedesktop.org (Postfix) with ESMTPS id 415616E9A0 for ; Fri, 19 Mar 2021 08:24:37 +0000 (UTC) Received: by mail-ej1-x631.google.com with SMTP id k10so8282964ejg.0 for ; Fri, 19 Mar 2021 01:24:37 -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=wuUIEt9Eb7tXET8ysN8MWKyhOlYTDtF2sT/pFKk4bEjMdmgQe3QrM5PtVeePf9VKxv bYk8Z1hyKHpr/dIq6aNjj/2qL6KumKX3UNjpAfttT4dbl1hEQNWL3r35FbFteiKOoahb Fj/K9NgcY2jXP309QwCGjWABQI0d7DtEwHzkvnSQzcqncHqH70hPsF8Xj+qC+D6fJgM8 1nr/4c8N4MfdzX7cz0AKtKuNA0EKgd+nDspaYbHK+Yd6VlpfW78vUh9LIRU5E6D7cl/3 Ide+6975i2RIBuwjm+gNn4UMbvtwE+17pzzrCQ+xXgomc8HdVMmzWHJ5bG7oo+55YOWq 1McQ== 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=sZEq2wIl7xjmMUeUixcn1pMwHiNdiC6v9OjwmvR4g4igrm/jc7BAhUB0zMAQPkVEq1 wzJf3wX1UaUgGzAPJi6dcvzPgJjyyPNGW8ujEvFQY0cv2WyWHtEi8G2psbmUsAgZQ4o6 /bacDRHvTHkZPjH2Jttxses0iz7/H3KUrePg0lkcp/tmhEEgYoi0PXmFgi8Ry7VJ91Rz FgpIL702L8KyEdR1M0PmejrzIPlophymQnkde5IigQ8ipNCv+COTV4SPHT6JB/T0pz60 ijdWBcL3ikkoNnAFtmT4JGwWCmbKdoiVL/I72jIKjjdTwJlGGRfC7k2ziaYps5EVY5G5 zYbw== X-Gm-Message-State: AOAM532gL1cUsE7UqVi3XT5tnkUJklCt1qPP2/02DUC4ZYZrcv4S1chr EfEnBV5xHaCMtu2lGF3HLKj4bw== X-Received: by 2002:a17:907:76c7:: with SMTP id kf7mr2948887ejc.470.1616142275944; Fri, 19 Mar 2021 01:24:35 -0700 (PDT) Received: from dell.default ([91.110.221.194]) by smtp.gmail.com with ESMTPSA id b18sm3273727ejb.77.2021.03.19.01.24.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 19 Mar 2021 01:24:35 -0700 (PDT) From: Lee Jones To: lee.jones@linaro.org Subject: [PATCH 04/19] include: drm: drm_atomic: Make use of 'new_plane_state' Date: Fri, 19 Mar 2021 08:24:13 +0000 Message-Id: <20210319082428.3294591-5-lee.jones@linaro.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20210319082428.3294591-1-lee.jones@linaro.org> References: <20210319082428.3294591-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