do_packet_read(char *data, struct list_head *ptemp_list, 
static int do_packet_read(char *data, struct list_head *ptemp_list, 
do_packet_read(char *data, struct list_head *ptemp_list,	int length, int bytes_read, int *list_read_count){	void *ptemp_buf;	struct packet_data *newpacket = NULL;	int bytes_copied = 0;	int j = 0;	newpacket = list_entry(ptemp_list, struct packet_data, list);	*list_read_count += newpacket->length;	if (*list_read_count > bytes_read) {		/* point to the start of unread data */		j = newpacket->length - (*list_read_count - bytes_read);		/* point to the offset in the packet buffer */		ptemp_buf = (u8 *) newpacket->data + j;		/*		 * check if there is enough room in		 * * the incoming buffer		 */		if (length > (*list_read_count - bytes_read))			/*			 * copy what ever is there in this			 * packet and move on			 */			bytes_copied = (*list_read_count - bytes_read);		else			/* copy the remaining */			bytes_copied = length;		memcpy(data, ptemp_buf, bytes_copied);	}	return bytes_copied;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/dda8577fb5a00507e5aea737833190a10516b257/dell_rbu.c/buggy/drivers/firmware/dell_rbu.c