Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/amdkfd: Pass 'struct queue_propertices' by reference

Allow init_queue() to take 'struct queue_properties' by reference.

Signed-off-by: Edward O'Callaghan <funfunctor@folklore1984.net>
Reviewed-by: Oded Gabbay <oded.gabbay@gmail.com>
Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com>

authored by

Edward O'Callaghan and committed by
Oded Gabbay
e88a614c 6f4d92a1

+5 -5
+1 -1
drivers/gpu/drm/amd/amdkfd/kfd_kernel_queue.c
··· 124 124 prop.eop_ring_buffer_address = kq->eop_gpu_addr; 125 125 prop.eop_ring_buffer_size = PAGE_SIZE; 126 126 127 - if (init_queue(&kq->queue, prop) != 0) 127 + if (init_queue(&kq->queue, &prop) != 0) 128 128 goto err_init_queue; 129 129 130 130 kq->queue->device = dev;
+1 -1
drivers/gpu/drm/amd/amdkfd/kfd_priv.h
··· 619 619 /* Queue Context Management */ 620 620 struct cik_sdma_rlc_registers *get_sdma_mqd(void *mqd); 621 621 622 - int init_queue(struct queue **q, struct queue_properties properties); 622 + int init_queue(struct queue **q, const struct queue_properties *properties); 623 623 void uninit_queue(struct queue *q); 624 624 void print_queue_properties(struct queue_properties *q); 625 625 void print_queue(struct queue *q);
+1 -1
drivers/gpu/drm/amd/amdkfd/kfd_process_queue_manager.c
··· 129 129 q_properties->vmid = 0; 130 130 q_properties->queue_id = qid; 131 131 132 - retval = init_queue(q, *q_properties); 132 + retval = init_queue(q, q_properties); 133 133 if (retval != 0) 134 134 goto err_init_queue; 135 135
+2 -2
drivers/gpu/drm/amd/amdkfd/kfd_queue.c
··· 63 63 pr_debug("Queue Device Address: 0x%p\n", q->device); 64 64 } 65 65 66 - int init_queue(struct queue **q, struct queue_properties properties) 66 + int init_queue(struct queue **q, const struct queue_properties *properties) 67 67 { 68 68 struct queue *tmp; 69 69 ··· 73 73 if (!tmp) 74 74 return -ENOMEM; 75 75 76 - memcpy(&tmp->properties, &properties, sizeof(struct queue_properties)); 76 + memcpy(&tmp->properties, properties, sizeof(struct queue_properties)); 77 77 78 78 *q = tmp; 79 79 return 0;