All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
To: Hans Verkuil <hverkuil@xs4all.nl>
Cc: Linux Media Mailing List <linux-media@vger.kernel.org>,
	Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Subject: Re: Any reason why media_entity_pads_init() isn't void?
Date: Mon, 14 Mar 2016 07:24:40 -0300	[thread overview]
Message-ID: <20160314072440.6aaccd86@recife.lan> (raw)
In-Reply-To: <56E6758F.7020205@xs4all.nl>

Em Mon, 14 Mar 2016 09:25:51 +0100
Hans Verkuil <hverkuil@xs4all.nl> escreveu:

> I was fixing a sparse warning in media_entity_pads_init() and I noticed that that
> function always returns 0. Any reason why this can't be changed to a void function?
> 
> That return value is checked a zillion times in the media code. By making it void
> it should simplify code all over.
> 
> See e.g. uvc_mc_init_entity in drivers/media/usb/uvc/uvc_entity.c: that whole
> function can become a void function itself.


This function were called media_entity_init(), and it used to have a
code that would allocate the links array. The way it is right now, I
don't see any reason to keep returning an error code.

Regards,
Mauro

  reply	other threads:[~2016-03-14 10:24 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-14  8:25 Any reason why media_entity_pads_init() isn't void? Hans Verkuil
2016-03-14 10:24 ` Mauro Carvalho Chehab [this message]
2016-03-14 10:36 ` Sakari Ailus
2016-03-14 11:27   ` Mauro Carvalho Chehab
2016-03-14 11:43     ` Sakari Ailus
2016-03-14 11:52       ` Mauro Carvalho Chehab
2016-03-14 13:05         ` Mauro Carvalho Chehab
2016-03-14 18:16           ` Mauro Carvalho Chehab

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160314072440.6aaccd86@recife.lan \
    --to=mchehab@osg.samsung.com \
    --cc=hverkuil@xs4all.nl \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-media@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.