Re: [PATCH 2/2] PM / devfreq: exynos-nocp: Remove redundant code to reset load_count/total_count

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



2016-09-20 17:34 GMT+08:00 Chanwoo Choi <cw00.choi@xxxxxxxxxxx>:
> Hi,
>
> On 2016년 09월 20일 17:57, Axel Lin wrote:
>> This is done by devfreq_event_get_event() so remove the redundant code in
>> exynos_nocp_get_event().
>>
>> Signed-off-by: Axel Lin <axel.lin@xxxxxxxxxx>
>> ---
>>  drivers/devfreq/event/exynos-nocp.c | 3 ---
>>  1 file changed, 3 deletions(-)
>>
>> diff --git a/drivers/devfreq/event/exynos-nocp.c b/drivers/devfreq/event/exynos-nocp.c
>> index a584140..49e712a 100644
>> --- a/drivers/devfreq/event/exynos-nocp.c
>> +++ b/drivers/devfreq/event/exynos-nocp.c
>> @@ -176,9 +176,6 @@ static int exynos_nocp_get_event(struct devfreq_event_dev *edev,
>>       return 0;
>>
>>  out:
>> -     edata->load_count = 0;
>> -     edata->total_count = 0;
>> -
>>       dev_err(nocp->dev, "Failed to read the counter of NoC probe device\n");
>>
>>       return ret;
>>
>
> As you said, devfreq_event_get_event() initializes both load_count and total_count
> before calling edev->desc->ops->get_event(). Looks good to me.

Actually, the point is if edev->desc->ops->get_event() fails,
the code in devfreq_event_get_event() will reset
edata->total_count and edata->load_count to 0.

Axel
--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux SoC Development]     [Linux Rockchip Development]     [Linux USB Development]     [Video for Linux]     [Linux Audio Users]     [Linux SCSI]     [Yosemite News]

  Powered by Linux