Message ID | 20210108201457.3078600-21-lee.jones@linaro.org |
---|---|
State | Superseded |
Headers | show
Delivered-To: patch@linaro.org Received: by 2002:a02:85a7:0:0:0:0:0 with SMTP id d36csp855851jai; Fri, 8 Jan 2021 12:15:44 -0800 (PST) X-Google-Smtp-Source: ABdhPJzRRoDkXzvdr4mzoWcE4UxysLbFjeIP/BN4WIecS2dzxpvDJ4YbtRnD4pVq4uzrpuB00H/O X-Received: by 2002:aa7:8b05:0:b029:1aa:122b:4368 with SMTP id f5-20020aa78b050000b02901aa122b4368mr5164373pfd.25.1610136944538; Fri, 08 Jan 2021 12:15:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610136944; cv=none; d=google.com; s=arc-20160816; b=fxW1WYVzV+zpaNyb5U5PqWeW/AmykOx4N9HaS6pPfHQTId3qMJyGY7ji4SLGYjIngt jhoj7RaenlX+sOSr+v7m5p7hTqCxWJ2Yh84mtwuWgJUMHhYE2K9EnOZZiYDVh5hXYGYb z97dS1PCE9sRihGUkLM6xV3oVJb6Gm6fjJVz93966Gb/P9ipD6Gps86h+/6QADVWRBN2 6b0G33knsZEsk0sEQrD50lPZTKzv2H6DcKaa8ARWdB5ErFx0xE2DifCMXQpR7vi3mbUX CoJIMmmFkHQiMCw7jKBt2uGSAcqTP/0caPlvKga1yvf/oGm7kcaHPVIMe1aHwqnAHOzn TvLg== 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=BX5y68iv9tz/w1nsZr3OKWT/XVprBuwVFYJV/hT4M0g=; b=mnJn7ou7K4rhoDDE5z9vuKn1EeMzOnFp7WMHOeOGH07p6zhelosEVbzr8ad7MT1Qsm doBZvG2lqzOqAC4SNvGjyR8PLwRKfXsejFeYKSdGw/2AhwYObmwS5LRIWf1NA+fspF/t fmrJ5PsKdjUZ/VWF1dOrAzVePXq/TMtrscWCzjoqX79xCvAq93aQYM/mnkDkrRAr6N94 P7Qcui3cFjg6ZIowV/vo6HZN1hMVDeEFM6dFUdRSqwLzqac7iwbEw1j3Aphd5Ybjl5lS dmBk5y5ZrBNsngWb9XDXsO19VqzA2rgldLXJZ9jUFEhJ4FmgslDBBmhtTKGmMjZznIZy iZvQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b="SqJbv6z/"; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 2610:10:20:722:a800:ff:fe36:1795 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: <dri-devel-bounces@lists.freedesktop.org> Received: from gabe.freedesktop.org (gabe.freedesktop.org. [2610:10:20:722:a800:ff:fe36:1795]) by mx.google.com with ESMTPS id 13si10000164pfi.149.2021.01.08.12.15.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Jan 2021 12:15:44 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 2610:10:20:722:a800:ff:fe36:1795 as permitted sender) client-ip=2610:10:20:722:a800:ff:fe36:1795; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b="SqJbv6z/"; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 2610:10:20:722:a800:ff:fe36:1795 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 250526E8CE; Fri, 8 Jan 2021 20:15:37 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wr1-x433.google.com (mail-wr1-x433.google.com [IPv6:2a00:1450:4864:20::433]) by gabe.freedesktop.org (Postfix) with ESMTPS id 2EB256E8D8 for <dri-devel@lists.freedesktop.org>; Fri, 8 Jan 2021 20:15:35 +0000 (UTC) Received: by mail-wr1-x433.google.com with SMTP id c5so10131203wrp.6 for <dri-devel@lists.freedesktop.org>; 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=n5q0AR5mtxVHwblm1G+3jN3xhGTUeQN8ZsR2ZPu++0EOYmseZt8zwQ9xUG7gDHkf2j sAyATRTzTuKT526s0DAUhZMQu0vvJEUVyJz1rRHhaXe3JcGGRnkU+nvCujiQmYBkS3hK QT9EtCEU9CmjLNqo7FXfGd7t7PdCOWjiUNrA07INQIgvv50dX3+ziPQhEPs4HuSnqGj6 TincL5WDGr1UsjjKusTBW2ImT/wfK+WoVWMXBL22CN8+lgIgU3Zw/D/K3yTow9YJJJ06 WJPIn8IyNoop+I4512vlLJfmO+iqfYLw2NtkD07kNj6AWanGLVFHEdA7kddG+Ga9pV+h 1WoA== X-Gm-Message-State: AOAM533V86lyE26RRs4tnz+J4yXP/Je9daxgVBR/7yLD/pM0jCQXdhOn SeBUyfNz9qQVd9sltS+fXb3ljQ== 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 <lee.jones@linaro.org> To: lee.jones@linaro.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 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development <dri-devel.lists.freedesktop.org> List-Unsubscribe: <https://lists.freedesktop.org/mailman/options/dri-devel>, <mailto:dri-devel-request@lists.freedesktop.org?subject=unsubscribe> List-Archive: <https://lists.freedesktop.org/archives/dri-devel> List-Post: <mailto:dri-devel@lists.freedesktop.org> List-Help: <mailto:dri-devel-request@lists.freedesktop.org?subject=help> List-Subscribe: <https://lists.freedesktop.org/mailman/listinfo/dri-devel>, <mailto:dri-devel-request@lists.freedesktop.org?subject=subscribe> Cc: David Airlie <airlied@linux.ie>, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Thomas Zimmermann <tzimmermann@suse.de> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" <dri-devel-bounces@lists.freedesktop.org> |
Series |
Rid W=1 warnings from GPU
|
expand
|
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
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 <maarten.lankhorst@linux.intel.com> Cc: Maxime Ripard <mripard@kernel.org> Cc: Thomas Zimmermann <tzimmermann@suse.de> Cc: David Airlie <airlied@linux.ie> Cc: Daniel Vetter <daniel@ffwll.ch> Cc: Rob Clark <robdclark@gmail.com> Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones <lee.jones@linaro.org> --- include/drm/drm_atomic.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)