Re: [PATCH] dma: fix returnvar.cocci warnings

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 11/08/2015 07:45 AM, Julia Lawall wrote:
>  Remove unneeded variable used to store return value.
> 
> --- a/drivers/dma/qcom/hidma_ll.c
> +++ b/drivers/dma/qcom/hidma_ll.c
> @@ -567,14 +567,13 @@ int hidma_ll_resume(struct hidma_lldev *
> 
>  static int hidma_ll_hw_start(struct hidma_lldev *lldev)
>  {
> -	int rc = 0;
>  	unsigned long irqflags;
> 
>  	spin_lock_irqsave(&lldev->lock, irqflags);
>  	writel(lldev->tre_write_offset, lldev->trca + TRCA_DOORBELL_OFFSET);
>  	spin_unlock_irqrestore(&lldev->lock, irqflags);
> 
> -	return rc;
> +	return 0;
>  }
> 
>  bool hidma_ll_isenabled(struct hidma_lldev *lldev)

Seems rather pointless, what about 'static void ...' and dropping the
return statement?


Daniel K.

--
To unsubscribe from this list: send the line "unsubscribe linux-arm-msm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [Linux for Sparc]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux