[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <39cbf0cb-9f25-6a0d-6e56-3f9e0aaa0296@linaro.org>
Date: Mon, 12 Sep 2022 21:06:28 +0300
From: Dmitry Baryshkov <dmitry.baryshkov@...aro.org>
To: Johan Hovold <johan+linaro@...nel.org>,
Douglas Anderson <dianders@...omium.org>,
Rob Clark <robdclark@...il.com>
Cc: Andrzej Hajda <andrzej.hajda@...el.com>,
Neil Armstrong <neil.armstrong@...aro.org>,
Robert Foss <robert.foss@...aro.org>,
Laurent Pinchart <Laurent.pinchart@...asonboard.com>,
Jonas Karlman <jonas@...boo.se>,
Jernej Skrabec <jernej.skrabec@...il.com>,
David Airlie <airlied@...ux.ie>,
Daniel Vetter <daniel@...ll.ch>, Sean Paul <sean@...rly.run>,
Stephen Boyd <swboyd@...omium.org>,
Bjorn Andersson <andersson@...nel.org>,
Manivannan Sadhasivam <manivannan.sadhasivam@...aro.org>,
dri-devel@...ts.freedesktop.org, linux-arm-msm@...r.kernel.org,
freedreno@...ts.freedesktop.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 7/7] drm/msm: drop modeset sanity checks
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 <johan+linaro@...nel.org>
Again, please split into dp and dsi patches. After that:
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@...aro.org>
> ---
> 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
Powered by blists - more mailing lists