All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/msm/dpu: remove unused refcount for encoder_phys_wb
@ 2022-04-28 15:34 Abhinav Kumar
  2022-04-28 15:58 ` Dmitry Baryshkov
  0 siblings, 1 reply; 3+ messages in thread
From: Abhinav Kumar @ 2022-04-28 15:34 UTC (permalink / raw)
  To: freedreno
  Cc: Abhinav Kumar, dri-devel, swboyd, seanpaul, dmitry.baryshkov,
	quic_jesszhan, quic_aravindh

Remove the unused local variable refcount for encoder_phys_wb
as the one part of wb_enc is used directly.

Fixes: 0ce51f19453e ("drm/msm/dpu: introduce the dpu_encoder_phys_* for writeback")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Abhinav Kumar <quic_abhinavk@quicinc.com>
---
 drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_wb.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_wb.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_wb.c
index cb5c7da53c29..904124a3477e 100644
--- a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_wb.c
+++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_wb.c
@@ -407,9 +407,6 @@ static void dpu_encoder_phys_wb_irq_ctrl(
 
 	struct dpu_encoder_phys_wb *wb_enc = to_dpu_encoder_phys_wb(phys);
 	int ret = 0;
-	int refcount;
-
-	refcount = atomic_read(&wb_enc->wbirq_refcount);
 
 	if (enable && atomic_inc_return(&wb_enc->wbirq_refcount) == 1) {
 		dpu_core_irq_register_callback(phys->dpu_kms,
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] drm/msm/dpu: remove unused refcount for encoder_phys_wb
  2022-04-28 15:34 [PATCH] drm/msm/dpu: remove unused refcount for encoder_phys_wb Abhinav Kumar
@ 2022-04-28 15:58 ` Dmitry Baryshkov
  2022-04-28 17:50   ` Abhinav Kumar
  0 siblings, 1 reply; 3+ messages in thread
From: Dmitry Baryshkov @ 2022-04-28 15:58 UTC (permalink / raw)
  To: Abhinav Kumar, freedreno
  Cc: dri-devel, swboyd, seanpaul, quic_jesszhan, quic_aravindh

On 28/04/2022 18:34, Abhinav Kumar wrote:
> Remove the unused local variable refcount for encoder_phys_wb
> as the one part of wb_enc is used directly.
> 
> Fixes: 0ce51f19453e ("drm/msm/dpu: introduce the dpu_encoder_phys_* for writeback")
> Reported-by: kernel test robot <lkp@intel.com>
> Signed-off-by: Abhinav Kumar <quic_abhinavk@quicinc.com>
> ---
>   drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_wb.c | 3 ---
>   1 file changed, 3 deletions(-)
> 
> diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_wb.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_wb.c
> index cb5c7da53c29..904124a3477e 100644
> --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_wb.c
> +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_wb.c
> @@ -407,9 +407,6 @@ static void dpu_encoder_phys_wb_irq_ctrl(
>   
>   	struct dpu_encoder_phys_wb *wb_enc = to_dpu_encoder_phys_wb(phys);
>   	int ret = 0;
> -	int refcount;
> -
> -	refcount = atomic_read(&wb_enc->wbirq_refcount);
>   
>   	if (enable && atomic_inc_return(&wb_enc->wbirq_refcount) == 1) {
>   		dpu_core_irq_register_callback(phys->dpu_kms,

As I glanced onto this function, it seems you miss updating `ret` here. 
Could you please fix that too?


-- 
With best wishes
Dmitry

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] drm/msm/dpu: remove unused refcount for encoder_phys_wb
  2022-04-28 15:58 ` Dmitry Baryshkov
@ 2022-04-28 17:50   ` Abhinav Kumar
  0 siblings, 0 replies; 3+ messages in thread
From: Abhinav Kumar @ 2022-04-28 17:50 UTC (permalink / raw)
  To: Dmitry Baryshkov, freedreno
  Cc: dri-devel, swboyd, seanpaul, quic_jesszhan, quic_aravindh



On 4/28/2022 8:58 AM, Dmitry Baryshkov wrote:
> On 28/04/2022 18:34, Abhinav Kumar wrote:
>> Remove the unused local variable refcount for encoder_phys_wb
>> as the one part of wb_enc is used directly.
>>
>> Fixes: 0ce51f19453e ("drm/msm/dpu: introduce the dpu_encoder_phys_* 
>> for writeback")
>> Reported-by: kernel test robot <lkp@intel.com>
>> Signed-off-by: Abhinav Kumar <quic_abhinavk@quicinc.com>
>> ---
>>   drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_wb.c | 3 ---
>>   1 file changed, 3 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_wb.c 
>> b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_wb.c
>> index cb5c7da53c29..904124a3477e 100644
>> --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_wb.c
>> +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_wb.c
>> @@ -407,9 +407,6 @@ static void dpu_encoder_phys_wb_irq_ctrl(
>>       struct dpu_encoder_phys_wb *wb_enc = to_dpu_encoder_phys_wb(phys);
>>       int ret = 0;
>> -    int refcount;
>> -
>> -    refcount = atomic_read(&wb_enc->wbirq_refcount);
>>       if (enable && atomic_inc_return(&wb_enc->wbirq_refcount) == 1) {
>>           dpu_core_irq_register_callback(phys->dpu_kms,
> 
> As I glanced onto this function, it seems you miss updating `ret` here. 
> Could you please fix that too?
> 

Yes, we dont need ret here, its a void function.
So we dont need to handle the if (ret) cases as we would never hit them.

I will update this and post v2. I have re-tested this too.
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-04-28 17:50 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-28 15:34 [PATCH] drm/msm/dpu: remove unused refcount for encoder_phys_wb Abhinav Kumar
2022-04-28 15:58 ` Dmitry Baryshkov
2022-04-28 17:50   ` Abhinav Kumar

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.