Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp34143rwb; Thu, 22 Sep 2022 14:01:13 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6f//d01MvjbYPA/QdAbrfjyktUakp47KKx7nQa+qhMbtvWdMFwuIkyke6sz9+th5sRNOc+ X-Received: by 2002:aa7:c74d:0:b0:44f:d34:affb with SMTP id c13-20020aa7c74d000000b0044f0d34affbmr5122626eds.143.1663880473596; Thu, 22 Sep 2022 14:01:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663880473; cv=none; d=google.com; s=arc-20160816; b=aopaxRLB0iYz+BFRuj118GArghjVAgzFnwxKte4Ovr1eiZmL2IcobTxeeg9gmNLvxo XhASlXfJYZC7qn0DEERcbYKs7Tb7Uk59xpaUbrzQua1UqYuuFD5/HpRkTqWOE1dIgwB+ SNDtqVDADTTGBSUqTk5/Kt6Vt+f7eS9ICRLsjeqoqrnB96MRdFkjY1+HBj/Ex+8393QX /1j66qP3Pp6oy0dSGN8CVClSh1ivbgH33/IjTF3CLnEyp15KGP/pVW5PZbQ67LNgdxJm RC9JW+7FpNWT1QLiiddqkRCJQ11my6DuiT+zy1fKFEBZ6khf1vWpTAT2THcJBr5kUbef Tflg== 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=EFB/oG7xctaHu/TFNGSunfM203C+Yp91vGio9K53928=; b=tgqp0o19APIYb18ffeqwmme/IpA7tuAF5dFxI79ESIVflX4e0ah4Ovtj6LulxYB3bO 4mofvJ5/wZpGpxBy2z/fLtSovj6qBv+4J1BucbyiXpwEHYm5yG2BviYvXaDGtvl+P22m 9nxkgFyqcBtvh8K1YPUkVkZHOd+oOI1vYcm0GZQC5l65+Kc+3qhrc72zgnyr5Q4IDjSk eJkRWLViU/TEQhKC8EEGhqSI9TP/wDg3PwCQMRfhOlMoPb0lvYVdo1eJ4HVpJGpgIrqb 65BkZb+fFZPKIZP3bqcHvs328cEs2XotG29/EtlEbCl42Tg4JLd6fOCGlG7XKP0nvbBH bU2g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=MQrEcE1L; 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=quicinc.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id qk14-20020a1709077f8e00b007807e613e5bsi1374978ejc.933.2022.09.22.14.00.39; Thu, 22 Sep 2022 14:01:13 -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=@quicinc.com header.s=qcppdkim1 header.b=MQrEcE1L; 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=quicinc.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232635AbiIVT7M (ORCPT + 99 others); Thu, 22 Sep 2022 15:59:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59674 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232820AbiIVT6k (ORCPT ); Thu, 22 Sep 2022 15:58:40 -0400 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AE8C71114CA; Thu, 22 Sep 2022 12:58:11 -0700 (PDT) Received: from pps.filterd (m0279863.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 28MJ4pUa012294; Thu, 22 Sep 2022 19:57:46 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h=message-id : date : mime-version : subject : to : cc : references : from : in-reply-to : content-type : content-transfer-encoding; s=qcppdkim1; bh=EFB/oG7xctaHu/TFNGSunfM203C+Yp91vGio9K53928=; b=MQrEcE1L5n1ldeuh2U8ydyHd9kpersTF93wqm1nkzwXVF+74+6dk2wVQuErbSgV7jnW1 WPlaJz2oVoFqbQ1v4G0u28baXLI+U1MrORSmU+V3EplXK3Zz5BqSdLmEZGFkrWg0MdNg HDEi4KYqkeBQ6V/7IIS7PhTQhC5G1wgZW2pMDB5rXHznJ/rWarHZWqP6sIW76Znw/lEl 4DzJTMWmj2S6gOMLqcMLt8Bd/xocztSS2PHtJDQ+qAxJ/TMfn4FxXobA0RnA5nGmnzOV zD99+oUHVROg1Xx/8DcW7IYh9CxsXHbAQVKpPOThPHIBQ7H7Be323RoDedi5ej5aRxqo gA== Received: from nalasppmta04.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3jrq4r9ea0-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 22 Sep 2022 19:57:46 +0000 Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com [10.47.209.196]) by NALASPPMTA04.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 28MJvjRn028774 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 22 Sep 2022 19:57:45 GMT Received: from [10.110.101.161] (10.80.80.8) by nalasex01a.na.qualcomm.com (10.47.209.196) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.29; Thu, 22 Sep 2022 12:57:44 -0700 Message-ID: Date: Thu, 22 Sep 2022 12:57:43 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.2.2 Subject: Re: [PATCH v2 09/10] drm/msm/dp: drop modeset sanity checks Content-Language: en-US To: Johan Hovold , 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" , Steev Klimaszewski , , , , References: <20220913085320.8577-1-johan+linaro@kernel.org> <20220913085320.8577-10-johan+linaro@kernel.org> From: Kuogee Hsieh In-Reply-To: <20220913085320.8577-10-johan+linaro@kernel.org> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01a.na.qualcomm.com (10.52.223.231) To nalasex01a.na.qualcomm.com (10.47.209.196) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-GUID: USs8M68t3y-7rKQZ-5jaytD9fjTckn9o X-Proofpoint-ORIG-GUID: USs8M68t3y-7rKQZ-5jaytD9fjTckn9o X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.895,Hydra:6.0.528,FMLib:17.11.122.1 definitions=2022-09-22_14,2022-09-22_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 adultscore=0 mlxlogscore=999 bulkscore=0 suspectscore=0 phishscore=0 mlxscore=0 priorityscore=1501 malwarescore=0 clxscore=1015 impostorscore=0 lowpriorityscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2209130000 definitions=main-2209220129 X-Spam-Status: No, score=-4.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_LOW, SPF_HELO_NONE,SPF_PASS 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 On 9/13/2022 1:53 AM, Johan Hovold wrote: > 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 Tested-by: Kuogee Hsieh Reviewed-by: Kuogee Hsieh > --- > 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;