Received: by 2002:a05:6358:489b:b0:bb:da1:e618 with SMTP id x27csp6338203rwn; Tue, 13 Sep 2022 02:45:25 -0700 (PDT) X-Google-Smtp-Source: AA6agR6mZOeRsIdW0h2jFhopNxth8Y4Is0z5SdQ8o23q0uIVs7iBrPlPts+7ET/41uiDTX8CNX9h X-Received: by 2002:a17:907:3207:b0:741:3a59:738d with SMTP id xg7-20020a170907320700b007413a59738dmr21324484ejb.110.1663062325053; Tue, 13 Sep 2022 02:45:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663062325; cv=none; d=google.com; s=arc-20160816; b=QESt/Etctb6VIs4UIw0LRjg7EIP7cM05ie/bQRnvzeFFN6jsvvZeFeFDx014iUaC2z gfhfTwNWTdgsFrbcuHJX2OYNMZ8Bhn1JZg6W07J9kjuk6YecZNmC178bDjPrEazjVrBs TW+iEg3q1UL4Rc5TPB3ImSCzvnDadE0Dtskip+wMCEMUK1n3yYwV580cQhhwAwo8aRTK a0JBjKas0Ie17tuGGpkf1gPiEET5P9dnRaRPQ1rRHpIs7ua0mpgoy1GuJBOKfSNX3czv ny4cs1sf53HEDrXNh8WXsH7jvgcrasjey8UvHfjRd73hyiY9S5zQWaePvSNKHMlHbe5f 3Lrg== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=Ynxda7tNCLNcqMjPenuh7dZtt5hS7zprdwBlQHAe7eM=; b=Ewi7L6MeRkQicLWQsP8qvxsi2sNMQToDG79Jq05xeieqDvMe8r5k4je6Jnh7FIYWXd mUsX8YEoHyKLrjJxtcn2PhTs4LbLjQwTSGvMbQu1pBES4KK9oiGr+hG02QiNzPcne59k 8qLLkSHl0mfaSGc9P4ac9Y0pkfmwx5mlAXSF8Tl4dVrASjK2Crz28p+HBT8k5QZVY7bk GduQd+d7KkXPq+Z38HO8i7L7VBDV6Crc3+J8gVvAgKXswX52g8/NzQoqeg3n7G+Zjpe8 fbFkKCiAgC251yg1YOI+5y3jj4VWNiIqwURPiJbZl3ohtBgqKmD5pKJ5eI5nnD8Zanvv HHUg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Ke9fWfJp; 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=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t29-20020a50ab5d000000b0044ebbd162bfsi7993360edc.283.2022.09.13.02.44.59; Tue, 13 Sep 2022 02:45:25 -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=@kernel.org header.s=k20201202 header.b=Ke9fWfJp; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231372AbiIMI6v (ORCPT + 99 others); Tue, 13 Sep 2022 04:58:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37126 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231474AbiIMI6Y (ORCPT ); Tue, 13 Sep 2022 04:58:24 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1792F5A2F6; Tue, 13 Sep 2022 01:58:23 -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 ams.source.kernel.org (Postfix) with ESMTPS id A3D4FB80E41; Tue, 13 Sep 2022 08:58:21 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C2030C43151; Tue, 13 Sep 2022 08:58:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1663059499; bh=/bvulmw+Dcu3Sw99w3RPEU4r6iOEX1y4z9iaAa+Si5M=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Ke9fWfJpOvXphZ5WacYXpibfXa7I4zY0DLvGTB+8mA32uTGfIBQ8dNlNMGk6SfJou eZx1LcZabGNvCicijX9mOuc9BnMaEX0+V7OLiNVi/gceX1k0s4rCsjy46lhp7SXgMQ 3nFXMH+oyqEkngjFk1s0nplhgyg30yugByo3fn/sU348gJzt44vrbZpDE96rmK1JzL BenRx6krYhIX/F20zcW7CTTXYs3KWn9K3t+dYEMIsYjKvRZbczWuKZr0L7s4ZJZPWf Xtlj1bZ05zm2x52IMwmB34C6R14KS5DoLf++aIecSGMNsxpPPPGoMNF3gWpEi6CnJs mLUYP6k5mvorg== Received: from johan by xi.lan with local (Exim 4.94.2) (envelope-from ) id 1oY1kJ-0002HJ-2n; Tue, 13 Sep 2022 10:58:19 +0200 From: Johan Hovold To: Douglas Anderson , Dmitry Baryshkov , Rob Clark , Abhinav Kumar Cc: Andrzej Hajda , Neil Armstrong , Robert Foss , Laurent Pinchart , Jonas Karlman , Jernej Skrabec , Daniel Vetter , Sean Paul , Stephen Boyd , Bjorn Andersson , Manivannan Sadhasivam , Kuogee Hsieh , Steev Klimaszewski , dri-devel@lists.freedesktop.org, linux-arm-msm@vger.kernel.org, freedreno@lists.freedesktop.org, linux-kernel@vger.kernel.org, Johan Hovold Subject: [PATCH v2 09/10] drm/msm/dp: drop modeset sanity checks Date: Tue, 13 Sep 2022 10:53:19 +0200 Message-Id: <20220913085320.8577-10-johan+linaro@kernel.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220913085320.8577-1-johan+linaro@kernel.org> References: <20220913085320.8577-1-johan+linaro@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 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 Drop the overly defensive modeset sanity checks of function parameters which have already been checked or used by the callers. Reviewed-by: Dmitry Baryshkov Signed-off-by: Johan Hovold --- drivers/gpu/drm/msm/dp/dp_display.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/gpu/drm/msm/dp/dp_display.c b/drivers/gpu/drm/msm/dp/dp_display.c index 808a516e84c5..33daec11f813 100644 --- a/drivers/gpu/drm/msm/dp/dp_display.c +++ b/drivers/gpu/drm/msm/dp/dp_display.c @@ -1607,15 +1607,10 @@ static int dp_display_get_next_bridge(struct msm_dp *dp) int msm_dp_modeset_init(struct msm_dp *dp_display, struct drm_device *dev, struct drm_encoder *encoder) { - struct msm_drm_private *priv; + struct msm_drm_private *priv = dev->dev_private; struct dp_display_private *dp_priv; int ret; - if (WARN_ON(!encoder) || WARN_ON(!dp_display) || WARN_ON(!dev)) - return -EINVAL; - - priv = dev->dev_private; - if (priv->num_bridges == ARRAY_SIZE(priv->bridges)) { DRM_DEV_ERROR(dev->dev, "too many bridges\n"); return -ENOSPC; -- 2.35.1