lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <f50de786-837d-4c51-9c29-1a8711adc7d2@linaro.org>
Date: Tue, 26 Mar 2024 22:30:00 +0100
From: Konrad Dybcio <konrad.dybcio@...aro.org>
To: Dikshita Agarwal <quic_dikshita@...cinc.com>,
 Stanimir Varbanov <stanimir.k.varbanov@...il.com>,
 Vikash Garodia <quic_vgarodia@...cinc.com>,
 Bryan O'Donoghue <bryan.odonoghue@...aro.org>, Andy Gross
 <agross@...nel.org>, Bjorn Andersson <andersson@...nel.org>,
 Mauro Carvalho Chehab <mchehab@...nel.org>,
 Philipp Zabel <p.zabel@...gutronix.de>
Cc: Marijn Suijten <marijn.suijten@...ainline.org>,
 Stanimir Varbanov <stanimir.varbanov@...aro.org>,
 Mauro Carvalho Chehab <mchehab+huawei@...nel.org>,
 linux-media@...r.kernel.org, linux-arm-msm@...r.kernel.org,
 linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 05/20] media: venus: pm_helpers: Kill dead code

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 <konrad.dybcio@...aro.org>
>> ---
>>  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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ