Re: [PATCH 4/8] USB: musb: suppress warning about unused flags

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

 



Hello.

Felipe Balbi wrote:

From: Jon Povey <jon.povey@xxxxxxxxxxxxxxx>

Wrap flags with uninitialized_var() to suppress this:

drivers/usb/musb/cppi_dma.c:1158: warning: 'flags' may be used uninitialized
in this function

Signed-off-by: Jon Povey <jon.povey@xxxxxxxxxxxxxxx>
Signed-off-by: Ajay Kumar Gupta <ajay.gupta@xxxxxx>
---
drivers/usb/musb/cppi_dma.c |    2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/usb/musb/cppi_dma.c b/drivers/usb/musb/cppi_dma.c
index 59dc3d3..e3753ba 100644
--- a/drivers/usb/musb/cppi_dma.c
+++ b/drivers/usb/musb/cppi_dma.c
@@ -1155,7 +1155,7 @@ irqreturn_t cppi_interrupt(int irq, void *dev_id)
    struct musb_hw_ep    *hw_ep = NULL;
    u32            rx, tx;
    int            i, index;
-    unsigned long        flags;
+    unsigned long        uninitialized_var(flags);

I think the problem here is different. First of all, an IRQ of number 0 is valid

   It's not valid for this driver.

and your locking would be broken in that case. Is there really any board that doesn't have the irq line routed ?

Only DM646x have dedicated CPPI IRQ, for other DaVincis MUSB/CPPI IRQ is shared.

To me it just looks  hat branching if (irq) is completely bogus.

   Look at dma_controller_create() in this file.

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


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux