Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp568163iog; Mon, 13 Jun 2022 08:17:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy924iWZvydmRiYemIOYGphyblwJZ2kr6TuMi59L3AFJw5r7DBztmomrBQvbQM3ZvXq63MZ X-Received: by 2002:a17:906:530e:b0:713:3a97:1cf9 with SMTP id h14-20020a170906530e00b007133a971cf9mr349608ejo.110.1655133458036; Mon, 13 Jun 2022 08:17:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655133458; cv=none; d=google.com; s=arc-20160816; b=ab94N2GdU8dEM0nWB3MDcwDfozvVe640jMQJ6D4Dl9lL8NdIVtovsk5kN3fEczqviY 1+czIbNZB0F6pZzrtZaq0wMN177Q0CtRL+7GEBn3s+k2X9qPuXfzreqkjbf/8otZXfOh mhj7aYxQPvy8+zfQJdW/4M3YIXeTweYKOX66X26O2oMR2U4qqo8MI8MY+btvoMAohnC9 tORWIhhUOGRxs7kOJBfYDyl+9A/XyoBRbL5Q0J4LFJI9W6H1nfmmsdl8QWruCsffh80K KD79x35q9/CMIWfxc/tSjAXQ5tWH6wgyFW7GrHZ4LKxcjSU5ORQaN3OoYM13vNnndzO4 WaLQ== 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=bKwWbdL+mWQGdP/DCMhPHqyyyIVP4IPyQOLn2oXTSzw=; b=zrCucIYKx6L6G62+6GR2B4p5rQxocci6m179fswVkyn3Rzi5rtmFmGM46FtiZf+tKS 7RxL5iKERMiboQa9cGx+aKYdkQgwoJkU3NrAotux7gVmXU4ucUuqjC86dj7r73Iq6FL9 2UiFOwtCvCnOodMbeyVTfxppFfjlrGdoaVCNbZ7XONu56pc5lCKQQcnOZDbwy87meMRL tpVIdZLIFdgCosIFjkqkFzu3pxIcJwVW6HTumSxiGIQf7SA/xN67H7tsuLOPZ4OYRee/ BFpF5XXskfAhNjMcak9GrAzlIaIRO/nysi7mOX56CdgFs6x/G974phiKOEV+01JhwREd luxg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=W6WjgKtw; 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 jg15-20020a170907970f00b00711ee53603esi9029072ejc.595.2022.06.13.08.17.13; Mon, 13 Jun 2022 08:17:38 -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=W6WjgKtw; 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 S1351696AbiFMLHk (ORCPT + 99 others); Mon, 13 Jun 2022 07:07:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52636 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1351383AbiFMK7x (ORCPT ); Mon, 13 Jun 2022 06:59:53 -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 1703731236; Mon, 13 Jun 2022 03:33:05 -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 4154060AE6; Mon, 13 Jun 2022 10:32:59 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4F984C34114; Mon, 13 Jun 2022 10:32:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1655116378; bh=1HHNl2/qevY9HHkcc+PsSUTlLFN389SZEZAU/LuTha8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=W6WjgKtwgpi4hDtbuztUiK3L8Mjxo+eYWHJPdHlBRkPhapiM/cWr/KvVOzXxSDNXT CEQieUZagIgqj9QhRvYKsnP1+sCnhmn8/3TBCEoNq3Luy2wOKR65x/zbMworUdlyZ7 oKdG+aYl8D50NYf8roUhbJLAHA70NVgGdislvDAc= 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.14 180/218] drm: imx: fix compiler warning with gcc-12 Date: Mon, 13 Jun 2022 12:10:38 +0200 Message-Id: <20220613094926.067496625@linuxfoundation.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220613094908.257446132@linuxfoundation.org> References: <20220613094908.257446132@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 12dd261fc308..628de21c03d2 100644 --- a/drivers/gpu/drm/imx/ipuv3-crtc.c +++ b/drivers/gpu/drm/imx/ipuv3-crtc.c @@ -72,7 +72,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