Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp15908rwb; Thu, 22 Sep 2022 13:41:12 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7nLpKdAMQ5KWfj3jDVQaATukHKg8+8K84KXVADl7NCAQCx9Csd/anqydrQq5Lg9MayTC7h X-Received: by 2002:a50:9510:0:b0:453:dded:60e with SMTP id u16-20020a509510000000b00453dded060emr5207117eda.204.1663879272556; Thu, 22 Sep 2022 13:41:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663879272; cv=none; d=google.com; s=arc-20160816; b=JXceB2/QOfukhq5+iQd+fl8wO1eT/c2MlTAzubaa9ka1nnH3OiWt1VvPrO3SVsgh19 Jp5RflmUSoxm3lbp08uiUs2aybO1xTmYV3E9uJdJoSfnaeLZ/B6Ddj5k0kLQvozAb/Xy 6nbjkZHk2/GDLLsljPtCh+EFp7jIsU2X7xOBLOi+n8sUzmgR/wECr+I3xxdbpUYfo32h zerOdRtWk7celk5yqPZMnTi4nvBM0LRl54VogK2Uo7pFoGH6lCyxmBaFCvAnJA5E9iy2 gM4hFWSdI0kioIBRspBsbO/H2X09UEY9svQEDcvCVDS6qq5PrXVhFul3gSrsBrEvkLg4 6kFQ== 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=NkEh91jlWbl+wAZPUzvDUb7z/Or52lv3BjB3tJmIBUA=; b=oy3iLJz43OtFcX/BTFi+JE53Gvwd9Qmbz/c+FuKeryZ56p2p0LPR5tilUc9P08Sn97 8tChbafo2lqWuJ/52ROFnDJSwOR6Me/0r2dk31jX2qCpZS1f71lpETT+pF6VTcacSItE kavw93wYeB/yIa0numNtL5TEHzlUnpr/rcRuTlOD2waXfA98lULWglCQ7M7gmLSpZWAF xsPo6KUIZlWKmMOWLL08PU3yft6Mknp1gR587jVn5jrr6zz5yD6Muz0xOlUk6/UcLvsB U1OeYUMe6j166/S5ZCQJsNDuj6Bu3MI9OaReeKkbnB5od8bMYWJxYIhimE9JFM2mWQ2y a9DA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=nZwPAwVO; 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 qw20-20020a170906fcb400b0072f38ecf74asi5119335ejb.794.2022.09.22.13.40.47; Thu, 22 Sep 2022 13:41:12 -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=nZwPAwVO; 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 S232686AbiIVUAK (ORCPT + 99 others); Thu, 22 Sep 2022 16:00:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60316 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232663AbiIVT7h (ORCPT ); Thu, 22 Sep 2022 15:59:37 -0400 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 131D8110B1A; Thu, 22 Sep 2022 12:58:57 -0700 (PDT) Received: from pps.filterd (m0279871.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 28MJuB6S019797; Thu, 22 Sep 2022 19:58:26 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=NkEh91jlWbl+wAZPUzvDUb7z/Or52lv3BjB3tJmIBUA=; b=nZwPAwVOabc+pQGgBdyldQ3bBHq18vz7dT0GJUXhA2viJc4/KKuYhq89ChxlJaV9xTZs ijPwgynujwGYm1/lbvzB+XtrWWv6uZTPzZMc+8lRiR5DNAeDtKV/49V6vfNDnWfGqbi+ KddZgMVbMITos47ZDyHIK4TSsGhJTlCNoaSTfByVwwDkapyB2naE1Fyfmy+32GmTjY/w VUVHcyz7TneU8VpIIx4abFxyzBXF4veq6xLWDzh+MW/112yV2j0MfdGXkg884RghY2bH pNw4yJqFxkNZBD+WLHE1BzYCViNDZRC/jMrsXnhkN25OtEscyHLut1558xm8BN1e2zcB EQ== Received: from nalasppmta03.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3jr85v3egv-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 22 Sep 2022 19:58:26 +0000 Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com [10.47.209.196]) by NALASPPMTA03.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 28MJwPcs000527 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 22 Sep 2022 19:58:25 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:58:23 -0700 Message-ID: <5cd4c767-c2e6-6325-5e13-06748295b3f3@quicinc.com> Date: Thu, 22 Sep 2022 12:58:23 -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: [Freedreno] [PATCH v2 10/10] drm/msm/dsi: drop modeset sanity checks Content-Language: en-US To: Johan Hovold , Douglas Anderson , Dmitry Baryshkov , "Rob Clark" , Abhinav Kumar CC: , Neil Armstrong , Daniel Vetter , Jonas Karlman , , Bjorn Andersson , , , Jernej Skrabec , Stephen Boyd , Robert Foss , Andrzej Hajda , Manivannan Sadhasivam , Sean Paul , "Steev Klimaszewski" , Laurent Pinchart References: <20220913085320.8577-1-johan+linaro@kernel.org> <20220913085320.8577-11-johan+linaro@kernel.org> From: Kuogee Hsieh In-Reply-To: <20220913085320.8577-11-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: nasanex01b.na.qualcomm.com (10.46.141.250) 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-ORIG-GUID: _eK-m_UMhWG69NYm6OAx3pPxNN55XKp6 X-Proofpoint-GUID: _eK-m_UMhWG69NYm6OAx3pPxNN55XKp6 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 impostorscore=0 spamscore=0 malwarescore=0 phishscore=0 lowpriorityscore=0 mlxscore=0 adultscore=0 mlxlogscore=999 clxscore=1015 priorityscore=1501 suspectscore=0 bulkscore=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/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;