All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mauro Carvalho Chehab <mchehab@s-opensource.com>
To: Shuah Khan <shuahkh@osg.samsung.com>
Cc: mchehab@kernel.org, mkrufky@linuxtv.org, klock.android@gmail.com,
	elfring@users.sourceforge.net, max@duempel.org,
	hans.verkuil@cisco.com, javier@osg.samsung.com,
	chehabrafael@gmail.com, sakari.ailus@linux.intel.com,
	laurent.pinchart+renesas@ideasonboard.com,
	linux-media@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 0/2] media protect enable and disable source handler paths
Date: Tue, 29 Nov 2016 07:15:26 -0200	[thread overview]
Message-ID: <20161129071526.5a004b75@vento.lan> (raw)
In-Reply-To: <cover.1480384155.git.shuahkh@osg.samsung.com>

Em Mon, 28 Nov 2016 19:15:12 -0700
Shuah Khan <shuahkh@osg.samsung.com> escreveu:

> These two patches fix enable and disable source handler paths. These
> aren't dependent patches, grouped because they fix similar problems.

Those two patches should be fold, as applying just the first patch
would cause au0828 to try to double lock.

> 
> This work is triggered by a review comment from Mauro Chehab on a
> snd_usb_audio patch about protecting the enable and disabel handler
> path in it.
> 
> Ran tests to make sure enable and disable handler paths work. When
> digital stream is active, analog app finds the tuner busy and vice
> versa. Also ran the Sakari's unbind while video stream is active test.

Sorry, but your patches descriptions don't make things clear:

- It doesn't present any OOPS or logs that would help to
  understand what you're trying to fix;

- From what I understood, you're moving the lock out of
  enable/disable handlers, and letting their callers to do
  the locks themselves. Why? Are there any condition where it
  won't need to be locked?

- It is not touching documentation. If now the callbacks should
  not implement locks, this should be explicitly described.

Btw, I think it is a bad idea to let the callers to handle
the locks. The best would be, instead, to change the code in
some other way to avoid it, if possible. If not possible at all,
clearly describe why it is not possible and insert some comments
inside the code, to avoid some cleanup patch to mess up with this.

Regards

Thanks,
Mauro

  parent reply	other threads:[~2016-11-29  9:15 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-29  2:15 [PATCH 0/2] media protect enable and disable source handler paths Shuah Khan
2016-11-29  2:15 ` [PATCH 1/2] media: au0828 fix to protect enable/disable source set and clear Shuah Khan
2016-11-29  2:15 ` [PATCH 2/2] media: protect enable and disable source handler checks and calls Shuah Khan
2016-11-29  9:22   ` Sakari Ailus
2016-11-29 17:41     ` Shuah Khan
2016-12-01 13:51       ` Sakari Ailus
2016-12-01 16:51         ` Shuah Khan
2016-11-29  9:15 ` Mauro Carvalho Chehab [this message]
2016-11-29 17:07   ` [PATCH 0/2] media protect enable and disable source handler paths Shuah Khan
2016-11-29 17:17     ` 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=20161129071526.5a004b75@vento.lan \
    --to=mchehab@s-opensource.com \
    --cc=chehabrafael@gmail.com \
    --cc=elfring@users.sourceforge.net \
    --cc=hans.verkuil@cisco.com \
    --cc=javier@osg.samsung.com \
    --cc=klock.android@gmail.com \
    --cc=laurent.pinchart+renesas@ideasonboard.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=max@duempel.org \
    --cc=mchehab@kernel.org \
    --cc=mkrufky@linuxtv.org \
    --cc=sakari.ailus@linux.intel.com \
    --cc=shuahkh@osg.samsung.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.