diff mbox

[12/18,media] media-entity: must check media_create_pad_link()

Message ID 4dc311149dc667420c59ba7060846ba993cef507.1441559233.git.mchehab@osg.samsung.com (mailing list archive)
State New, archived
Headers show

Commit Message

Mauro Carvalho Chehab Sept. 6, 2015, 5:30 p.m. UTC
Drivers should check if media_create_pad_link() actually
worked.

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

Comments

Hans Verkuil Sept. 11, 2015, 3:24 p.m. UTC | #1
On 09/06/2015 07:30 PM, Mauro Carvalho Chehab wrote:
> Drivers should check if media_create_pad_link() actually
> worked.
> 
> 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 62f882d872b1..8bdc10dcc5e7 100644
> --- a/include/media/media-entity.h
> +++ b/include/media/media-entity.h
> @@ -348,8 +348,9 @@ int media_entity_init(struct media_entity *entity, u16 num_pads,
>  		      struct media_pad *pads);
>  void media_entity_cleanup(struct media_entity *entity);
>  
> -int media_create_pad_link(struct media_entity *source, u16 source_pad,
> -		struct media_entity *sink, u16 sink_pad, u32 flags);
> +__must_check int media_create_pad_link(struct media_entity *source,
> +			u16 source_pad,	struct media_entity *sink,
> +			u16 sink_pad, u32 flags);
>  void __media_entity_remove_links(struct media_entity *entity);
>  void media_entity_remove_links(struct media_entity *entity);
>  
> 

--
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
Laurent Pinchart Nov. 23, 2015, 5:54 p.m. UTC | #2
Hi Mauro,

Thank you for the patch.

On Sunday 06 September 2015 14:30:55 Mauro Carvalho Chehab wrote:
> Drivers should check if media_create_pad_link() actually
> worked.
> 
> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
> 
> diff --git a/include/media/media-entity.h b/include/media/media-entity.h
> index 62f882d872b1..8bdc10dcc5e7 100644
> --- a/include/media/media-entity.h
> +++ b/include/media/media-entity.h
> @@ -348,8 +348,9 @@ int media_entity_init(struct media_entity *entity, u16
> num_pads, struct media_pad *pads);
>  void media_entity_cleanup(struct media_entity *entity);
> 
> -int media_create_pad_link(struct media_entity *source, u16 source_pad,
> -		struct media_entity *sink, u16 sink_pad, u32 flags);
> +__must_check int media_create_pad_link(struct media_entity *source,
> +			u16 source_pad,	struct media_entity *sink,

s/,\t/, /

> +			u16 sink_pad, u32 flags);

And it would make sense to squash this with the patch that introduces 
media_create_pad_link().

>  void __media_entity_remove_links(struct media_entity *entity);
>  void media_entity_remove_links(struct media_entity *entity);
Mauro Carvalho Chehab Dec. 10, 2015, 7:13 p.m. UTC | #3
Em Mon, 23 Nov 2015 19:54:17 +0200
Laurent Pinchart <laurent.pinchart@ideasonboard.com> escreveu:

> Hi Mauro,
> 
> Thank you for the patch.
> 
> On Sunday 06 September 2015 14:30:55 Mauro Carvalho Chehab wrote:
> > Drivers should check if media_create_pad_link() actually
> > worked.
> > 
> > Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
> > 
> > diff --git a/include/media/media-entity.h b/include/media/media-entity.h
> > index 62f882d872b1..8bdc10dcc5e7 100644
> > --- a/include/media/media-entity.h
> > +++ b/include/media/media-entity.h
> > @@ -348,8 +348,9 @@ int media_entity_init(struct media_entity *entity, u16
> > num_pads, struct media_pad *pads);
> >  void media_entity_cleanup(struct media_entity *entity);
> > 
> > -int media_create_pad_link(struct media_entity *source, u16 source_pad,
> > -		struct media_entity *sink, u16 sink_pad, u32 flags);
> > +__must_check int media_create_pad_link(struct media_entity *source,
> > +			u16 source_pad,	struct media_entity *sink,
> 
> s/,\t/, /

Fixed.

> 
> > +			u16 sink_pad, u32 flags);
> 
> And it would make sense to squash this with the patch that introduces 
> media_create_pad_link().

Maybe, but it is too late for that ;) Also, not sure about this 
specific case, but on the other patches adding __must_check, some
things needed to be fixed before actually adding the change.

> 
> >  void __media_entity_remove_links(struct media_entity *entity);
> >  void media_entity_remove_links(struct media_entity *entity);
> 
--
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
diff mbox

Patch

diff --git a/include/media/media-entity.h b/include/media/media-entity.h
index 62f882d872b1..8bdc10dcc5e7 100644
--- a/include/media/media-entity.h
+++ b/include/media/media-entity.h
@@ -348,8 +348,9 @@  int media_entity_init(struct media_entity *entity, u16 num_pads,
 		      struct media_pad *pads);
 void media_entity_cleanup(struct media_entity *entity);
 
-int media_create_pad_link(struct media_entity *source, u16 source_pad,
-		struct media_entity *sink, u16 sink_pad, u32 flags);
+__must_check int media_create_pad_link(struct media_entity *source,
+			u16 source_pad,	struct media_entity *sink,
+			u16 sink_pad, u32 flags);
 void __media_entity_remove_links(struct media_entity *entity);
 void media_entity_remove_links(struct media_entity *entity);