USB: isp1362: remove unused _BUG_ON() calls
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>
This commit is contained in:
parent
0667fe7676
commit
051a0689d6
|
@ -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)
|
||||
|
|
|
@ -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",
|
||||
|
|
Loading…
Reference in New Issue