diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-06-28 14:32:50 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-07-23 19:32:36 -0400 |
commit | f55876dec74edb4d4b3eeaaf1278c2835a4c20f0 (patch) | |
tree | 53932e239c40f99b918befae318cea309dba9d17 | |
parent | d7ece6515e129a419e6603d49362517a1511425e (diff) |
USB: usbatm: remove unused UDSL_ASSERT macro
If this code isn't triggering this assert by now, it never will, so just
remove it, it's pointless.
Cc: Duncan Sands <duncan.sands@free.fr>
Acked-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/usb/atm/usbatm.c | 8 | ||||
-rw-r--r-- | drivers/usb/atm/usbatm.h | 12 |
2 files changed, 0 insertions, 20 deletions
diff --git a/drivers/usb/atm/usbatm.c b/drivers/usb/atm/usbatm.c index 5e0d33a7da58..c76739c60568 100644 --- a/drivers/usb/atm/usbatm.c +++ b/drivers/usb/atm/usbatm.c | |||
@@ -344,7 +344,6 @@ static void usbatm_extract_one_cell(struct usbatm_data *instance, unsigned char | |||
344 | __func__, sarb->len, vcc); | 344 | __func__, sarb->len, vcc); |
345 | /* discard cells already received */ | 345 | /* discard cells already received */ |
346 | skb_trim(sarb, 0); | 346 | skb_trim(sarb, 0); |
347 | UDSL_ASSERT(instance, sarb->tail + ATM_CELL_PAYLOAD <= sarb->end); | ||
348 | } | 347 | } |
349 | 348 | ||
350 | memcpy(skb_tail_pointer(sarb), source + ATM_CELL_HEADER, ATM_CELL_PAYLOAD); | 349 | memcpy(skb_tail_pointer(sarb), source + ATM_CELL_HEADER, ATM_CELL_PAYLOAD); |
@@ -437,8 +436,6 @@ static void usbatm_extract_cells(struct usbatm_data *instance, | |||
437 | unsigned char *cell_buf = instance->cell_buf; | 436 | unsigned char *cell_buf = instance->cell_buf; |
438 | unsigned int space_left = stride - buf_usage; | 437 | unsigned int space_left = stride - buf_usage; |
439 | 438 | ||
440 | UDSL_ASSERT(instance, buf_usage <= stride); | ||
441 | |||
442 | if (avail_data >= space_left) { | 439 | if (avail_data >= space_left) { |
443 | /* add new data and process cell */ | 440 | /* add new data and process cell */ |
444 | memcpy(cell_buf + buf_usage, source, space_left); | 441 | memcpy(cell_buf + buf_usage, source, space_left); |
@@ -481,7 +478,6 @@ static unsigned int usbatm_write_cells(struct usbatm_data *instance, | |||
481 | 478 | ||
482 | vdbg(&instance->usb_intf->dev, "%s: skb->len=%d, avail_space=%u", | 479 | vdbg(&instance->usb_intf->dev, "%s: skb->len=%d, avail_space=%u", |
483 | __func__, skb->len, avail_space); | 480 | __func__, skb->len, avail_space); |
484 | UDSL_ASSERT(instance, !(avail_space % stride)); | ||
485 | 481 | ||
486 | for (bytes_written = 0; bytes_written < avail_space && ctrl->len; | 482 | for (bytes_written = 0; bytes_written < avail_space && ctrl->len; |
487 | bytes_written += stride, target += stride) { | 483 | bytes_written += stride, target += stride) { |
@@ -553,8 +549,6 @@ static void usbatm_rx_process(unsigned long data) | |||
553 | if (!urb->iso_frame_desc[i].status) { | 549 | if (!urb->iso_frame_desc[i].status) { |
554 | unsigned int actual_length = urb->iso_frame_desc[i].actual_length; | 550 | unsigned int actual_length = urb->iso_frame_desc[i].actual_length; |
555 | 551 | ||
556 | UDSL_ASSERT(instance, actual_length <= packet_size); | ||
557 | |||
558 | if (!merge_length) | 552 | if (!merge_length) |
559 | merge_start = (unsigned char *)urb->transfer_buffer + urb->iso_frame_desc[i].offset; | 553 | merge_start = (unsigned char *)urb->transfer_buffer + urb->iso_frame_desc[i].offset; |
560 | merge_length += actual_length; | 554 | merge_length += actual_length; |
@@ -1176,8 +1170,6 @@ int usbatm_usb_probe(struct usb_interface *intf, const struct usb_device_id *id, | |||
1176 | struct urb *urb; | 1170 | struct urb *urb; |
1177 | unsigned int iso_packets = usb_pipeisoc(channel->endpoint) ? channel->buf_size / channel->packet_size : 0; | 1171 | unsigned int iso_packets = usb_pipeisoc(channel->endpoint) ? channel->buf_size / channel->packet_size : 0; |
1178 | 1172 | ||
1179 | UDSL_ASSERT(instance, !usb_pipeisoc(channel->endpoint) || usb_pipein(channel->endpoint)); | ||
1180 | |||
1181 | urb = usb_alloc_urb(iso_packets, GFP_KERNEL); | 1173 | urb = usb_alloc_urb(iso_packets, GFP_KERNEL); |
1182 | if (!urb) { | 1174 | if (!urb) { |
1183 | dev_err(dev, "%s: no memory for urb %d!\n", __func__, i); | 1175 | dev_err(dev, "%s: no memory for urb %d!\n", __func__, i); |
diff --git a/drivers/usb/atm/usbatm.h b/drivers/usb/atm/usbatm.h index 5fc489405217..a2955b117e88 100644 --- a/drivers/usb/atm/usbatm.h +++ b/drivers/usb/atm/usbatm.h | |||
@@ -39,18 +39,6 @@ | |||
39 | #define VERBOSE_DEBUG | 39 | #define VERBOSE_DEBUG |
40 | */ | 40 | */ |
41 | 41 | ||
42 | #ifdef DEBUG | ||
43 | #define UDSL_ASSERT(instance, x) BUG_ON(!(x)) | ||
44 | #else | ||
45 | #define UDSL_ASSERT(instance, x) \ | ||
46 | do { \ | ||
47 | if (!(x)) \ | ||
48 | dev_warn(&(instance)->usb_intf->dev, \ | ||
49 | "failed assertion '%s' at line %d", \ | ||
50 | __stringify(x), __LINE__); \ | ||
51 | } while (0) | ||
52 | #endif | ||
53 | |||
54 | #define usb_err(instance, format, arg...) \ | 42 | #define usb_err(instance, format, arg...) \ |
55 | dev_err(&(instance)->usb_intf->dev , format , ## arg) | 43 | dev_err(&(instance)->usb_intf->dev , format , ## arg) |
56 | #define usb_info(instance, format, arg...) \ | 44 | #define usb_info(instance, format, arg...) \ |