if (len >= DATA_MAX) len = DATA_MAX; 
/* * The check to see if it's safe to poke at data has an enormous * number of corner cases, but it seems that the following is * more or less safe. * * We do not even try to look transfer_buffer, because it can * contain non-NULL garbage in case the upper level promised to * set DMA for the HCD. */ if (urb->transfer_flags & URB_NO_TRANSFER_DMA_MAP) return mon_dmapeek(ep->data, urb->transfer_dma, len);  if (urb->transfer_buffer == NULL) return 'Z';	/* '0' would be not as pretty. */  
static inline char mon_text_get_data(struct mon_event_text *ep, struct urb *urb,    int len, char ev_type){	int pipe = urb->pipe;	unsigned char *data;	/*	 * The check to see if it's safe to poke at data has an enormous	 * number of corner cases, but it seems that the following is	 * more or less safe.	 *	 * We do not even try to look transfer_buffer, because it can	 * contain non-NULL garbage in case the upper level promised to	 * set DMA for the HCD.	 */	if (urb->transfer_flags & URB_NO_TRANSFER_DMA_MAP)		return 'D';	if (len <= 0)		return 'L';	if ((data = urb->transfer_buffer) == NULL)		return 'Z';	/* '0' would be not as pretty. */	/*	 * Bulk is easy to shortcut reliably. 	 * XXX Other pipe types need consideration. Currently, we overdo it	 * and collect garbage for them: better more than less.	 */	if (usb_pipebulk(pipe) || usb_pipecontrol(pipe)) {		if (usb_pipein(pipe)) {			if (ev_type == 'S')				return '<';		} else {			if (ev_type == 'C')				return '>';		}	}	if (len >= DATA_MAX)		len = DATA_MAX;	memcpy(ep->data, urb->transfer_buffer, len);	return 0;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/0256839619d9b1e933cafc83e7f0deaad4216465/mon_text.c/buggy/drivers/usb/mon/mon_text.c