Re: [PATCH] dma/ipu: change ipu_irq_handler() to remove compile warning

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

 



On Tue, 25 Aug 2015, yalin wang wrote:
> Change ipu_irq_handler() to avoid gcc warning:
> 
> drivers/dma/ipu/ipu_irq.c:305:4: warning: 'irq' may be used
> uninitialized in this function [-Wmaybe-uninitialized]
>     generic_handle_irq(irq);

That's a false positive from GCC. irq is always initialized when
generic_handle_irq() is called.
 
> Signed-off-by: yalin wang <yalin.wang2010@xxxxxxxxx>
> ---
>  drivers/dma/ipu/ipu_irq.c | 6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/dma/ipu/ipu_irq.c b/drivers/dma/ipu/ipu_irq.c
> index 7489d2a..1a74eee 100644
> --- a/drivers/dma/ipu/ipu_irq.c
> +++ b/drivers/dma/ipu/ipu_irq.c
> @@ -286,23 +286,21 @@ static void ipu_irq_handler(unsigned int __irq, struct irq_desc *desc)
>  		raw_spin_unlock(&bank_lock);
>  		while ((line = ffs(status))) {
>  			struct ipu_irq_map *map;
> -			unsigned int irq;
>  
>  			line--;
>  			status &= ~(1UL << line);
>  
>  			raw_spin_lock(&bank_lock);
>  			map = src2map(32 * i + line);
> -			if (map)
> -				irq = map->irq;
>  			raw_spin_unlock(&bank_lock);
>  
>  			if (!map) {
>  				pr_err("IPU: Interrupt on unmapped source %u bank %d\n",
>  				       line, i);
>  				continue;
> +			} else {
> +				generic_handle_irq(map->irq);

So you change that from retrieving the irq number with bank lock held
to an unprotected access.

Thanks,

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



[Index of Archives]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux PCI]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux