From patchwork Mon Nov 16 17:41:12 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 324508 Delivered-To: patch@linaro.org Received: by 2002:a05:6e02:5ce:0:0:0:0 with SMTP id l14csp3506976ils; Mon, 16 Nov 2020 09:42:44 -0800 (PST) X-Google-Smtp-Source: ABdhPJx/zAutc0ltyjRzYro8/KkPiRDLTNVuOQ7f+cZcZ6LH/dSoEKI0DMF4ZcE7hYa5eRv0ASgy X-Received: by 2002:a17:90a:d184:: with SMTP id fu4mr16115659pjb.173.1605548564722; Mon, 16 Nov 2020 09:42:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605548564; cv=none; d=google.com; s=arc-20160816; b=MhBfWnMQ3ovWEJun9CKPXq4VmMh6EUBAynODql36rNsEi38Y2l2dhhzbaa+40VfPit BBJHo6ROLRneQvE0g7lLtfsaJIfI3yL1zJplkER0103cPKt5spyukNEWrxPRjeCldgbE PexGaq6SmUYMf8MGS3VANXjG+VnHAHRlNd6dgNJjcCPPfLMnymaBMV26WtcOBCPhQpdD cnUMXdx91wdMg61IZw3ztjzaDU0Wa1M3/SuKvIpL6L/Zcr2uQhPOiRzEYJquhIojiFGr DT3gNOSt1oHdDDNFFVU6YAdkew8sXkT/gvdRl/YEOoRAdTzvFWEpGvfLbHnd4gbYu2dk T3rQ== 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=AYjouYM7YunyryR6DvGOUHfiKpweD25pbO/mm3H4deQ=; b=yO4bgQfD49FfheIJNfWBGi16n5Xxjtct+pFsDPLPLtOMpEgUbbfwS9hHSPwlnCFdYM hfmNeb6e3TAezpCCuBX6c6QNbvrh+sKohWxQbwwUCrtJKeI9uPo0667+hSnPekzXuip4 BdBhLAf2+c5ajsmgfTCHa4rhhAgApCib9EWN0NepPzzlNAb+gVzTTmNpAPIqQ/LXFqq9 dTVYaqOxSLUoZwu+lgAK6h4L558ILSVDkH9jNgKXvP0tN+YTOYMIveoAHgTiEtHY84Mn iEUTXj1e8msyyTUmNlSuWSwpBwkqgNzX0yig6FqfXl9qliOHfjyzHJSUSSLPdcDuvWar jOvA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=UjF5WqGy; 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 w11si15903pjf.113.2020.11.16.09.42.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Nov 2020 09:42:44 -0800 (PST) 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=UjF5WqGy; 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 174F16EA15; Mon, 16 Nov 2020 17:42:39 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wr1-x443.google.com (mail-wr1-x443.google.com [IPv6:2a00:1450:4864:20::443]) by gabe.freedesktop.org (Postfix) with ESMTPS id BDC826E9FA for ; Mon, 16 Nov 2020 17:42:20 +0000 (UTC) Received: by mail-wr1-x443.google.com with SMTP id u12so12446526wrt.0 for ; Mon, 16 Nov 2020 09:42:20 -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=AA3ifXfkFgEiPb/+ErWAHaArtQGSrp8moUYg4qmaDWk=; b=UjF5WqGyB7EH7OhySfFTVMXhaSx34pvV4mfdWl92PAWblT7uWjt4EwdhGq4opaxfLb orZ7sxKafXTs+opxYnQzhDGyotWpmYeb9VKFYp3i+810+f64cW0rKZ68feO0yDcmvLC1 S/Q/4p8zK32nfoxT6fR/BCXo/GZfP2gSDppe75Kbss/WbsbJoHmBR866lH3s/zfwKhZf IuYlJIjyzMQaEBu6dsOnwYELcHmpH4/Hb3o9cYIe+FWPQz+C+BvpuXW783/4+ZjzjPIM +8Wn80vVhpZXESufXsvdhx5gvWEKTRfxtfegS/nbCAdJUjwMpwutlXm4gYEVbmSZmHCW /k6Q== 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=AA3ifXfkFgEiPb/+ErWAHaArtQGSrp8moUYg4qmaDWk=; b=p/HzWUdme/ot7ZC6BbGqhHfpOGBUXpYVSRNLPflbama/Jh919F3Or8uu+Gv1cviqyB WRsLAN+44jIkIScoZD/ecgVH9yee53igZbZrqCjg0HCmpqtDUHixaiU+cuJ1W8pFoPmX p+Op2SQVuquya28piUp63jvHBx6m76rw2iM10kVUsb/7+JPGGuA/yaXBbQwr1pfif7iv gxCYsj0VgZji5dLhXsIxK9F+MLTSZ6R0JQkaecb0tuROlrJ5vP9LVgIHMy0Wdzzh7nu/ XaeSgzhphaUchQ4tm5Bff1T/AmipQvCWtaFdi2J7SK2bfb5crB2HDSxD/Bgulrvkf4ib 9xww== X-Gm-Message-State: AOAM531Pn5k/cQDgwk7cgusPpxvbVpjs3joWt8v0aRw4zvUH8+b4DUH4 ll6/6siuuQflNdF4pgTQy4f+hg== X-Received: by 2002:adf:cf0b:: with SMTP id o11mr20119219wrj.162.1605548539468; Mon, 16 Nov 2020 09:42:19 -0800 (PST) Received: from dell.default ([91.110.221.159]) by smtp.gmail.com with ESMTPSA id n10sm24667224wrx.9.2020.11.16.09.42.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Nov 2020 09:42:18 -0800 (PST) From: Lee Jones To: lee.jones@linaro.org Subject: [PATCH 42/42] include/drm/drm_atomic: Make use of 'new_crtc_state' Date: Mon, 16 Nov 2020 17:41:12 +0000 Message-Id: <20201116174112.1833368-43-lee.jones@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201116174112.1833368-1-lee.jones@linaro.org> References: <20201116174112.1833368-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 , Sascha Hauer , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, NXP Linux Team , Shawn Guo , Pengutronix Kernel Team Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" In the macro for_each_oldnew_crtc_in_state() 'crtc_state' is provided as a container for state->crtcs[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/imx/ipuv3-plane.c: In function ‘ipu_planes_assign_pre’: drivers/gpu/drm/imx/ipuv3-plane.c:746:42: warning: variable ‘crtc_state’ set but not used [-Wunused-but-set-variable] Cc: Philipp Zabel Cc: David Airlie Cc: Daniel Vetter Cc: Shawn Guo Cc: Sascha Hauer Cc: Pengutronix Kernel Team Cc: Fabio Estevam Cc: NXP Linux Team 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 dc5e0fbecc04e..54e051a957dfc 100644 --- a/include/drm/drm_atomic.h +++ b/include/drm/drm_atomic.h @@ -783,7 +783,8 @@ void drm_state_dump(struct drm_device *dev, struct drm_printer *p); (void)(crtc) /* Only to avoid unused-but-set-variable warning */, \ (old_crtc_state) = (__state)->crtcs[__i].old_state, \ (void)(old_crtc_state) /* Only to avoid unused-but-set-variable warning */, \ - (new_crtc_state) = (__state)->crtcs[__i].new_state, 1)) + (new_crtc_state) = (__state)->crtcs[__i].new_state, \ + (void)(new_crtc_state) /* Only to avoid unused-but-set-variable warning */, 1)) /** * for_each_old_crtc_in_state - iterate over all CRTCs in an atomic update