Received: by 2002:a05:6358:489b:b0:bb:da1:e618 with SMTP id x27csp6317859rwn; Tue, 13 Sep 2022 02:19:44 -0700 (PDT) X-Google-Smtp-Source: AA6agR4PnFLsX4IQGOWCmiiVMRWDwSINbvyBJd/c9Pq73QwOa5l2yJNLGu2OTKZANdp3h0w3stMb X-Received: by 2002:a17:906:9c83:b0:779:c14c:55e4 with SMTP id fj3-20020a1709069c8300b00779c14c55e4mr13477920ejc.619.1663060784020; Tue, 13 Sep 2022 02:19:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663060784; cv=none; d=google.com; s=arc-20160816; b=hmbXzjawNaIwIhkcaqnSyc1IN1cE/NZAbSTpa8jmFttpzs3XJ4fEUgFtOKCuzaXr0c CM8OFU7jiDEUoyiMJ+24qDv1nk8T8Mk/pv+YzM60zpwCb1ptEqqOZ9g1GLZjTZlecGHj QaLbAiN33HbQIVr9F7/O9jknilcCRwvSCugaT/MZYrwX3aWRAHkXgOkSlDQbz7Lhajgg S61RIT3nuUgnSKVWrt0PHUKysjfWdAvJUyUYlF7E9e0SCJcv5NKFF3u6y0xRRT9ztpUS OFD+dkzpG9TDdVBhUnbqs6EIcTs+MI4IgJaE81GAvCtwb2YG7KTCiWuX+hG04n+qv1hZ Iz/g== 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=TTQdtVXRrnSUpt1S2NdfiPqGvaXr5W2Ki1MOLehZ5Dc=; b=rT99AQ9Uiwm85p9fAyh6VsplIAEjjNZavaTDvMdfcYoOyyWSPZ75aUs8DSoR/1tzQE ZT0IV909AhBb1mKzSqcsmXlF1brgl0vLWi8kopbXByjfej+cruz7+/DU1BNc+OFa+hhY YsI6FK0xjzQpPbQbWNcKjHBuas+GrO/2XxyhICBsCA2aRhIn3VmeCU0Bu4cmv9YoxcD6 P9kDXmwYn6+L6m8ZfNvXXTdJyyIxri0uB/S2lcPph80sOLwOTjVRXIpO3irCHLNQRTeL xJzND50pGgGdJb/y9IWjPOtwloMgm8KMNwTdrkopGmFTRVcEKdkIUs4CaWPms9U9qXNe jvQA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="unmVFMd/"; 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 h2-20020a0564020e0200b0045184540cfbsi6657916edh.72.2022.09.13.02.19.18; Tue, 13 Sep 2022 02:19:44 -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="unmVFMd/"; 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 S231202AbiIMI6z (ORCPT + 99 others); Tue, 13 Sep 2022 04:58:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37128 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231477AbiIMI6Y (ORCPT ); Tue, 13 Sep 2022 04:58:24 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9E5585B074; 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 dfw.source.kernel.org (Postfix) with ESMTPS id D53C761363; Tue, 13 Sep 2022 08:58:20 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id EB048C4315A; 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=1663059500; bh=hrVvbXZI3Rtg13D3GQsc7u6t7rwPKk9Y9RWbu9u6KlM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=unmVFMd/dGOGh2PApm3PDyWQrBxL1xdvk35PijR18DwwcNW4H727qG6HywOtia2G2 an8mZSsqIbYsjx7668w2wSRihZ+TOZk0wbnLpgVhA84QJsUt7Mf9OazIDIHQbvx8RA VGO+U0ddf3DHcr4r+i3jQv7zqXaXJOO5Huf2SFMYYixc586UzpcYleH6GsMFkAz32Z HDaH19Ek5MYXTqDLSUnLW4drfC15K1hC/dInzytrumqJumgk4zEXx/Dgn7N3eHacrJ Z8phApq3E6e67RMzA9Z9XfUf+fLj6acdta1bs96nRDXe2EgtZF3uX517FevoEzerlI fNnsMqDjz2NSw== Received: from johan by xi.lan with local (Exim 4.94.2) (envelope-from ) id 1oY1kJ-0002HO-5t; 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 10/10] drm/msm/dsi: drop modeset sanity checks Date: Tue, 13 Sep 2022 10:53:20 +0200 Message-Id: <20220913085320.8577-11-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/dsi/dsi.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/gpu/drm/msm/dsi/dsi.c b/drivers/gpu/drm/msm/dsi/dsi.c index 8a95c744972a..31fdee2052be 100644 --- a/drivers/gpu/drm/msm/dsi/dsi.c +++ b/drivers/gpu/drm/msm/dsi/dsi.c @@ -211,14 +211,9 @@ void __exit msm_dsi_unregister(void) int msm_dsi_modeset_init(struct msm_dsi *msm_dsi, struct drm_device *dev, struct drm_encoder *encoder) { - struct msm_drm_private *priv; + struct msm_drm_private *priv = dev->dev_private; int ret; - if (WARN_ON(!encoder) || WARN_ON(!msm_dsi) || 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