cmnd_done(cmnd, result);
cmnd->result = result; if (device->dt->complete_uspace_cmnd) device->dt->complete_uspace_cmnd(cmnd); cmnd_done(cmnd);
static void uspace_cmnd_done(struct tgt_cmnd *cmnd, void *data,			     int result, uint32_t len){	char *p = data;	int i;	BUG_ON(!cmnd->done);	dprintk("cid %llu result %d len %d\n",		cmnd->cid, result, len);	if (len) {		cmnd->bufflen = len;		cmnd->offset = 0;		__tgt_alloc_buffer(cmnd);		for (i = 0; i < cmnd->sg_count; i++) {			uint32_t copy = min_t(uint32_t, len, PAGE_CACHE_SIZE);			memcpy(page_address(cmnd->sg[i].page), p, copy);			p += copy;			len -= copy;		}	}	cmnd_done(cmnd, result);}