list_for_each_prev(list_item, &mad_agent_priv->wait_list) { temp_mad_send_wr = list_entry(list_item, struct ib_mad_send_wr_private, agent_list); if (time_after(mad_send_wr->timeout, temp_mad_send_wr->timeout)) break; 
if (delay) { list_for_each_prev(list_item, &mad_agent_priv->wait_list) { temp_mad_send_wr = list_entry(list_item, struct ib_mad_send_wr_private, agent_list); if (time_after(mad_send_wr->timeout, temp_mad_send_wr->timeout)) break; } 
static void wait_for_response(struct ib_mad_send_wr_private *mad_send_wr){	struct ib_mad_agent_private *mad_agent_priv;	struct ib_mad_send_wr_private *temp_mad_send_wr;	struct list_head *list_item;	unsigned long delay;	mad_agent_priv = mad_send_wr->mad_agent_priv;	list_del(&mad_send_wr->agent_list);	delay = mad_send_wr->timeout;	mad_send_wr->timeout += jiffies;	list_for_each_prev(list_item, &mad_agent_priv->wait_list) {		temp_mad_send_wr = list_entry(list_item,					      struct ib_mad_send_wr_private,					      agent_list);		if (time_after(mad_send_wr->timeout,			       temp_mad_send_wr->timeout))			break;	}	list_add(&mad_send_wr->agent_list, list_item);	/* Reschedule a work item if we have a shorter timeout */	if (mad_agent_priv->wait_list.next == &mad_send_wr->agent_list) {		cancel_delayed_work(&mad_agent_priv->timed_work);		queue_delayed_work(mad_agent_priv->qp_info->port_priv->wq,				   &mad_agent_priv->timed_work, delay);	}}
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/29bb33dd87dbe8db07c2b19df3fb453d999c96de/mad.c/buggy/drivers/infiniband/core/mad.c