From: Javier Martinez Canillas <javier@osg.samsung.com>
To: Sakari Ailus <sakari.ailus@linux.intel.com>,
linux-kernel@vger.kernel.org
Cc: Mauro Carvalho Chehab <mchehab@osg.samsung.com>,
linux-media@vger.kernel.org
Subject: Re: [PATCH 1/2] [media] media-device: check before unregister if mdev was registered
Date: Thu, 10 Sep 2015 19:35:54 +0200 [thread overview]
Message-ID: <55F1BF7A.4000901@osg.samsung.com> (raw)
In-Reply-To: <55F1BAA8.3030107@linux.intel.com>
Hello Sakari,
Thanks a lot for your feedback.
On 09/10/2015 07:15 PM, Sakari Ailus wrote:
> Javier Martinez Canillas wrote:
>> Most media functions that unregister, check if the corresponding register
>> function succeed before. So these functions can safely be called even if a
>> registration was never made or the component as already been unregistered.
>>
>> Add the same check to media_device_unregister() function for consistency.
>>
>> This will also allow to split the media_device_register() function in an
>> initialization and registration functions without the need to change the
>> generic cleanup functions and error code paths for all the media drivers.
>>
>> Suggested-by: Sakari Ailus <sakari.ailus@linux.intel.com>
>> Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
>> ---
>>
>> drivers/media/media-device.c | 6 ++++++
>> 1 file changed, 6 insertions(+)
>>
>> diff --git a/drivers/media/media-device.c b/drivers/media/media-device.c
>> index 1312e93ebd6e..745defb34b33 100644
>> --- a/drivers/media/media-device.c
>> +++ b/drivers/media/media-device.c
>> @@ -574,6 +574,8 @@ EXPORT_SYMBOL_GPL(__media_device_register);
>> * media_device_unregister - unregister a media device
>> * @mdev: The media device
>> *
>> + * If the media device has never been registered this function will
>> + * return immediately.
>
> I'd say "It is safe to call this function on an unregistered (but
> initialised) media device.". Up to you.
>
Ok, I copied that message from media_device_unregister_entity() with
s/entity/media device so the kernel doc would be consistent but I don't
mind to change to your suggested message since looks more clear to me.
> Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
>
Thanks!
Best regards,
--
Javier Martinez Canillas
Open Source Group
Samsung Research America
next prev parent reply other threads:[~2015-09-10 17:35 UTC|newest]
Thread overview: 63+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-10 13:03 [PATCH 0/2] [media] Fix race between graph enumeration and entities registration Javier Martinez Canillas
2015-09-10 13:03 ` Javier Martinez Canillas
2015-09-10 13:03 ` Javier Martinez Canillas
2015-09-10 13:03 ` Javier Martinez Canillas
2015-09-10 13:03 ` [PATCH 1/2] [media] media-device: check before unregister if mdev was registered Javier Martinez Canillas
2015-09-10 17:15 ` Sakari Ailus
2015-09-10 17:35 ` Javier Martinez Canillas [this message]
2015-09-10 13:03 ` [PATCH 2/2] [media] media-device: split media initialization and registration Javier Martinez Canillas
2015-09-10 13:03 ` Javier Martinez Canillas
2015-09-10 13:03 ` Javier Martinez Canillas
2015-09-10 13:03 ` Javier Martinez Canillas
2015-09-10 17:14 ` Sakari Ailus
2015-09-10 17:14 ` Sakari Ailus
2015-09-10 17:14 ` Sakari Ailus
2015-09-10 17:14 ` Sakari Ailus
2015-09-10 18:31 ` Javier Martinez Canillas
2015-09-10 18:31 ` Javier Martinez Canillas
2015-09-10 18:31 ` Javier Martinez Canillas
2015-09-10 18:31 ` Javier Martinez Canillas
2015-09-11 5:51 ` Sakari Ailus
2015-09-11 5:51 ` Sakari Ailus
2015-09-11 5:51 ` Sakari Ailus
2015-09-11 5:51 ` Sakari Ailus
2015-09-11 7:31 ` Javier Martinez Canillas
2015-09-11 7:31 ` Javier Martinez Canillas
2015-09-11 7:31 ` Javier Martinez Canillas
2015-09-11 7:31 ` Javier Martinez Canillas
2015-09-11 9:07 ` Mauro Carvalho Chehab
2015-09-11 9:07 ` Mauro Carvalho Chehab
2015-09-11 9:07 ` Mauro Carvalho Chehab
2015-09-11 9:07 ` Mauro Carvalho Chehab
2015-09-11 9:28 ` Sakari Ailus
2015-09-11 9:28 ` Sakari Ailus
2015-09-11 9:28 ` Sakari Ailus
2015-09-11 9:28 ` Sakari Ailus
2015-12-15 11:13 ` Mauro Carvalho Chehab
2015-12-15 11:13 ` Mauro Carvalho Chehab
2015-12-15 11:13 ` Mauro Carvalho Chehab
2015-12-15 11:13 ` Mauro Carvalho Chehab
2015-12-21 14:37 ` Javier Martinez Canillas
2015-12-21 14:37 ` Javier Martinez Canillas
2015-12-21 14:37 ` Javier Martinez Canillas
2015-12-21 14:37 ` Javier Martinez Canillas
2015-12-28 1:14 ` Sakari Ailus
2015-12-28 1:14 ` Sakari Ailus
2015-12-28 1:14 ` Sakari Ailus
2015-12-28 1:14 ` Sakari Ailus
2015-12-28 10:26 ` Mauro Carvalho Chehab
2015-12-28 10:26 ` Mauro Carvalho Chehab
2015-12-28 10:26 ` Mauro Carvalho Chehab
2015-12-28 10:26 ` Mauro Carvalho Chehab
2015-12-28 12:52 ` Mauro Carvalho Chehab
2015-12-28 12:52 ` Mauro Carvalho Chehab
2015-12-28 12:52 ` Mauro Carvalho Chehab
2015-12-28 12:52 ` Mauro Carvalho Chehab
2015-09-10 17:39 ` Sakari Ailus
2015-09-10 17:39 ` Sakari Ailus
2015-09-10 17:39 ` Sakari Ailus
2015-09-10 17:39 ` Sakari Ailus
2015-09-10 18:33 ` Javier Martinez Canillas
2015-09-10 18:33 ` Javier Martinez Canillas
2015-09-10 18:33 ` Javier Martinez Canillas
2015-09-10 18:33 ` Javier Martinez Canillas
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=55F1BF7A.4000901@osg.samsung.com \
--to=javier@osg.samsung.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@osg.samsung.com \
--cc=sakari.ailus@linux.intel.com \
/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.