linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Lee Jones <lee.jones@linaro.org>
To: lee.jones@linaro.org
Cc: linux-kernel@vger.kernel.org,
	Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
	Maxime Ripard <mripard@kernel.org>,
	Thomas Zimmermann <tzimmermann@suse.de>,
	David Airlie <airlied@linux.ie>, Daniel Vetter <daniel@ffwll.ch>,
	Rob Clark <robdclark@gmail.com>,
	dri-devel@lists.freedesktop.org
Subject: [PATCH 05/53] include: drm: drm_atomic: Make use of 'new_plane_state'
Date: Wed,  3 Mar 2021 13:42:31 +0000	[thread overview]
Message-ID: <20210303134319.3160762-6-lee.jones@linaro.org> (raw)
In-Reply-To: <20210303134319.3160762-1-lee.jones@linaro.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 <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(-)

diff --git a/include/drm/drm_atomic.h b/include/drm/drm_atomic.h
index ce7023e9115d7..a71c19e1d785c 100644
--- a/include/drm/drm_atomic.h
+++ b/include/drm/drm_atomic.h
@@ -867,7 +867,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.27.0


  parent reply	other threads:[~2021-03-03 18:10 UTC|newest]

Thread overview: 69+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-03 13:42 [RESEND 00/53] Rid GPU from W=1 warnings Lee Jones
2021-03-03 13:42 ` [PATCH 01/53] drm/nouveau/nvkm/subdev/bios/init: Demote obvious abuse of kernel-doc Lee Jones
2021-03-03 13:42 ` [PATCH 02/53] drm/nouveau/dispnv50/disp: Remove unused variable 'ret' Lee Jones
2021-03-03 13:42 ` [PATCH 03/53] drm/msm/dp/dp_display: Remove unused variable 'hpd' Lee Jones
2021-03-03 13:42 ` [PATCH 04/53] drm/amd/display/dc/bios/command_table: Remove unused variable Lee Jones
2021-03-03 15:22   ` Alex Deucher
2021-03-03 13:42 ` Lee Jones [this message]
2021-03-03 13:42 ` [PATCH 06/53] drm/nouveau/nvkm/subdev/volt/gk20a: Demote non-conformant kernel-doc headers Lee Jones
2021-03-03 13:42 ` [PATCH 07/53] drm/amd/display/dc/bios/command_table: Remove unused variable and associated comment Lee Jones
2021-03-03 15:22   ` Alex Deucher
2021-03-03 13:42 ` [PATCH 08/53] drm/amd/display/dc/calcs/dce_calcs: Move some large variables from the stack to the heap Lee Jones
2021-03-03 13:46   ` Christian König
2021-03-03 13:42 ` [PATCH 09/53] drm/amd/display/dc/calcs/dce_calcs: Remove some large variables from the stack Lee Jones
2021-03-03 13:42 ` [PATCH 10/53] drm/amd/display/dc/dce/dce_aux: Remove duplicate line causing 'field overwritten' issue Lee Jones
2021-03-03 15:24   ` Alex Deucher
2021-03-03 13:42 ` [PATCH 11/53] drm/amd/display/dc/dce80/dce80_resource: Make local functions static Lee Jones
2021-03-03 13:42 ` [PATCH 12/53] drm/nouveau/nvkm/engine/gr/gf100: Demote non-conformant kernel-doc header Lee Jones
2021-03-03 13:42 ` [PATCH 13/53] drm/nouveau/nouveau_bo: Remove unused variables 'dev' Lee Jones
2021-03-03 13:42 ` [PATCH 14/53] drm/nouveau/nouveau_display: Remove set but unused variable 'width' Lee Jones
2021-03-03 13:42 ` [PATCH 15/53] drm/nouveau/dispnv04/crtc: Demote non-conforming kernel-doc headers Lee Jones
2021-03-03 13:42 ` [PATCH 16/53] drm/nouveau/dispnv50/disp: Remove unused variable 'ret' from function returning void Lee Jones
2021-03-03 13:42 ` [PATCH 17/53] drm/nouveau/dispnv50/headc57d: Make local function 'headc57d_olut' static Lee Jones
2021-03-03 16:52   ` Lyude Paul
2021-03-03 13:42 ` [PATCH 18/53] drm/nouveau/nv50_display: Remove superfluous prototype for local static functions Lee Jones
2021-03-03 13:42 ` [PATCH 19/53] drm/nouveau/dispnv50/disp: Include header containing our prototypes Lee Jones
2021-03-03 13:42 ` [PATCH 20/53] drm/nouveau/nouveau_ioc32: File headers are not good candidates for kernel-doc Lee Jones
2021-03-03 13:42 ` [PATCH 21/53] drm/nouveau/nouveau_svm: Remove unused variable 'ret' from void function Lee Jones
2021-03-03 13:42 ` [PATCH 22/53] drm/nouveau/nouveau_ioc32: Demote kernel-doc abuse to standard comment block Lee Jones
2021-03-03 13:42 ` [PATCH 23/53] drm/vmwgfx/vmwgfx_execbuf: Fix some kernel-doc related issues Lee Jones
2021-03-03 13:42 ` [PATCH 24/53] drm/vmwgfx/vmwgfx_kms: Remove unused variable 'ret' from 'vmw_du_primary_plane_atomic_check()' Lee Jones
2021-03-03 13:42 ` [PATCH 25/53] drm/vmwgfx/vmwgfx_kms: Mark vmw_{cursor,primary}_plane_formats as __maybe_unused Lee Jones
2021-03-03 13:42 ` [PATCH 26/53] drm/vmwgfx/vmwgfx_drv: Fix some kernel-doc misdemeanours Lee Jones
2021-03-03 13:42 ` [PATCH 27/53] drm/vmwgfx/vmwgfx_ioctl: Provide missing '@' sign required by kernel-doc Lee Jones
2021-03-03 13:42 ` [PATCH 28/53] drm/vmwgfx/vmwgfx_resource: Fix worthy function headers demote some others Lee Jones
2021-03-03 13:42 ` [PATCH 29/53] drm/vmwgfx/vmwgfx_ttm_buffer: Supply some missing parameter descriptions Lee Jones
2021-03-03 13:42 ` [PATCH 30/53] drm/vmwgfx/vmwgfx_fifo: Demote non-conformant kernel-doc header Lee Jones
2021-03-03 13:42 ` [PATCH 31/53] drm/vmwgfx/vmwgfx_ldu: Supply descriptions for 'state' function parameter Lee Jones
2021-03-03 13:42 ` [PATCH 32/53] drm/vmwgfx/vmwgfx_kms: Update worthy function headers and demote others Lee Jones
2021-03-03 13:42 ` [PATCH 33/53] drm/vmwgfx/vmwgfx_overlay: Demote kernel-doc abuses to standard comment blocks Lee Jones
2021-03-03 13:43 ` [PATCH 34/53] drm/vmwgfx/vmwgfx_fence: Add, remove and demote various documentation params/headers Lee Jones
2021-03-03 13:43 ` [PATCH 35/53] drm/vmwgfx/vmwgfx_bo: Remove superfluous param description and supply another Lee Jones
2021-03-03 13:43 ` [PATCH 36/53] drm/vmwgfx/vmwgfx_context: Demote kernel-doc abuses Lee Jones
2021-03-03 13:43 ` [PATCH 37/53] drm/vmwgfx/vmwgfx_scrn: Demote unworthy kernel-doc headers and update others Lee Jones
2021-03-03 13:43 ` [PATCH 38/53] drm/vmwgfx/vmwgfx_surface: Fix some kernel-doc related issues Lee Jones
2021-03-03 13:43 ` [PATCH 39/53] drm/vmwgfx/vmwgfx_cmdbuf_res: Rename param description and remove another Lee Jones
2021-03-03 13:43 ` [PATCH 40/53] drm/vmwgfx/vmwgfx_shader: Demote kernel-doc abuses and fix-up worthy headers Lee Jones
2021-03-03 13:43 ` [PATCH 41/53] drm/vmwgfx/vmwgfx_cmdbuf: Fix a bunch of missing or incorrectly formatted/named params Lee Jones
2021-03-03 13:43 ` [PATCH 42/53] drm/vmwgfx/vmwgfx_cmdbuf_res: Remove unused variable 'ret' Lee Jones
2021-03-03 13:43 ` [PATCH 43/53] drm/vmwgfx/vmwgfx_stdu: Add some missing param/member descriptions Lee Jones
2021-03-03 13:43 ` [PATCH 44/53] drm/vmwgfx/vmwgfx_cmdbuf: Fix misnaming of 'headers' should be plural Lee Jones
2021-03-03 13:43 ` [PATCH 45/53] drm/vmwgfx/vmwgfx_cotable: Fix a couple of simple documentation problems Lee Jones
2021-03-03 13:43 ` [PATCH 46/53] drm/vmwgfx/vmwgfx_so: Add description for 'vmw_view's 'rcu' member Lee Jones
2021-03-03 13:43 ` [PATCH 47/53] drm/vmwgfx/vmwgfx_binding: Provide some missing param descriptions and remove others Lee Jones
2021-03-03 13:43 ` [PATCH 48/53] drm/vmwgfx/vmwgfx_msg: Fix misspelling of 'msg' Lee Jones
2021-03-03 13:43 ` [PATCH 49/53] drm/vmwgfx/vmwgfx_blit: Add description for 'vmw_bo_cpu_blit's 'diff' param Lee Jones
2021-03-03 13:43 ` [PATCH 50/53] drm/vmwgfx/vmwgfx_validation: Add some missing struct member/function param descriptions Lee Jones
2021-03-03 13:43 ` [PATCH 51/53] drm/vmwgfx/ttm_object: Demote half-assed headers and fix-up another Lee Jones
2021-03-03 13:43 ` [PATCH 52/53] drm/vmwgfx/vmwgfx_thp: Add description for 'vmw_thp_manager's member 'manager' Lee Jones
2021-03-03 13:43 ` [PATCH 53/53] drm/vmwgfx/ttm_object: Reorder header to immediately precede its struct Lee Jones
2021-03-05 15:33 ` [RESEND 00/53] Rid GPU from W=1 warnings Roland Scheidegger
2021-03-08  9:19   ` Lee Jones
2021-03-11 13:31     ` Daniel Vetter
2021-03-11 13:51       ` Lee Jones
2021-03-17  8:17         ` Lee Jones
2021-03-17 20:32           ` Daniel Vetter
2021-03-18 13:18             ` Daniel Vetter
2021-03-19  8:24               ` Lee Jones
2021-03-19 17:55                 ` Daniel Vetter
2021-03-22  8:39                   ` Lee Jones

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210303134319.3160762-6-lee.jones@linaro.org \
    --to=lee.jones@linaro.org \
    --cc=airlied@linux.ie \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=mripard@kernel.org \
    --cc=robdclark@gmail.com \
    --cc=tzimmermann@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).