linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] media: mc: delete redundant code in __media_device_unregister_entity
@ 2022-03-24 10:27 Hangyu Hua
  2022-03-24 13:47 ` Laurent Pinchart
  0 siblings, 1 reply; 4+ messages in thread
From: Hangyu Hua @ 2022-03-24 10:27 UTC (permalink / raw)
  To: sakari.ailus, laurent.pinchart, mchehab
  Cc: linux-media, linux-kernel, Hangyu Hua

media_gobj_destroy has already set graph_obj.mdev to NULL. There is no need to
set it again.

Signed-off-by: Hangyu Hua <hbh25y@gmail.com>
---
 drivers/media/mc/mc-device.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/media/mc/mc-device.c b/drivers/media/mc/mc-device.c
index cf5e459b1d96..7727c619043e 100644
--- a/drivers/media/mc/mc-device.c
+++ b/drivers/media/mc/mc-device.c
@@ -605,7 +605,6 @@ static void __media_device_unregister_entity(struct media_entity *entity)
 
 	/* invoke entity_notify callbacks to handle entity removal?? */
 
-	entity->graph_obj.mdev = NULL;
 }
 
 /**
-- 
2.25.1


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

* Re: [PATCH] media: mc: delete redundant code in __media_device_unregister_entity
  2022-03-24 10:27 [PATCH] media: mc: delete redundant code in __media_device_unregister_entity Hangyu Hua
@ 2022-03-24 13:47 ` Laurent Pinchart
  2022-03-30 11:05   ` Sakari Ailus
  0 siblings, 1 reply; 4+ messages in thread
From: Laurent Pinchart @ 2022-03-24 13:47 UTC (permalink / raw)
  To: Hangyu Hua; +Cc: sakari.ailus, mchehab, linux-media, linux-kernel

Hi Hangyu,

Thank you for the patch.

On Thu, Mar 24, 2022 at 06:27:52PM +0800, Hangyu Hua wrote:
> media_gobj_destroy has already set graph_obj.mdev to NULL. There is no need to
> set it again.
> 
> Signed-off-by: Hangyu Hua <hbh25y@gmail.com>

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

> ---
>  drivers/media/mc/mc-device.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/drivers/media/mc/mc-device.c b/drivers/media/mc/mc-device.c
> index cf5e459b1d96..7727c619043e 100644
> --- a/drivers/media/mc/mc-device.c
> +++ b/drivers/media/mc/mc-device.c
> @@ -605,7 +605,6 @@ static void __media_device_unregister_entity(struct media_entity *entity)
>  
>  	/* invoke entity_notify callbacks to handle entity removal?? */
>  
> -	entity->graph_obj.mdev = NULL;
>  }
>  
>  /**

-- 
Regards,

Laurent Pinchart

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

* Re: [PATCH] media: mc: delete redundant code in __media_device_unregister_entity
  2022-03-24 13:47 ` Laurent Pinchart
@ 2022-03-30 11:05   ` Sakari Ailus
  2022-03-31  1:52     ` Hangyu Hua
  0 siblings, 1 reply; 4+ messages in thread
From: Sakari Ailus @ 2022-03-30 11:05 UTC (permalink / raw)
  To: Laurent Pinchart; +Cc: Hangyu Hua, mchehab, linux-media, linux-kernel

On Thu, Mar 24, 2022 at 03:47:10PM +0200, Laurent Pinchart wrote:
> Hi Hangyu,
> 
> Thank you for the patch.
> 
> On Thu, Mar 24, 2022 at 06:27:52PM +0800, Hangyu Hua wrote:
> > media_gobj_destroy has already set graph_obj.mdev to NULL. There is no need to
> > set it again.
> > 
> > Signed-off-by: Hangyu Hua <hbh25y@gmail.com>
> 
> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> 
> > ---
> >  drivers/media/mc/mc-device.c | 1 -
> >  1 file changed, 1 deletion(-)
> > 
> > diff --git a/drivers/media/mc/mc-device.c b/drivers/media/mc/mc-device.c
> > index cf5e459b1d96..7727c619043e 100644
> > --- a/drivers/media/mc/mc-device.c
> > +++ b/drivers/media/mc/mc-device.c
> > @@ -605,7 +605,6 @@ static void __media_device_unregister_entity(struct media_entity *entity)
> >  
> >  	/* invoke entity_notify callbacks to handle entity removal?? */
> >  
> > -	entity->graph_obj.mdev = NULL;

Removed the extra newline above, too. Applied.

Please run scripts/checkpatch.pl on the patches, too.

> >  }
> >  
> >  /**
> 
> -- 
> Regards,
> 
> Laurent Pinchart

-- 
Sakari Ailus

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

* Re: [PATCH] media: mc: delete redundant code in __media_device_unregister_entity
  2022-03-30 11:05   ` Sakari Ailus
@ 2022-03-31  1:52     ` Hangyu Hua
  0 siblings, 0 replies; 4+ messages in thread
From: Hangyu Hua @ 2022-03-31  1:52 UTC (permalink / raw)
  To: Sakari Ailus, Laurent Pinchart; +Cc: mchehab, linux-media, linux-kernel

On 2022/3/30 19:05, Sakari Ailus wrote:
> On Thu, Mar 24, 2022 at 03:47:10PM +0200, Laurent Pinchart wrote:
>> Hi Hangyu,
>>
>> Thank you for the patch.
>>
>> On Thu, Mar 24, 2022 at 06:27:52PM +0800, Hangyu Hua wrote:
>>> media_gobj_destroy has already set graph_obj.mdev to NULL. There is no need to
>>> set it again.
>>>
>>> Signed-off-by: Hangyu Hua <hbh25y@gmail.com>
>>
>> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
>>
>>> ---
>>>   drivers/media/mc/mc-device.c | 1 -
>>>   1 file changed, 1 deletion(-)
>>>
>>> diff --git a/drivers/media/mc/mc-device.c b/drivers/media/mc/mc-device.c
>>> index cf5e459b1d96..7727c619043e 100644
>>> --- a/drivers/media/mc/mc-device.c
>>> +++ b/drivers/media/mc/mc-device.c
>>> @@ -605,7 +605,6 @@ static void __media_device_unregister_entity(struct media_entity *entity)
>>>   
>>>   	/* invoke entity_notify callbacks to handle entity removal?? */
>>>   
>>> -	entity->graph_obj.mdev = NULL;
> 
> Removed the extra newline above, too. Applied.
> 
> Please run scripts/checkpatch.pl on the patches, too.

Thanks. I will make a v2 with this change.
> 
>>>   }
>>>   
>>>   /**
>>
>> -- 
>> Regards,
>>
>> Laurent Pinchart
> 

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

end of thread, other threads:[~2022-03-31  1:52 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-24 10:27 [PATCH] media: mc: delete redundant code in __media_device_unregister_entity Hangyu Hua
2022-03-24 13:47 ` Laurent Pinchart
2022-03-30 11:05   ` Sakari Ailus
2022-03-31  1:52     ` Hangyu Hua

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).