Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp591797iog; Mon, 13 Jun 2022 08:45:15 -0700 (PDT) X-Google-Smtp-Source: AGRyM1v9xeUW83weBNd4G2EIZ9mgB6H7Fdx09xEwUuMMcuSRwWrsPZ/N2JsWYcmVXgaTZnuQL6vv X-Received: by 2002:a17:906:7c0c:b0:6f9:1fc:ebf3 with SMTP id t12-20020a1709067c0c00b006f901fcebf3mr403407ejo.403.1655135115357; Mon, 13 Jun 2022 08:45:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655135115; cv=none; d=google.com; s=arc-20160816; b=xgUWW4X1pxhVlZW/8CvZD2QzIJZ0sAQrb8gUt5zJM9nriyRvPt7NmZmI/EAqaQy9VV uQSLIR1ETy8L59PuqjPpuOGakcGfYA0SvRrQuQmNq3z+hk+bZFa8yYdzuFS5B+RxrnEe fpX2z5vyKcODRwfYWuVJ5+VleorWhXoSTThWcANDnmP2p7A/C3tL0cEQ/Rt/3ILQcE93 mERc2SGS5robtas3bMbRaADULK9g3u0m1C7cR0pwTvgQ9incgfldXS4/ETFCWmsb3KQ7 xM85oWS+OTFHtcQOmIO87ubkzJ1IfJrx3fHih7dtZbD2IGIu8vxSm6b1DAaPfS1B4h9N 1C2g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=AZc66BDTH0NCY+eke5EAgU5BOoKZWX4X+7xz4RaJ1BA=; b=zTQ9HG88POJ+ZFzeAPB+stbKVnZ640ef4DiupPpv7Y2u+cqDg5yqkoK+ijNmTxqrng 3pmDrpZx8/xA9n/GG2A5fJeExNdsx9ZMQt7Fc/vQNhFtOLZknP5xm3ZiGlnD5A158tio a5Y6t/QTTnOx/n7kfLyQTT9SDa+fGG3IqnmK8wiA5bBNc2mP5rJfB+ou9tZPNftMz4Uz c0vGX8EiT/7sJ/lrfQ+BBRh/E866QNfHHb5KpS+6RHSQ2wxxY4oKiDhUPFSpEcUe8tl5 NszjmwEJYgDszGw8A/WefCMBjda/Y6BoMuwzRBLbK3IyYB2eaaMChciwunoZgIfpl/08 +O3w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=t6r74Qya; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f22-20020a0564021e9600b0042be3591e27si9268200edf.509.2022.06.13.08.44.50; Mon, 13 Jun 2022 08:45:15 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=t6r74Qya; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1351129AbiFMMUa (ORCPT + 99 others); Mon, 13 Jun 2022 08:20:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49106 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1353582AbiFMMRz (ORCPT ); Mon, 13 Jun 2022 08:17:55 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0D7EA5622A; Mon, 13 Jun 2022 04:02:39 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 4306561418; Mon, 13 Jun 2022 11:02:39 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4FEE5C3411C; Mon, 13 Jun 2022 11:02:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1655118158; bh=2+sXTKepR/8b3NHPfAW945T66hNq49V6LWnAU9ieP1E=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=t6r74Qya5m33Zhxzo2xt3K8kcN1narDf4kyF0JnniR8OLaNPANoyTGNnmOhBhSYPw ZCa0YIUY6mQGK9HHZXaQy/ABVgm3LpQQd7uEki+Ppf47vIv79rIR6c092adKlcSs2w mL+G6gv1W3bXKYyAVGTHwRkCpeTpLM79iAM1A2uQ= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Philipp Zabel , Linus Torvalds , Sasha Levin Subject: [PATCH 4.19 247/287] drm: imx: fix compiler warning with gcc-12 Date: Mon, 13 Jun 2022 12:11:11 +0200 Message-Id: <20220613094931.504930806@linuxfoundation.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220613094923.832156175@linuxfoundation.org> References: <20220613094923.832156175@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-8.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Linus Torvalds [ Upstream commit 7aefd8b53815274f3ef398d370a3c9b27dd9f00c ] Gcc-12 correctly warned about this code using a non-NULL pointer as a truth value: drivers/gpu/drm/imx/ipuv3-crtc.c: In function ‘ipu_crtc_disable_planes’: drivers/gpu/drm/imx/ipuv3-crtc.c:72:21: error: the comparison will always evaluate as ‘true’ for the address of ‘plane’ will never be NULL [-Werror=address] 72 | if (&ipu_crtc->plane[1] && plane == &ipu_crtc->plane[1]->base) | ^ due to the extraneous '&' address-of operator. Philipp Zabel points out that The mistake had no adverse effect since the following condition doesn't actually dereference the NULL pointer, but the intent of the code was obviously to check for it, not to take the address of the member. Fixes: eb8c88808c83 ("drm/imx: add deferred plane disabling") Acked-by: Philipp Zabel Signed-off-by: Linus Torvalds Signed-off-by: Sasha Levin --- drivers/gpu/drm/imx/ipuv3-crtc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/imx/ipuv3-crtc.c b/drivers/gpu/drm/imx/ipuv3-crtc.c index ff34f9bb55a1..824c90dca730 100644 --- a/drivers/gpu/drm/imx/ipuv3-crtc.c +++ b/drivers/gpu/drm/imx/ipuv3-crtc.c @@ -71,7 +71,7 @@ static void ipu_crtc_disable_planes(struct ipu_crtc *ipu_crtc, drm_atomic_crtc_state_for_each_plane(plane, old_crtc_state) { if (plane == &ipu_crtc->plane[0]->base) disable_full = true; - if (&ipu_crtc->plane[1] && plane == &ipu_crtc->plane[1]->base) + if (ipu_crtc->plane[1] && plane == &ipu_crtc->plane[1]->base) disable_partial = true; } -- 2.35.1