Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp7263230rdb; Wed, 3 Jan 2024 09:40:25 -0800 (PST) X-Google-Smtp-Source: AGHT+IGdNjUxX2S3ko0JMQweZKNikAdZ83wa+dCW3FmhakuP8IBcqXfoX78gD1DZF2cAaD0zvXzH X-Received: by 2002:aa7:85d3:0:b0:6d9:ac6e:d9ea with SMTP id z19-20020aa785d3000000b006d9ac6ed9eamr8097236pfn.57.1704303625526; Wed, 03 Jan 2024 09:40:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704303625; cv=none; d=google.com; s=arc-20160816; b=0+RVJJSz6rADtCYzh/auhd6dxHAU1tr4xi0M1q0PL+Sk5y0thxHE/GM7DtbObFQauy gDTqxM5FAiJLPuCh8q283yQmShw7yieyQynStvIoOB6FRalVOlPIhPEQ9dugtM3QdCqt U/yYbaWu1+iLduNb9RQ/FCG3sSBh/7dhgKGTMM3uhASDuoCyz27BMhMDjcgeos5iEC+e Ao3uoQ7gkEsMVweYOaTD/7sXSJBLVwZN615JDsEE83p76oez1DuhpZFhQ4C6N7lqN1Gy agOqPcEfZEjlrfMg6uZp15P9LdrLhjgnTHnAPpgF4JUNmWbFpzaSW8yHkHs8R6OGBmuA VhEA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=tV5nWE9aGzQC716rDi1vI5QF6EUxio6crnQ8dPB1FpQ=; fh=NNQ03gNC7VtXYfxd+g3iKyrSNLi9rtPFxAnaV2tFN88=; b=jYdEG5+j3Hk/oztKMRntv8EvO0gS9fjHaS+/1BgD6pRWb+xQ71Oj6IoujOhuf7o2Zt l1Qdi8xUP8KuiF5NtzL9S6KBWZuNxMXqOjwg4rrGUuoBgJUsI53rYLRDy+jR2gUKMPYI qj2XRtRFJ5uPr5PpCFg35OzPnd/xeXnPUzDFN3+vR04rHiw6Er4VBGnugKkDiD8Twq1t XQv78ocqi4V9IrSlI6XW6GsC/CgRtflGjnKslXi7PEcPxsqMMzXKNvVGzCr4uJNsUioE Kjmv1S3Pf1mc08ba7JDDtg7dIFHIFLrJf2SUYSn7XJKmt/LvHbY7BLAQlX51q3EhIrtb xLBw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=QohP9BY+; spf=pass (google.com: domain of linux-kernel+bounces-15809-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-15809-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id l62-20020a632541000000b005cdb0622c89si19137530pgl.16.2024.01.03.09.40.25 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Jan 2024 09:40:25 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-15809-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=QohP9BY+; spf=pass (google.com: domain of linux-kernel+bounces-15809-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-15809-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id D3831B24612 for ; Wed, 3 Jan 2024 17:37:49 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D160E1CA83; Wed, 3 Jan 2024 17:37:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="QohP9BY+" X-Original-To: linux-kernel@vger.kernel.org Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C2AFF1CA80 for ; Wed, 3 Jan 2024 17:37:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=quicinc.com Received: from pps.filterd (m0279869.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 403C64W3004725; Wed, 3 Jan 2024 17:37:21 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=tV5nWE9aGzQC716rDi1vI5QF6EUxio6crnQ8dPB1FpQ=; b=Qo hP9BY+uPb7d2eU4hVIRfM2ozKiFT6j5bWIGVbCuJkx0BL5baYaC49NJGyQI9BmaP rwjTJ+GAEkUuob79QU6I+gi2ARDKDBz5nJywK6Gd4J+rsT5loJ6Fl2xsgHh60EZl +u/9x2Zylnle7uFln4N8zAM45eW0GTuq5zSb6t3aQQ8Np0aaRoajbRnI926G9Vb/ 6QZc66jI1D4CP6IpruaxMoRcYuahC55Xt+InIHCMxXdVCXkXVumR5FebXa7HVdiD Ih2ySDNAM8vrLTCN0o539FBj6H7lxjK8gIWB9Q1wT4IsS51o8ehDRTs0VsUWDCtL TZIePtU/hNf+bdrV5e1g== Received: from nasanppmta05.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3vd37y9equ-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 03 Jan 2024 17:37:21 +0000 (GMT) Received: from nasanex01b.na.qualcomm.com (nasanex01b.na.qualcomm.com [10.46.141.250]) by NASANPPMTA05.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 403HbKeu011254 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 3 Jan 2024 17:37:20 GMT Received: from [10.110.68.103] (10.80.80.8) by nasanex01b.na.qualcomm.com (10.46.141.250) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.40; Wed, 3 Jan 2024 09:37:19 -0800 Message-ID: Date: Wed, 3 Jan 2024 09:37:18 -0800 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH linux-next] drm/panel: samsung: Simplify with dev_err_probe() Content-Language: en-US To: , CC: , , , Chen Haonan , , , , References: <061ed94a003362bb7d7e9d3e4d38358c5b91c8a3.1704186827.git.chen.haonan2@zte.com.cn> From: Jessica Zhang In-Reply-To: <061ed94a003362bb7d7e9d3e4d38358c5b91c8a3.1704186827.git.chen.haonan2@zte.com.cn> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: nasanex01a.na.qualcomm.com (10.52.223.231) To nasanex01b.na.qualcomm.com (10.46.141.250) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-GUID: LXeUonfwL3tnYDd-1FgnfB-oA1mMO_Cy X-Proofpoint-ORIG-GUID: LXeUonfwL3tnYDd-1FgnfB-oA1mMO_Cy X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.997,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-12-09_02,2023-12-07_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 malwarescore=0 adultscore=0 lowpriorityscore=0 impostorscore=0 mlxscore=0 priorityscore=1501 clxscore=1015 mlxlogscore=999 phishscore=0 bulkscore=0 spamscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2311290000 definitions=main-2401030143 On 1/3/2024 6:17 AM, chenguanxi11234@163.com wrote: > From: Chen Haonan > > dev_err_probe() can check if the error code is -EPROBE_DEFER > and can return the error code, replacing dev_err() with it > simplifies the code. > > Signed-off-by: Chen Haonan Reviewed-by: Jessica Zhang > --- > drivers/gpu/drm/panel/panel-samsung-s6d16d0.c | 6 ++---- > 1 file changed, 2 insertions(+), 4 deletions(-) > diff --git a/drivers/gpu/drm/panel/panel-samsung-s6d16d0.c b/drivers/gpu/drm/panel/panel-samsung-s6d16d0.c > index 79f611963c61..f4103e762b53 100644 > --- a/drivers/gpu/drm/panel/panel-samsung-s6d16d0.c > +++ b/drivers/gpu/drm/panel/panel-samsung-s6d16d0.c > @@ -194,10 +194,8 @@ static int s6d16d0_probe(struct mipi_dsi_device *dsi) > s6->reset_gpio = devm_gpiod_get_optional(dev, "reset", > GPIOD_OUT_HIGH); > if (IS_ERR(s6->reset_gpio)) { > - ret = PTR_ERR(s6->reset_gpio); > - if (ret != -EPROBE_DEFER) > - dev_err(dev, "failed to request GPIO (%d)\n", ret); > - return ret; > + return dev_err_probe(dev, PTR_ERR(s6->reset_gpio), > + "failed to request GPIO\n"); > } > > drm_panel_init(&s6->panel, dev, &s6d16d0_drm_funcs, > -- > 2.25.1 >