Received: by 2002:a05:6358:489b:b0:bb:da1:e618 with SMTP id x27csp5592695rwn; Mon, 12 Sep 2022 11:18:58 -0700 (PDT) X-Google-Smtp-Source: AA6agR6+DV9nNw4XsLPhCYm3BUGsqs7a+6kubE+9Bt0aEXCZOkAnhvg6jmMTSW6vsrqBGePZuC5r X-Received: by 2002:a17:906:ee8e:b0:730:3646:d178 with SMTP id wt14-20020a170906ee8e00b007303646d178mr19675878ejb.426.1663006738523; Mon, 12 Sep 2022 11:18:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663006738; cv=none; d=google.com; s=arc-20160816; b=VGwFfdsUdFqGbg9bf9Rup1bMp1aswgpPMnV2xkrXHFW+tmr0VNGLHqbY6NzTTUwNTu bjFA432VAlT/NS4wO1R1YNaYVkcnOoQLuMpGTGdB9JtZL0ZwlMlYSzRBa8WNDVTVuGvg aSQWI++0d8beR8uK62iGmarzy/bGXPkcuSLJY6NZ8BkUy6ypJIGX9JjWWNoqbDHGpiU5 lYRyJNmeEnvEso8sY1KxwfNvyGdBiGRBXKcy0ukbCoektPazURAzF9P3DRFwzJ+LCR2C h+ZDpDuizJCpz/Kg45ttgmtEBBIKh7wwwVwwlIRI3w90Xtyffl3v6y3mXymbHXxjBe3X czxA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=kYN4sSnKsnkXEFWeYDTU7HvcPZgEZ/o2shM14281xec=; b=LkEM0F0758XeRqKqGQ9g4cVpB6clKhbNPXoBTs5sUhOxhYqJNk06xNuslEVkk/ZkOh d4TlMOO5QpfA8mqWKzj1h3A9xcooyHgrXWG+NCXcA29wT2r7sHxUusbsId3XqsNsdi4z UymlQtE2Ny04dR8ww9M0zOVZFFYPxmkR5nOjKSCJK7xmGT6glqVjLeEWs9237xw96dlF Fiz70gkBcoa/EExGUhUHMR6OtxRWmjZ5FhGD2pLFDLA3P56nuWeYfo/1kdKxBvzd2edq ZMH+B6iJh+KyWeAzsY/SWY+j3fOmHJIU0dK4UvYahVpmIZ3Kqw6tEfoO6DRB4c+cO0jw ACdg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=UIQYoaC8; 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=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i15-20020a1709064fcf00b00730a07ef039si7499343ejw.423.2022.09.12.11.18.31; Mon, 12 Sep 2022 11:18:58 -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=@linaro.org header.s=google header.b=UIQYoaC8; 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=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229650AbiILSHK (ORCPT + 99 others); Mon, 12 Sep 2022 14:07:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52568 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230058AbiILSGt (ORCPT ); Mon, 12 Sep 2022 14:06:49 -0400 Received: from mail-lf1-x12b.google.com (mail-lf1-x12b.google.com [IPv6:2a00:1450:4864:20::12b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9995741983 for ; Mon, 12 Sep 2022 11:06:31 -0700 (PDT) Received: by mail-lf1-x12b.google.com with SMTP id o2so14014861lfc.10 for ; Mon, 12 Sep 2022 11:06:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date; bh=kYN4sSnKsnkXEFWeYDTU7HvcPZgEZ/o2shM14281xec=; b=UIQYoaC8p51/CcywfdQZB00kFNr5wACgEmQKBjj6VwI91WaPvwOYgu8e5JY6mbLUT7 ev3HQVjiMNncyGfjUTPN6ZKKD1eYclE00Wf0ymkPdhBSknRXHAzI4+PJdDF6VYw4qVo+ ooHegD6DcIMWhri6PnnR9QkKEMzuK6rpOpYeCZN1feOq27CAqA5zGPbJWPlg1E7Cobwg LzSiMGfWRk8E8QzpQvNXv74fNVSzugWkyFnMDw0mOhA6ILdCowPjYLGn3Tp+ITJsruiB BSlgyJuds7AgR25yS9OJSpex3SIVxKXXLHceATcFzRmT1Jd5UBhts65A7PS58HznEXTB 5cPQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date; bh=kYN4sSnKsnkXEFWeYDTU7HvcPZgEZ/o2shM14281xec=; b=CNS2mQ2BsiKQAGmgrMtnVKU3L0zGK2OFBkEo/2g0FGGcVnQhRXZU5pzIfXc0NUlamx aaqlFHccuNKD9NxoEWtVvbeBMK+XhoX7CT8bn0njzvSpUIuNOA0dcKOD+b6QKqEQHTBk jTGDAVEmyYWOvfemokRXt/xMhxRjPxDIXAUujFfe6yS+JDG0C3uoiTHBGGuTdIrm3I0W pf7SDquFPmyUmrcR2neHGeMIlF96zUUe6RQa0TNA7V5kOnmpKNmTKlVMe8e8ap/5OBwT O1p4vO0lg1yiD7Tqt9jLTM5mqfiS/3kbqp08MHQCLnH9vlTgaw3rq1BJpct7MIJFlBVj TOMg== X-Gm-Message-State: ACgBeo2CcmhtKr/FJRbpnHAZZ7+9bTCsUKgz2OdyfPe8tXi5ZWRGQQjR +BUyo4X4Y0NdLQ39gQlfNHIPlA== X-Received: by 2002:a05:6512:1056:b0:498:efaf:5bd1 with SMTP id c22-20020a056512105600b00498efaf5bd1mr6964212lfb.64.1663005989237; Mon, 12 Sep 2022 11:06:29 -0700 (PDT) Received: from [192.168.1.211] ([37.153.55.125]) by smtp.gmail.com with ESMTPSA id g1-20020a0565123b8100b00492dba3c85asm1195593lfv.220.2022.09.12.11.06.28 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 12 Sep 2022 11:06:28 -0700 (PDT) Message-ID: <39cbf0cb-9f25-6a0d-6e56-3f9e0aaa0296@linaro.org> Date: Mon, 12 Sep 2022 21:06:28 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.2.1 Subject: Re: [PATCH 7/7] drm/msm: drop modeset sanity checks Content-Language: en-GB To: Johan Hovold , Douglas Anderson , Rob Clark Cc: Andrzej Hajda , Neil Armstrong , Robert Foss , Laurent Pinchart , Jonas Karlman , Jernej Skrabec , David Airlie , Daniel Vetter , Sean Paul , Stephen Boyd , Bjorn Andersson , Manivannan Sadhasivam , dri-devel@lists.freedesktop.org, linux-arm-msm@vger.kernel.org, freedreno@lists.freedesktop.org, linux-kernel@vger.kernel.org References: <20220912154046.12900-1-johan+linaro@kernel.org> <20220912154046.12900-8-johan+linaro@kernel.org> From: Dmitry Baryshkov In-Reply-To: <20220912154046.12900-8-johan+linaro@kernel.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable 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 On 12/09/2022 18:40, Johan Hovold wrote: > Drop the overly defensive modeset sanity checks of function parameters > which have already been checked or used by the callers. > > Signed-off-by: Johan Hovold Again, please split into dp and dsi patches. After that: Reviewed-by: Dmitry Baryshkov > --- > drivers/gpu/drm/msm/dp/dp_display.c | 7 +------ > drivers/gpu/drm/msm/dsi/dsi.c | 7 +------ > 2 files changed, 2 insertions(+), 12 deletions(-) > > diff --git a/drivers/gpu/drm/msm/dp/dp_display.c b/drivers/gpu/drm/msm/dp/dp_display.c > index 393af1ea9ed8..8ad28bf81abe 100644 > --- a/drivers/gpu/drm/msm/dp/dp_display.c > +++ b/drivers/gpu/drm/msm/dp/dp_display.c > @@ -1597,15 +1597,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; > 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; -- With best wishes Dmitry