diff mbox

[1/2] media: pci: saa7164: remove unnecessary code

Message ID 20170221034657.GA4757@embeddedgus (mailing list archive)
State New, archived
Headers show

Commit Message

Gustavo A. R. Silva Feb. 21, 2017, 3:46 a.m. UTC
Remove unnecessary variable 'loop'.

Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com>
---
 drivers/media/pci/saa7164/saa7164-cmd.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Comments

Peter Senna Tschudin Feb. 21, 2017, 10:07 p.m. UTC | #1
On Mon, Feb 20, 2017 at 09:46:58PM -0600, Gustavo A. R. Silva wrote:
> Remove unnecessary variable 'loop'.
> 
Reviewed-by: Peter Senna Tschudin <peter.senna@gmail.com>
> Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com>
> ---
>  drivers/media/pci/saa7164/saa7164-cmd.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/media/pci/saa7164/saa7164-cmd.c b/drivers/media/pci/saa7164/saa7164-cmd.c
> index 45951b3..169c90a 100644
> --- a/drivers/media/pci/saa7164/saa7164-cmd.c
> +++ b/drivers/media/pci/saa7164/saa7164-cmd.c
> @@ -134,14 +134,13 @@ int saa7164_irq_dequeue(struct saa7164_dev *dev)
>   * -bus/c running buffer. */
>  static int saa7164_cmd_dequeue(struct saa7164_dev *dev)
>  {
> -	int loop = 1;
>  	int ret;
>  	u32 timeout;
>  	wait_queue_head_t *q = NULL;
>  	u8 tmp[512];
>  	dprintk(DBGLVL_CMD, "%s()\n", __func__);
>  
> -	while (loop) {
> +	while (true) {
>  
>  		struct tmComResInfo tRsp = { 0, 0, 0, 0, 0, 0 };
>  		ret = saa7164_bus_get(dev, &tRsp, NULL, 1);
> -- 
> 2.5.0
>
diff mbox

Patch

diff --git a/drivers/media/pci/saa7164/saa7164-cmd.c b/drivers/media/pci/saa7164/saa7164-cmd.c
index 45951b3..169c90a 100644
--- a/drivers/media/pci/saa7164/saa7164-cmd.c
+++ b/drivers/media/pci/saa7164/saa7164-cmd.c
@@ -134,14 +134,13 @@  int saa7164_irq_dequeue(struct saa7164_dev *dev)
  * -bus/c running buffer. */
 static int saa7164_cmd_dequeue(struct saa7164_dev *dev)
 {
-	int loop = 1;
 	int ret;
 	u32 timeout;
 	wait_queue_head_t *q = NULL;
 	u8 tmp[512];
 	dprintk(DBGLVL_CMD, "%s()\n", __func__);
 
-	while (loop) {
+	while (true) {
 
 		struct tmComResInfo tRsp = { 0, 0, 0, 0, 0, 0 };
 		ret = saa7164_bus_get(dev, &tRsp, NULL, 1);