Received: by 2002:ab2:6a05:0:b0:1f8:1780:a4ed with SMTP id w5csp2128408lqo; Mon, 13 May 2024 08:34:12 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCW93MkSwrHAW+kswjMNyDAjsTXPzS6SPs31F9l/VodYsjVFFDmDzp0hoDnt+H3wCeOagQajX5D7MFfLId4HzmvoimBpZmQzjwLF8QDUJA== X-Google-Smtp-Source: AGHT+IETyhg3agq24jkGr0nkCmhgrZfZXu4N/1jK6+W28hD+GZAHXhiANOP8Sr41gJ9RXBlOf+vV X-Received: by 2002:a05:6122:2018:b0:4d4:20cb:8c0 with SMTP id 71dfb90a1353d-4df882cc551mr7973346e0c.8.1715614451999; Mon, 13 May 2024 08:34:11 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715614451; cv=pass; d=google.com; s=arc-20160816; b=IN/VDXFMFdPat8eYADGWaMWsQUk04GilSw6sQq0PUbpjr1orfErBCN5TucrKDGJ1d7 REEEWZm/EfFttdWDlXHcb3GD+GKWBs2aeCaUAokq4hL+bVZMBFiJWp8UZ6vli3Loy8GQ TrwyIHmXOt1DWtJngl+CUfudpq7w1K6LDF4gPNJdj4B7usyt6jp/bxCghDoyrArgckcc 05XswI1hKluv2g3FqXljdEar+6LGh6VkM9AKl84kN7d/VZq5nFBzAq+G9KG5q3AklEYE bKNcfRLiE4DQ+DsXmRGCLe8RuTgB+KjMbHAt7IqiTc1mR+gPZQMlIWEKQjx0iDnZE3Rf bRfA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=nkbxX2OwAWgCxYscfgCjR1gkqrQYqnnGwxp+P1UMWgE=; fh=YtI1unxrdsy37CaPN2XWjLZc9EMsMnSRizG41qMMsuU=; b=W+ikkSfJ1PDrMgzQj7G4bjJL5dzAxTA3RiJGTFgmc4NzdUNzgnUeUkrxnTxEtgsWDF bxdWZq6m1FCjBVjVnDwHKPxnNr7WVvYH8fDmutFZm8kKZ6n5WIWPKWDLMis8t7HhCSTF xpJ3RfCxQRdL7z9ET4QDt0mdvlyKhe8CfqN/64XsOWC/3j2i6858P9wGOZALQBSXpT2H JWZSQeW9jG+ZKcCzNybrtgxjgBg1SoFRhK8vZ6/FPHFWkji4uXCA+NcuZXhvGBYMB3i0 Geuo/+r/r3Lj+Q5ZNs+oNgKq87MOLOMbfdvR0VRwZCGe5dOlPNahHwW8Zex6UjmoneMV Unsg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=M1ILIjTF; arc=pass (i=1 spf=pass spfdomain=linux.dev dkim=pass dkdomain=linux.dev dmarc=pass fromdomain=linux.dev); spf=pass (google.com: domain of linux-kernel+bounces-177754-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-177754-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id ada2fe7eead31-4806cc90b23si1794659137.589.2024.05.13.08.34.11 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 May 2024 08:34:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-177754-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=M1ILIjTF; arc=pass (i=1 spf=pass spfdomain=linux.dev dkim=pass dkdomain=linux.dev dmarc=pass fromdomain=linux.dev); spf=pass (google.com: domain of linux-kernel+bounces-177754-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-177754-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id C23ED1C23A2B for ; Mon, 13 May 2024 15:33:11 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E342A15534D; Mon, 13 May 2024 15:31:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="M1ILIjTF" Received: from out-173.mta1.migadu.com (out-173.mta1.migadu.com [95.215.58.173]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A5F81154423 for ; Mon, 13 May 2024 15:31:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=95.215.58.173 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715614309; cv=none; b=LQaEjdi8B0Itj3KYV5SwuiUMxGjMSnAtj0tTy8gSnST6t8i+FraeZOaY4cyPpIrgAwez6k56sXiUxmrEPRJRK42l9ZHIGNDenRyph9dxlNUw/MScmzYfvXtbbwTb18KTLa6WHq19TUN/SlWtl11DN++kpfmYU3kCxLZG+pEYEic= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715614309; c=relaxed/simple; bh=OHFPhmCPsIkBczUTDxHdD/cg+ysEJEKlkbzJo8QYj5Y=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=i5iXfeXMI3H7zk8qiMVDsxoPOofm+16o0V/7RmQJOf7GqI8xp3ARRAhQ0SSgLZ5zLnOAwdySj9bXM6JLHTlOFpaIFzrConjT9R0BQmIk51bT4I7ryUTkZFa6qlQdENxSXTPuHn6R9Bp/QjA/K7UXy5O3q9JggwRcxm+TBDJZqeQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=M1ILIjTF; arc=none smtp.client-ip=95.215.58.173 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1715614305; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=nkbxX2OwAWgCxYscfgCjR1gkqrQYqnnGwxp+P1UMWgE=; b=M1ILIjTFecyKk9H38rYtTMjnYDkzCIWH6VjaWO4LgdWGc3drbux8+6gU+rdJ2rFR7Uzrjc pUmJ3PhNBkW+SKNY89iZQQkXrt8kNKzY/vJuIi0AtI2PWN0FsIH3Apj2PdnH4RefOmWadK PrEwXoOIgVOeduT4edcpSk3aWOGA0BQ= From: Sui Jingfeng To: Laurent Pinchart Cc: Andrzej Hajda , Neil Armstrong , Robert Foss , Sascha Hauer , Douglas Anderson , Maxime Ripard , Thomas Zimmermann , Liu Ying , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, imx@lists.linux.dev, Sui Jingfeng , Laurent Pinchart Subject: [PATCH v2 08/12] drm/bridge: megachips-stdpxxxx-ge-b850v3-fw: Remove a redundant check on existence of bridge->encoder Date: Mon, 13 May 2024 23:31:05 +0800 Message-ID: <20240513153109.46786-9-sui.jingfeng@linux.dev> In-Reply-To: <20240513153109.46786-1-sui.jingfeng@linux.dev> References: <20240513153109.46786-1-sui.jingfeng@linux.dev> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Migadu-Flow: FLOW_OUT In the ge_b850v3_lvds_create_connector function, the check on the existence of bridge->encoder is not necessary, as it has already been checked in the drm_bridge_attach() function called by upstream bridge or driver. Hence, it is guaranteed that the .encoder member of the drm_bridge instance is not NULL when cdns_mhdp_connector_init() function get called. Remove the redundant checking codes "if (!bridge->encoder) { ... }". Reviewed-by: Laurent Pinchart Signed-off-by: Sui Jingfeng --- drivers/gpu/drm/bridge/megachips-stdpxxxx-ge-b850v3-fw.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/drivers/gpu/drm/bridge/megachips-stdpxxxx-ge-b850v3-fw.c b/drivers/gpu/drm/bridge/megachips-stdpxxxx-ge-b850v3-fw.c index 4480523244e4..37f1acf5c0f8 100644 --- a/drivers/gpu/drm/bridge/megachips-stdpxxxx-ge-b850v3-fw.c +++ b/drivers/gpu/drm/bridge/megachips-stdpxxxx-ge-b850v3-fw.c @@ -165,11 +165,6 @@ static int ge_b850v3_lvds_create_connector(struct drm_bridge *bridge) struct drm_connector *connector = &ge_b850v3_lvds_ptr->connector; int ret; - if (!bridge->encoder) { - DRM_ERROR("Parent encoder object not found"); - return -ENODEV; - } - connector->polled = DRM_CONNECTOR_POLL_HPD; drm_connector_helper_add(connector, -- 2.43.0