[09/18,media] media-entity: enforce check of interface and links creation
diff mbox

Message ID e434a5b64b652589c99f421f6b18ea7ff445158c.1441559233.git.mchehab@osg.samsung.com
State New
Headers show

Commit Message

Mauro Carvalho Chehab Sept. 6, 2015, 5:30 p.m. UTC
Drivers should check if interfaces and interface links were
created. Add a must_check for them.

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>

Comments

Hans Verkuil Sept. 11, 2015, 3:23 p.m. UTC | #1
On 09/06/2015 07:30 PM, Mauro Carvalho Chehab wrote:
> Drivers should check if interfaces and interface links were
> created. Add a must_check for them.
> 
> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>

Acked-by: Hans Verkuil <hans.verkuil@cisco.com>

> 
> diff --git a/include/media/media-entity.h b/include/media/media-entity.h
> index 3d389f142a1d..62f882d872b1 100644
> --- a/include/media/media-entity.h
> +++ b/include/media/media-entity.h
> @@ -370,14 +370,16 @@ __must_check int media_entity_pipeline_start(struct media_entity *entity,
>  					     struct media_pipeline *pipe);
>  void media_entity_pipeline_stop(struct media_entity *entity);
>  
> -struct media_intf_devnode *media_devnode_create(struct media_device *mdev,
> -						u32 type, u32 flags,
> -						u32 major, u32 minor,
> -						gfp_t gfp_flags);
> +struct media_intf_devnode *
> +__must_check media_devnode_create(struct media_device *mdev,
> +				  u32 type, u32 flags,
> +				  u32 major, u32 minor,
> +				  gfp_t gfp_flags);
>  void media_devnode_remove(struct media_intf_devnode *devnode);
> -struct media_link *media_create_intf_link(struct media_entity *entity,
> -					    struct media_interface *intf,
> -					    u32 flags);
> +struct media_link *
> +__must_check media_create_intf_link(struct media_entity *entity,
> +				    struct media_interface *intf,
> +				    u32 flags);
>  void media_remove_intf_link(struct media_link *link);
>  void __media_remove_intf_links(struct media_interface *intf);
>  void media_remove_intf_links(struct media_interface *intf);
> 

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

Patch
diff mbox

diff --git a/include/media/media-entity.h b/include/media/media-entity.h
index 3d389f142a1d..62f882d872b1 100644
--- a/include/media/media-entity.h
+++ b/include/media/media-entity.h
@@ -370,14 +370,16 @@  __must_check int media_entity_pipeline_start(struct media_entity *entity,
 					     struct media_pipeline *pipe);
 void media_entity_pipeline_stop(struct media_entity *entity);
 
-struct media_intf_devnode *media_devnode_create(struct media_device *mdev,
-						u32 type, u32 flags,
-						u32 major, u32 minor,
-						gfp_t gfp_flags);
+struct media_intf_devnode *
+__must_check media_devnode_create(struct media_device *mdev,
+				  u32 type, u32 flags,
+				  u32 major, u32 minor,
+				  gfp_t gfp_flags);
 void media_devnode_remove(struct media_intf_devnode *devnode);
-struct media_link *media_create_intf_link(struct media_entity *entity,
-					    struct media_interface *intf,
-					    u32 flags);
+struct media_link *
+__must_check media_create_intf_link(struct media_entity *entity,
+				    struct media_interface *intf,
+				    u32 flags);
 void media_remove_intf_link(struct media_link *link);
 void __media_remove_intf_links(struct media_interface *intf);
 void media_remove_intf_links(struct media_interface *intf);