All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
To: unlisted-recipients:; (no To-header on input)@casper.infradead.org
Cc: "Mauro Carvalho Chehab" <mchehab@osg.samsung.com>,
	"Linux Media Mailing List" <linux-media@vger.kernel.org>,
	"Mauro Carvalho Chehab" <mchehab@infradead.org>,
	"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
	"Krzysztof Hałasa" <khalasa@piap.pl>,
	"Hans Verkuil" <hans.verkuil@cisco.com>,
	devel@driverdev.osuosl.org
Subject: [PATCH] [media] tw686x-kh: use the cached value
Date: Wed, 20 Apr 2016 13:41:04 -0300	[thread overview]
Message-ID: <13431509a41889a70cc76b31180f63fd10d0a5b3.1461170447.git.mchehab@osg.samsung.com> (raw)

the dma_requests field is cached, but cache is not used:

drivers/staging/media/tw686x-kh/tw686x-kh-video.c: In function 'tw686x_video_irq':
drivers/staging/media/tw686x-kh/tw686x-kh-video.c:622:6: warning: variable 'requests' set but not used [-Wunused-but-set-variable]
  u32 requests;
      ^

Use the cache instead, as it seems reading it needs to be done
with spin lock taken.

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
---
 drivers/staging/media/tw686x-kh/tw686x-kh-video.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/media/tw686x-kh/tw686x-kh-video.c b/drivers/staging/media/tw686x-kh/tw686x-kh-video.c
index 2fbc3cbd9eb0..0650c29f78eb 100644
--- a/drivers/staging/media/tw686x-kh/tw686x-kh-video.c
+++ b/drivers/staging/media/tw686x-kh/tw686x-kh-video.c
@@ -625,7 +625,7 @@ int tw686x_video_irq(struct tw686x_dev *dev)
 	requests = dev->dma_requests;
 	spin_unlock_irqrestore(&dev->irq_lock, flags);
 
-	if (dev->dma_requests & dev->video_active) {
+	if (requests & dev->video_active) {
 		wake_up_interruptible_all(&dev->video_thread_wait);
 		handled = 1;
 	}
-- 
2.5.5


                 reply	other threads:[~2016-04-20 16:42 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=13431509a41889a70cc76b31180f63fd10d0a5b3.1461170447.git.mchehab@osg.samsung.com \
    --to=mchehab@osg.samsung.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=hans.verkuil@cisco.com \
    --cc=khalasa@piap.pl \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@infradead.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.