]> Pileus Git - ~andy/linux/commitdiff
USB: isp1362: remove unused _BUG_ON() calls
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 28 Jun 2013 18:32:58 +0000 (11:32 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 23 Jul 2013 23:35:17 +0000 (16:35 -0700)
We shouldn't ever panic in a driver, and these calls were never being
used, so just delete them, as obviously the driver is working properly
now (right?)

Acked-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/host/isp1362-hcd.c
drivers/usb/host/isp1362.h

index b04e8ece4d35f448c6b8ac5b23b9c198b0702702..c747ba35f7319501eabaeb8e91b4c128ab04b084 100644 (file)
@@ -350,8 +350,6 @@ static void isp1362_write_ptd(struct isp1362_hcd *isp1362_hcd, struct isp1362_ep
        struct ptd *ptd = &ep->ptd;
        int len = PTD_GET_DIR(ptd) == PTD_DIR_IN ? 0 : ep->length;
 
-       _BUG_ON(ep->ptd_offset < 0);
-
        prefetch(ptd);
        isp1362_write_buffer(isp1362_hcd, ptd, ep->ptd_offset, PTD_HEADER_SIZE);
        if (len)
index 0f97820e65befebe6a01154c2b058ebde6a73c97..4ef746dcef854e937f18191cfd6e49d9aea038ec 100644 (file)
@@ -91,7 +91,6 @@ typedef const unsigned int isp1362_reg_t;
 
 #define ISP1362_REG_NO(r)              ((r) & REG_NO_MASK)
 
-#define _BUG_ON(x)     BUG_ON(x)
 #define _WARN_ON(x)    WARN_ON(x)
 
 #define ISP1362_REG(name, addr, width, rw) \
@@ -102,7 +101,6 @@ static isp1362_reg_t ISP1362_REG_##name = ((addr) | (width) | (rw))
 #else
 typedef const unsigned char isp1362_reg_t;
 #define ISP1362_REG_NO(r)              (r)
-#define _BUG_ON(x)                     do {} while (0)
 #define _WARN_ON(x)                    do {} while (0)
 
 #define ISP1362_REG(name, addr, width, rw) \
@@ -645,9 +643,7 @@ static inline struct usb_hcd *isp1362_hcd_to_hcd(struct isp1362_hcd *isp1362_hcd
  */
 static void isp1362_write_addr(struct isp1362_hcd *isp1362_hcd, isp1362_reg_t reg)
 {
-       /*_BUG_ON((reg & ISP1362_REG_WRITE_OFFSET) && !(reg & REG_ACCESS_W));*/
        REG_ACCESS_TEST(reg);
-       _BUG_ON(!irqs_disabled());
        DUMMY_DELAY_ACCESS;
        writew(ISP1362_REG_NO(reg), isp1362_hcd->addr_reg);
        DUMMY_DELAY_ACCESS;
@@ -656,7 +652,6 @@ static void isp1362_write_addr(struct isp1362_hcd *isp1362_hcd, isp1362_reg_t re
 
 static void isp1362_write_data16(struct isp1362_hcd *isp1362_hcd, u16 val)
 {
-       _BUG_ON(!irqs_disabled());
        DUMMY_DELAY_ACCESS;
        writew(val, isp1362_hcd->data_reg);
 }
@@ -665,7 +660,6 @@ static u16 isp1362_read_data16(struct isp1362_hcd *isp1362_hcd)
 {
        u16 val;
 
-       _BUG_ON(!irqs_disabled());
        DUMMY_DELAY_ACCESS;
        val = readw(isp1362_hcd->data_reg);
 
@@ -674,7 +668,6 @@ static u16 isp1362_read_data16(struct isp1362_hcd *isp1362_hcd)
 
 static void isp1362_write_data32(struct isp1362_hcd *isp1362_hcd, u32 val)
 {
-       _BUG_ON(!irqs_disabled());
 #if USE_32BIT
        DUMMY_DELAY_ACCESS;
        writel(val, isp1362_hcd->data_reg);
@@ -690,7 +683,6 @@ static u32 isp1362_read_data32(struct isp1362_hcd *isp1362_hcd)
 {
        u32 val;
 
-       _BUG_ON(!irqs_disabled());
 #if USE_32BIT
        DUMMY_DELAY_ACCESS;
        val = readl(isp1362_hcd->data_reg);
@@ -713,8 +705,6 @@ static void isp1362_read_fifo(struct isp1362_hcd *isp1362_hcd, void *buf, u16 le
        if (!len)
                return;
 
-       _BUG_ON(!irqs_disabled());
-
        RDBG("%s: Reading %d byte from fifo to mem @ %p\n", __func__, len, buf);
 #if USE_32BIT
        if (len >= 4) {
@@ -760,8 +750,6 @@ static void isp1362_write_fifo(struct isp1362_hcd *isp1362_hcd, void *buf, u16 l
                return;
        }
 
-       _BUG_ON(!irqs_disabled());
-
        RDBG("%s: Writing %d byte to fifo from memory @%p\n", __func__, len, buf);
 #if USE_32BIT
        if (len >= 4) {
@@ -923,10 +911,6 @@ static void __attribute__((__unused__)) isp1362_show_regs(struct isp1362_hcd *is
 
 static void isp1362_write_diraddr(struct isp1362_hcd *isp1362_hcd, u16 offset, u16 len)
 {
-       _BUG_ON(offset & 1);
-       _BUG_ON(offset >= ISP1362_BUF_SIZE);
-       _BUG_ON(len > ISP1362_BUF_SIZE);
-       _BUG_ON(offset + len > ISP1362_BUF_SIZE);
        len = (len + 1) & ~1;
 
        isp1362_clr_mask16(isp1362_hcd, HCDMACFG, HCDMACFG_CTR_ENABLE);
@@ -936,8 +920,6 @@ static void isp1362_write_diraddr(struct isp1362_hcd *isp1362_hcd, u16 offset, u
 
 static void isp1362_read_buffer(struct isp1362_hcd *isp1362_hcd, void *buf, u16 offset, int len)
 {
-       _BUG_ON(offset & 1);
-
        isp1362_write_diraddr(isp1362_hcd, offset, len);
 
        DBG(3, "%s: Reading %d byte from buffer @%04x to memory @ %p\n",
@@ -956,8 +938,6 @@ static void isp1362_read_buffer(struct isp1362_hcd *isp1362_hcd, void *buf, u16
 
 static void isp1362_write_buffer(struct isp1362_hcd *isp1362_hcd, void *buf, u16 offset, int len)
 {
-       _BUG_ON(offset & 1);
-
        isp1362_write_diraddr(isp1362_hcd, offset, len);
 
        DBG(3, "%s: Writing %d byte to buffer @%04x from memory @ %p\n",