Skip to contentSkip to conversation

media: mc: delete redundant code in __media_device_unregister_entity

PATCH Superseded Hangyu Hua 3 participants 4 messages Mar 24, 2022 – Mar 31, 2022

Subsystems (2)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Hangyu Hua

author
#0 lore raw

PATCH 1/1 media: mc: delete redundant code in __media_device_unregister_entity

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

---
 drivers/media/mc/mc-device.c | 1 -
 1 file changed, 1 deletion(-)
drivers/media/mc/mc-device.c +0 -1
index cf5e459b1d96..7727c619043e 100644
@@ -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;
 }
 
 /**
Signature · 1 line
2.25.1
maintainer Reviewed-by on v1 1/1
#1 lore raw

Hi Hangyu,

Thank you for the patch.

Quoted 4 lines · Hangyu Hua

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

Quoted 16 lines
---
 drivers/media/mc/mc-device.c | 1 -
 1 file changed, 1 deletion(-)
drivers/media/mc/mc-device.c +0 -1
index cf5e459b1d96..7727c619043e 100644
@@ -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;
 }
 
 /**
Signature · 3 lines
Regards,

Laurent Pinchart
maintainer
#2 lore raw
Quoted 22 lines · Laurent Pinchart

Hi Hangyu,

Thank you for the patch.

Quoted 4 lines · Hangyu Hua

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

Quoted 10 lines
---
 drivers/media/mc/mc-device.c | 1 -
 1 file changed, 1 deletion(-)
drivers/media/mc/mc-device.c +0 -0
index cf5e459b1d96..7727c619043e 100644
@@ -605,7 +605,6 @@ static void __media_device_unregister_entity(struct media_entity *entity)
 
Quoted 3 lines

drivers/media/mc/mc-device.c static void __media_device_unregister_entity(struct media_entity *entity) · line 608

Quoted 3 lines
drivers/media/mc/mc-device.c +0 -1
 	/* 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.

Quoted 8 lines
Quoted 3 lines
drivers/media/mc/mc-device.c +0 -0
 }
 
 /**
Signature · 3 lines
Regards,

Laurent Pinchart
Signature · 1 line
Sakari Ailus
author
#3 lore raw
Quoted 23 lines · Sakari Ailus
Quoted 22 lines · Laurent Pinchart

Hi Hangyu,

Thank you for the patch.

Quoted 4 lines · Hangyu Hua

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

Quoted 10 lines
---
  drivers/media/mc/mc-device.c | 1 -
  1 file changed, 1 deletion(-)
drivers/media/mc/mc-device.c +0 -0
index cf5e459b1d96..7727c619043e 100644
@@ -605,7 +605,6 @@ static void __media_device_unregister_entity(struct media_entity *entity)
 
Quoted 7 lines
Quoted 3 lines

drivers/media/mc/mc-device.c static void __media_device_unregister_entity(struct media_entity *entity) · line 608

Quoted 3 lines
drivers/media/mc/mc-device.c +0 -1
  	/* 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.

Quoted 10 lines
Quoted 9 lines
Quoted 4 lines
drivers/media/mc/mc-device.c +0 -0
  }
 
  /**
Signature · 3 lines
Regards,

Laurent Pinchart