lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20080818211207.8da0945f.akpm@linux-foundation.org>
Date:	Mon, 18 Aug 2008 21:12:07 -0700
From:	Andrew Morton <akpm@...ux-foundation.org>
To:	Alexander Beregalov <a.beregalov@...il.com>
Cc:	mchehab@...radead.org, v4l-dvb-maintainer@...uxtv.org,
	video4linux-list@...hat.com, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] saa7134-core.c: fix warning

On Wed, 6 Aug 2008 01:31:11 +0400 Alexander Beregalov <a.beregalov@...il.com> wrote:

> From: Alexander Beregalov <a.beregalov@...il.com>
> 
> saa7134-core.c: fix warning
> 
> drivers/media/video/saa7134/saa7134-core.c:366: warning:
> 'saa7134_buffer_requeue' defined but not used
> 
> Signed-off-by: Alexander Beregalov <a.beregalov@...il.com>
> ---
> 
>  drivers/media/video/saa7134/saa7134-core.c |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/media/video/saa7134/saa7134-core.c b/drivers/media/video/saa7134/saa7134-core.c
> index 75d6184..0473a79 100644
> --- a/drivers/media/video/saa7134/saa7134-core.c
> +++ b/drivers/media/video/saa7134/saa7134-core.c
> @@ -360,7 +360,7 @@ void saa7134_buffer_timeout(unsigned long data)
>  }
>  
>  /* resends a current buffer in queue after resume */
> -
> +#ifdef CONFIG_PM
>  static int saa7134_buffer_requeue(struct saa7134_dev *dev,
>  				  struct saa7134_dmaqueue *q)
>  {
> @@ -384,7 +384,7 @@ static int saa7134_buffer_requeue(struct saa7134_dev *dev,
>  
>  	return 0;
>  }
> -
> +#endif

I changed it as below - we might as well save an ifdef block.

--- a/drivers/media/video/saa7134/saa7134-core.c~saa7134-corec-fix-warning
+++ a/drivers/media/video/saa7134/saa7134-core.c
@@ -359,32 +359,6 @@ void saa7134_buffer_timeout(unsigned lon
 	spin_unlock_irqrestore(&dev->slock,flags);
 }
 
-/* resends a current buffer in queue after resume */
-
-static int saa7134_buffer_requeue(struct saa7134_dev *dev,
-				  struct saa7134_dmaqueue *q)
-{
-	struct saa7134_buf *buf, *next;
-
-	assert_spin_locked(&dev->slock);
-
-	buf  = q->curr;
-	next = buf;
-	dprintk("buffer_requeue\n");
-
-	if (!buf)
-		return 0;
-
-	dprintk("buffer_requeue : resending active buffers \n");
-
-	if (!list_empty(&q->queue))
-		next = list_entry(q->queue.next, struct saa7134_buf,
-					  vb.queue);
-	buf->activate(dev, buf, next);
-
-	return 0;
-}
-
 /* ------------------------------------------------------------------ */
 
 int saa7134_set_dmabits(struct saa7134_dev *dev)
@@ -1139,6 +1113,32 @@ static void __devexit saa7134_finidev(st
 }
 
 #ifdef CONFIG_PM
+
+/* resends a current buffer in queue after resume */
+static int saa7134_buffer_requeue(struct saa7134_dev *dev,
+				  struct saa7134_dmaqueue *q)
+{
+	struct saa7134_buf *buf, *next;
+
+	assert_spin_locked(&dev->slock);
+
+	buf  = q->curr;
+	next = buf;
+	dprintk("buffer_requeue\n");
+
+	if (!buf)
+		return 0;
+
+	dprintk("buffer_requeue : resending active buffers \n");
+
+	if (!list_empty(&q->queue))
+		next = list_entry(q->queue.next, struct saa7134_buf,
+					  vb.queue);
+	buf->activate(dev, buf, next);
+
+	return 0;
+}
+
 static int saa7134_suspend(struct pci_dev *pci_dev , pm_message_t state)
 {
 
_

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ