Received: by 2002:a89:48b:0:b0:1f5:f2ab:c469 with SMTP id a11csp1078659lqd; Thu, 25 Apr 2024 05:39:21 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUz6857ruIYch6ESFFc7hVLMFsDj6X8JdnK+vyzYyozGDtZxCMEDYke9SPScd2bBmnfLTz9v8cqzNBsMbP16XXI0pmBgGX3QjcDdtc1gA== X-Google-Smtp-Source: AGHT+IFyb/8aJAnIC22U2qJgmmOoTEaoOf17DEGIsGPBg4gfqZ73EPnXShTis+QUXudjMPPIJQ8L X-Received: by 2002:a05:6870:c089:b0:22e:c0d4:2254 with SMTP id c9-20020a056870c08900b0022ec0d42254mr6234953oad.7.1714048761346; Thu, 25 Apr 2024 05:39:21 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714048761; cv=pass; d=google.com; s=arc-20160816; b=e+7C2TGBj2bdjFfc1cHmJlskRka/yOj300VMhgXQfX4wR9Rlzz0spu7M419gg+wjEs zlMbYwSvBAYSMHxUhf47jaG1Lq1JdZN8BGSKsS+eT7pSt9poAkmQSsPkdvWyax9J+K5F +dFV4EVVnnIaYud0YAfULtd4Yh3/W4J4txZjNSMvM3RP5DVW8PC4EsHXdCvHXT2jyLGn sChLm5e+SWo89cnAMCsnxdDxRD+2zsaSvRvzXNXde+q/WgJjpUl6l1HbwPIk7kPaWxho YXfUDJpSW/AfOs0mGNLtXKMFt0fIH0fhX2El16d16UMR4l2gckC37JsboiBeMIuhs9R+ x6pQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=d1tj7b/5ep7BGWGsy9t18TIvNN2i9tXDWcCeCzfSP34=; fh=l93zIHXyMEdGgv/YBnM8dl+iIeD4yDszaEdpnp/NB80=; b=ajelxRuwBFOGk3JO9gyNvT+63+iaACL/BVUyUPfGAt7jKXf15pIOnYMV7pf/F8zbiz pf0dYIsVwqucvafe0sWAJH4JSulAFX9eGxlAHx3xdNLq3BhBtsVjeQSUq5sf9DrYiDIO IEkK47qDG1Snx/YP3RAnUai5PoK7QSMoAWdHtOZSdheylBsCvCOnTh61Hq0kB9cadc1F GYs8n8tO3JgFwUaTCqhuPv9cNN4/V6QQIFXBbjavupqr1NAN3T62LSjCgRytQJAJTp/f UH19fkepu6NV2azEGK2AD4aBxe+yOMD/JG+F9Y/Eh5GmxXi8ez9+k5O4xOeP6plZ1tQs vKfg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=SARf4k9w; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-kernel+bounces-158533-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-158533-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id r133-20020a632b8b000000b005d9252c9d05si12908436pgr.103.2024.04.25.05.39.20 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 Apr 2024 05:39:21 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-158533-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=SARf4k9w; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-kernel+bounces-158533-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-158533-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id AC1822861D5 for ; Thu, 25 Apr 2024 12:39:14 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 11DFD1494C9; Thu, 25 Apr 2024 12:39:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="SARf4k9w" 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 8DCA812BF04; Thu, 25 Apr 2024 12:39:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.180.131 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714048745; cv=none; b=RRvy3N2xHgRI5MBWHM099UHbqF4RI40LdvipPl/ywzvwXFJWC/i6oeTHIy5GRQbcUztwsuqXvMioVBs1OPoQYDCRcIlrHdn2j/RwHWNnUTNa3H6PIi6P59EJ47uzE+Ykb9GpZPeujNKGdQiKpBG3AAyWQ828cpmw1yQ4dC/XCGY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714048745; c=relaxed/simple; bh=BVdWvAedTNOZ6PJWR1bHtbmXUdHDTHAhobj91tClV38=; h=Message-ID:Date:MIME-Version:Subject:To:CC:References:From: In-Reply-To:Content-Type; b=EOEYFYgz8K/etqv3srhdVIBHTjqjJFPogpHYkKgaAbaekLN3XCGO4zyFeoIQ/H99PuCVp1yhgvCpVY2iUrdo4UCmtJymAetFpuVTWa7TFxUyU4i3oIPOg4E2M0uzl3QeL6e2vES50XZzgNE1/gteXQT6iY1IBFmgNjWAXNBTkLI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com; spf=pass smtp.mailfrom=quicinc.com; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b=SARf4k9w; arc=none smtp.client-ip=205.220.180.131 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 (m0279871.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 43PC5GQD002355; Thu, 25 Apr 2024 12:38:51 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=d1tj7b/5ep7BGWGsy9t18TIvNN2i9tXDWcCeCzfSP34=; b=SA Rf4k9wD0I9s/MIjuVbAZnLcD92EK8UFEABS2udSa+6D0vBi31W927H4LU99gSBcU fhQQfmuhs+fORkcPNYKu4T3W3G3fc90NJR1U+MkCUM5bAHIWrJ7aTvigHiLAdDFe A3+L0oJr4b174royFO8FNdxjbp2UeSoSrvnsrdcNVfuG2FIxdijQPoFNlWLH3Rtz lE+9D3W8FBLYr7WeZRYKvP1kBvqVjAApzXV9mSEBTy6ifqaQYuaOU6SrRMBPgPIy gj6Vc0XPxpiS3ohpQBZbQOSj6Fz6950qTvv2/Txa9B6942UVioU1wZXICSouMfiW FCXdaGwdJ9s+q/UilmLw== Received: from nalasppmta02.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3xqenkjgtu-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 25 Apr 2024 12:38:51 +0000 (GMT) Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com [10.47.209.196]) by NALASPPMTA02.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 43PCcoVF032390 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 25 Apr 2024 12:38:50 GMT Received: from [10.111.139.7] (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.1544.9; Thu, 25 Apr 2024 05:38:46 -0700 Message-ID: <77df205b-3577-7b89-dcaf-7cb3947b4fb4@quicinc.com> Date: Thu, 25 Apr 2024 18:08:44 +0530 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Subject: Re: [PATCH v3 14/19] media: venus: core: Define a pointer to core->res To: Konrad Dybcio , Stanimir Varbanov , Vikash Garodia , Bryan O'Donoghue , Andy Gross , Bjorn Andersson , "Mauro Carvalho Chehab" , Philipp Zabel CC: Marijn Suijten , Stanimir Varbanov , Mauro Carvalho Chehab , , , References: <20230911-topic-mars-v3-0-79f23b81c261@linaro.org> <20230911-topic-mars-v3-14-79f23b81c261@linaro.org> Content-Language: en-US From: Dikshita Agarwal In-Reply-To: <20230911-topic-mars-v3-14-79f23b81c261@linaro.org> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit 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: cFnzlcj5cyhptGoRcYAAIAls-nGkJJ1r X-Proofpoint-GUID: cFnzlcj5cyhptGoRcYAAIAls-nGkJJ1r X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1011,Hydra:6.0.650,FMLib:17.11.176.26 definitions=2024-04-25_12,2024-04-25_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 phishscore=0 mlxlogscore=999 priorityscore=1501 impostorscore=0 malwarescore=0 bulkscore=0 lowpriorityscore=0 spamscore=0 adultscore=0 suspectscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2404010003 definitions=main-2404250091 On 3/27/2024 11:38 PM, Konrad Dybcio wrote: > To make the code more concise, define a new variable 'res' pointing to > the abundantly referenced core->res. > > Signed-off-by: Konrad Dybcio > --- > drivers/media/platform/qcom/venus/core.c | 11 +++++++---- > 1 file changed, 7 insertions(+), 4 deletions(-) > > diff --git a/drivers/media/platform/qcom/venus/core.c b/drivers/media/platform/qcom/venus/core.c > index 5b18b1f41267..e61aa863b7f7 100644 > --- a/drivers/media/platform/qcom/venus/core.c > +++ b/drivers/media/platform/qcom/venus/core.c > @@ -285,6 +285,7 @@ static irqreturn_t venus_isr_thread(int irq, void *dev_id) > > static int venus_probe(struct platform_device *pdev) > { > + const struct venus_resources *res; > struct device *dev = &pdev->dev; > struct venus_core *core; > int i, ret; > @@ -315,9 +316,11 @@ static int venus_probe(struct platform_device *pdev) > if (!core->res) > return -ENODEV; > > + res = core->res; > + > mutex_init(&core->pm_lock); > > - core->pm_ops = venus_pm_get(core->res->hfi_version); > + core->pm_ops = venus_pm_get(res->hfi_version); > if (!core->pm_ops) > return -ENODEV; > > @@ -325,8 +328,8 @@ static int venus_probe(struct platform_device *pdev) > if (ret) > return ret; > > - for (i = 0; i < core->res->resets_num; i++) { > - core->resets[i] = devm_reset_control_get_exclusive(dev, core->res->resets[i]); > + for (i = 0; i < res->resets_num; i++) { > + core->resets[i] = devm_reset_control_get_exclusive(dev, res->resets[i]); > if (IS_ERR(core->resets[i])) > return PTR_ERR(core->resets[i]); > } > @@ -337,7 +340,7 @@ static int venus_probe(struct platform_device *pdev) > return ret; > } > > - ret = dma_set_mask_and_coherent(dev, core->res->dma_mask); > + ret = dma_set_mask_and_coherent(dev, res->dma_mask); > if (ret) > goto err_core_put; > > Reviewed-by: Dikshita Agarwal