Received: by 2002:ab2:f03:0:b0:1ef:ffd0:ce49 with SMTP id i3csp71144lqf; Tue, 26 Mar 2024 14:53:02 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWIFtBGiCp5HYVrLTZizum1uzAb5d/VjEa+m/A/SFdGlju9wj0b7wZGuf6paVGKLNiETfuGlCfmhsy8f1WGiuEhBeJpPwvLU6GxrXn1XQ== X-Google-Smtp-Source: AGHT+IFRhr/akS74ERZw78rlt1V5oEqfABqsl56r5UdPLwcWFt1/NZPnr/HRq/oKeTxjUNWOTfjV X-Received: by 2002:a92:dd12:0:b0:368:99c4:e4de with SMTP id n18-20020a92dd12000000b0036899c4e4demr1088108ilm.1.1711489982546; Tue, 26 Mar 2024 14:53:02 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711489982; cv=pass; d=google.com; s=arc-20160816; b=XRlJrkACtMqq1HZAWR/YvUNFZwlO0YNQrtLIcTBRUGU0kJIKk0mBV8R5xI5CpnVvKa gHGtE+tR4C4ZmjILa4SzjJ1vEegskVqOBKUkcvS4AsKhGsGiyVKLpEytaUmiWkmGCDkd WrnVVPA76pfVZ4atkpfkZu7CjoLNR9KuQ6jgtq0I5eqLwGYQ7Zb+GwSADtjNpVvWRIuF ke5Qs/otFhEn8kpJGPbioxGeYCWkFRkpEOMMU+S2om82ZUuab2Q2DOBxxYRWoOoDD0gE 3nBrtZFE3eVv5v2QtwYWiR1VO06abNbfMw/E8L611AnTJ6jWtFuT6hWXJUyzv9G+vErD 5WkQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:autocrypt:from :content-language:references:cc:to:subject:user-agent:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:date:message-id :dkim-signature; bh=nHaB+0+fYJxUTdtRETIH4SSyklGWxCbQzRPTcFdYBVU=; fh=UrBfmExYNXsz8bFO14v6Fvch+LBlgx6xDTNOPhUJXiY=; b=Eta0iO4BYc/xMT/NLUFX3kvqmCPwf45YwtWm+LWqyQpRWlNQhO4JGUBZk2caig1yp3 5yrAqKkjXvXy09PTYDwFIxIg0uAGIJWZn6F6BMNm2L4dfFb5QghHmeQrODRMz73NaJch YWgP0MNEuZNEHRUwdShtgpg3yQiEVcKHW3CaScvUN/ugHJxIHzA64gWC3YDAH//QiTpM Ri5qXFfpbMMvDo63zfjvsCPNy8cXCNtAAD0ck+xwuVNkMwF0MiffrpPll6CaoQgHI3e2 kFfctJZLutt0BhSmzk7cRE4kpAVA/Uk8L0WK00ePRyRQ8adePqb1zadjOBIfrSC6gyen +BFA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="nXG9sw/R"; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-120007-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-120007-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id t18-20020a634612000000b005dbde0102b0si10496864pga.288.2024.03.26.14.53.01 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Mar 2024 14:53:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-120007-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=@linaro.org header.s=google header.b="nXG9sw/R"; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-120007-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-120007-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org 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 6DB9BB2312A for ; Tue, 26 Mar 2024 21:30:20 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 20EEA13D61C; Tue, 26 Mar 2024 21:30:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="nXG9sw/R" Received: from mail-ed1-f52.google.com (mail-ed1-f52.google.com [209.85.208.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5231D13D62B for ; Tue, 26 Mar 2024 21:30:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.52 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711488607; cv=none; b=YTarTj52VhKFqblDi5V6Glg2nxch9RavygojpHIrLgn7kCLDGLkWCcDOFpf1IYwtFGmvlBvJaUEonSEelrUJgkpfAaM4GOx4MjljIAPTkSHn3PeCJfE4s2C0LiWd+LVrXvSy4KHP/Ub526U84ZmDxSvf/ppoYN5XY5aKgABPw9w= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711488607; c=relaxed/simple; bh=LycH+44Xb+JTPpqfbC5uU7Mi8HxjQOstj+fuX27aKXA=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=ED1qWqNHC/pwbS4376j7qLeaSn/DCsntWjocIls6mJomPuCV/YM/+DtYoEbkc+zvjjXmiSFJeVciAqd3/Sh/jBO00vR2CiplDNUbFb+hzTUdvk8QSvL+uKPnH4hpdYZo1vzM63CDkhHR7M7bNapXLPAPBDJRhkrPjQApa8RyLdI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=nXG9sw/R; arc=none smtp.client-ip=209.85.208.52 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-ed1-f52.google.com with SMTP id 4fb4d7f45d1cf-56c0a249bacso3588796a12.1 for ; Tue, 26 Mar 2024 14:30:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1711488603; x=1712093403; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:autocrypt:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:from:to:cc:subject:date:message-id:reply-to; bh=nHaB+0+fYJxUTdtRETIH4SSyklGWxCbQzRPTcFdYBVU=; b=nXG9sw/RTSlq+63VzxN2XlSP6BOs0fJlr3f+mvnOdT4RZzqlC/ExQP0htg3BY7BVno EOvLM+RtH105PzVHVceHAcV0RxV3+IYhsjh66S762VD40/Lz1wLdzW65GdBS2Y8++t8s PYcGi4k14W2LNPNxLo2kXVDjTEbKyZsZntmm4zY7RE5d1qIgxFNeA41UMTi9XuiK3voo dy5nBvMsH2S1nzq8lp0M6nM+azOYwuhvt3XHVJk5CAlQcowufRRVJIXbjvnEX/pR9eYG 7hUeykp1TcLyvGEZSTf3urbkwYgPzzscU/W24yaNMh9vbGpopCuWRe/r4kGXQWfJePp6 Umjw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711488603; x=1712093403; h=content-transfer-encoding:in-reply-to:autocrypt:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=nHaB+0+fYJxUTdtRETIH4SSyklGWxCbQzRPTcFdYBVU=; b=jbDobQdu2v0Uxh7AwwN2qk4kbEcAnuNrt+kFlX7z6AKmOTbVUntd5xuGqXj9tmaiJM jj9Xwa8o6ARp9e8saJmeYsNTtNQT8bBLeS/1N5iKujXUzPAailTMNtimJ3k7Tfq3WHi9 6ab7A8V2vI1e+dr0l8KMF2Ux7hBmXFhF0w/89FnSRedGenUC98df9X9oUNvusiyyT1Av aJ6BS79inqAi73GZ6/zlox1kQFkbxPhDeRJ7olgZqx8xwl1e+B4QwgaJ5qnRSYeX+vXA mkYglr90E93aI6HERNgl8O85rc9vtySaHiJligdKs1L5X1mHI8FQ+4cpGdRkni8/B7sX LEXw== X-Forwarded-Encrypted: i=1; AJvYcCVn+kcQrzLKInRv74vs2dYC+9gb6tV9M2wtLsHPJNcbDJ7E0K6M+4HJsC6VPgVP27G6D90NRwbRAQHn4lggR+OlnhlHdNz2I+k+uWWW X-Gm-Message-State: AOJu0YxqLfHrZz9sEyJCAuB0Y1V9/nM8vx4CbM8eUS/oJxWPbWoYuoB1 EIehlwWFB07NkHCdBXdWvE3IBILDrSaYHFKagmRckDWsGwB0ul9A6lJEc7tCL2Y= X-Received: by 2002:a17:906:c2c4:b0:a46:f9c2:f059 with SMTP id ch4-20020a170906c2c400b00a46f9c2f059mr7044312ejb.22.1711488603466; Tue, 26 Mar 2024 14:30:03 -0700 (PDT) Received: from [192.168.92.47] (078088045141.garwolin.vectranet.pl. [78.88.45.141]) by smtp.gmail.com with ESMTPSA id i20-20020a17090671d400b00a46e92e583bsm4688081ejk.149.2024.03.26.14.30.01 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 26 Mar 2024 14:30:03 -0700 (PDT) Message-ID: Date: Tue, 26 Mar 2024 22:30:00 +0100 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 v2 05/20] media: venus: pm_helpers: Kill dead code To: Dikshita Agarwal , Stanimir Varbanov , Vikash Garodia , Bryan O'Donoghue , Andy Gross , Bjorn Andersson , Mauro Carvalho Chehab , Philipp Zabel Cc: Marijn Suijten , Stanimir Varbanov , Mauro Carvalho Chehab , linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org References: <20230911-topic-mars-v2-0-3dac84b88c4b@linaro.org> <20230911-topic-mars-v2-5-3dac84b88c4b@linaro.org> <5e0656ac-badf-dd37-b598-8e4a6f23d2c2@quicinc.com> Content-Language: en-US From: Konrad Dybcio Autocrypt: addr=konrad.dybcio@linaro.org; keydata= xsFNBF9ALYUBEADWAhxdTBWrwAgDQQzc1O/bJ5O7b6cXYxwbBd9xKP7MICh5YA0DcCjJSOum BB/OmIWU6X+LZW6P88ZmHe+KeyABLMP5s1tJNK1j4ntT7mECcWZDzafPWF4F6m4WJOG27kTJ HGWdmtO+RvadOVi6CoUDqALsmfS3MUG5Pj2Ne9+0jRg4hEnB92AyF9rW2G3qisFcwPgvatt7 TXD5E38mLyOPOUyXNj9XpDbt1hNwKQfiidmPh5e7VNAWRnW1iCMMoKqzM1Anzq7e5Afyeifz zRcQPLaqrPjnKqZGL2BKQSZDh6NkI5ZLRhhHQf61fkWcUpTp1oDC6jWVfT7hwRVIQLrrNj9G MpPzrlN4YuAqKeIer1FMt8cq64ifgTzxHzXsMcUdclzq2LTk2RXaPl6Jg/IXWqUClJHbamSk t1bfif3SnmhA6TiNvEpDKPiT3IDs42THU6ygslrBxyROQPWLI9IL1y8S6RtEh8H+NZQWZNzm UQ3imZirlPjxZtvz1BtnnBWS06e7x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NfuNYkYDAQgHwsF2BBgBCAAgFiEEU24if9oCL2zd AAQVR4cBcg5dfFgFAmQ5bvICGwwACgkQR4cBcg5dfFju1Q//Xta1ShwL0MLSC1KL1lXGXeRM 8arzfyiB5wJ9tb9U/nZvhhdfilEDLe0jKJY0RJErbdRHsalwQCrtq/1ewQpMpsRxXzAjgfRN jc4tgxRWmI+aVTzSRpywNahzZBT695hMz81cVZJoZzaV0KaMTlSnBkrviPz1nIGHYCHJxF9r cIu0GSIyUjZ/7xslxdvjpLth16H27JCWDzDqIQMtg61063gNyEyWgt1qRSaK14JIH/DoYRfn jfFQSC8bffFjat7BQGFz4ZpRavkMUFuDirn5Tf28oc5ebe2cIHp4/kajTx/7JOxWZ80U70mA cBgEeYSrYYnX+UJsSxpzLc/0sT1eRJDEhI4XIQM4ClIzpsCIN5HnVF76UQXh3a9zpwh3dk8i bhN/URmCOTH+LHNJYN/MxY8wuukq877DWB7k86pBs5IDLAXmW8v3gIDWyIcgYqb2v8QO2Mqx YMqL7UZxVLul4/JbllsQB8F/fNI8AfttmAQL9cwo6C8yDTXKdho920W4WUR9k8NT/OBqWSyk bGqMHex48FVZhexNPYOd58EY9/7mL5u0sJmo+jTeb4JBgIbFPJCFyng4HwbniWgQJZ1WqaUC nas9J77uICis2WH7N8Bs9jy0wQYezNzqS+FxoNXmDQg2jetX8en4bO2Di7Pmx0jXA4TOb9TM izWDgYvmBE8= In-Reply-To: <5e0656ac-badf-dd37-b598-8e4a6f23d2c2@quicinc.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 4.03.2024 6:40 AM, Dikshita Agarwal wrote: > > > On 2/10/2024 2:39 AM, Konrad Dybcio wrote: >> A situation like: >> >> if (!foo) >> goto bar; >> >> for (i = 0; i < foo; i++) >> ...1... >> >> bar: >> ...2... >> >> is totally identical to: >> >> for (i = 0; i < 0; i++) // === if (0) >> ...1... >> >> ...2... >> >> Get rid of such boilerplate. >> >> Signed-off-by: Konrad Dybcio >> --- >> drivers/media/platform/qcom/venus/pm_helpers.c | 10 ---------- >> 1 file changed, 10 deletions(-) >> >> diff --git a/drivers/media/platform/qcom/venus/pm_helpers.c b/drivers/media/platform/qcom/venus/pm_helpers.c >> index 1ba65345a5e2..7193075e8c04 100644 >> --- a/drivers/media/platform/qcom/venus/pm_helpers.c >> +++ b/drivers/media/platform/qcom/venus/pm_helpers.c >> @@ -878,14 +878,10 @@ static int vcodec_domains_get(struct venus_core *core) >> .pd_flags = PD_FLAG_NO_DEV_LINK, >> }; >> >> - if (!res->vcodec_pmdomains_num) >> - goto skip_pmdomains; >> - > Removing the if check and relying only on for loop is good. > but I don't see the for loop here. >> ret = dev_pm_domain_attach_list(dev, &vcodec_data, &core->pmdomains); >> if (ret < 0) >> return ret; >> > Also, what's the base of this change? I don't see above API in the code > anywhere. It's inside the dev_pm_domain_attach_list helper.. It was there explicitly when I first submitted the patch. Konrad