mirror of
https://github.com/torvalds/linux.git
synced 2026-04-21 16:23:59 -04:00
drm/amdkfd: Change x==NULL/false references to !x
Upstream prefers the !x notation to x==NULL or x==false. Along those lines change the ==true or !=NULL references as well. Also make the references to !x the same, excluding () for readability. Signed-off-by: Kent Russell <kent.russell@amd.com> Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com> Reviewed-by: Oded Gabbay <oded.gabbay@gmail.com> Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com>
This commit is contained in:
committed by
Oded Gabbay
parent
79775b627d
commit
4eacc26b3b
@@ -76,7 +76,7 @@ int pqm_init(struct process_queue_manager *pqm, struct kfd_process *p)
|
||||
pqm->queue_slot_bitmap =
|
||||
kzalloc(DIV_ROUND_UP(KFD_MAX_NUM_OF_QUEUES_PER_PROCESS,
|
||||
BITS_PER_BYTE), GFP_KERNEL);
|
||||
if (pqm->queue_slot_bitmap == NULL)
|
||||
if (!pqm->queue_slot_bitmap)
|
||||
return -ENOMEM;
|
||||
pqm->process = p;
|
||||
|
||||
@@ -223,7 +223,7 @@ int pqm_create_queue(struct process_queue_manager *pqm,
|
||||
break;
|
||||
case KFD_QUEUE_TYPE_DIQ:
|
||||
kq = kernel_queue_init(dev, KFD_QUEUE_TYPE_DIQ);
|
||||
if (kq == NULL) {
|
||||
if (!kq) {
|
||||
retval = -ENOMEM;
|
||||
goto err_create_queue;
|
||||
}
|
||||
@@ -279,7 +279,7 @@ int pqm_destroy_queue(struct process_queue_manager *pqm, unsigned int qid)
|
||||
retval = 0;
|
||||
|
||||
pqn = get_queue_by_qid(pqm, qid);
|
||||
if (pqn == NULL) {
|
||||
if (!pqn) {
|
||||
pr_err("Queue id does not match any known queue\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user