int write = sreq->sr_data_direction == DMA_TO_DEVICE; 
int write = (sreq->sr_data_direction == DMA_TO_DEVICE); 
void scsi_wait_req(struct scsi_request *sreq, const void *cmnd, void *buffer,		   unsigned bufflen, int timeout, int retries){	DECLARE_COMPLETION(wait);	int write = sreq->sr_data_direction == DMA_TO_DEVICE;	struct request *req;	req = blk_get_request(sreq->sr_device->request_queue, write,			      __GFP_WAIT);	if (bufflen && blk_rq_map_kern(sreq->sr_device->request_queue, req,				       buffer, bufflen, __GFP_WAIT)) {		sreq->sr_result = DRIVER_ERROR << 24;		blk_put_request(req);		return;	}	req->flags |= REQ_NOMERGE;	req->waiting = &wait;	req->end_io = scsi_wait_req_end_io;	req->cmd_len = COMMAND_SIZE(((u8 *)cmnd)[0]);	req->sense = sreq->sr_sense_buffer;	req->sense_len = 0;	memcpy(req->cmd, cmnd, req->cmd_len);	req->timeout = timeout;	req->flags |= REQ_BLOCK_PC;	req->rq_disk = NULL;	blk_insert_request(sreq->sr_device->request_queue, req,			   sreq->sr_data_direction == DMA_TO_DEVICE, NULL);	wait_for_completion(&wait);	sreq->sr_request->waiting = NULL;	sreq->sr_result = req->errors;	if (req->errors)		sreq->sr_result |= (DRIVER_ERROR << 24);	blk_put_request(req);}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/392160335c798bbe94ab3aae6ea0c85d32b81bbc/scsi_lib.c/clean/drivers/scsi/scsi_lib.c