diff options
author | Kent Russell <kent.russell@amd.com> | 2017-08-16 06:00:06 +0300 |
---|---|---|
committer | Oded Gabbay <oded.gabbay@gmail.com> | 2017-08-16 06:00:06 +0300 |
commit | 4eacc26b3b99c32deed150adff5e38ebce60527c (patch) | |
tree | f4299a1e8208c47a5182d3e80220872a5c07bb30 /drivers/gpu/drm/amd/amdkfd/kfd_device.c | |
parent | 79775b627dc49df06880a32b4340674554c669b9 (diff) | |
download | linux-4eacc26b3b99c32deed150adff5e38ebce60527c.tar.xz |
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>
Diffstat (limited to 'drivers/gpu/drm/amd/amdkfd/kfd_device.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdkfd/kfd_device.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_device.c b/drivers/gpu/drm/amd/amdkfd/kfd_device.c index 87df8bfb9fec..d962342a2e3e 100644 --- a/drivers/gpu/drm/amd/amdkfd/kfd_device.c +++ b/drivers/gpu/drm/amd/amdkfd/kfd_device.c @@ -98,7 +98,7 @@ static const struct kfd_device_info *lookup_device_info(unsigned short did) for (i = 0; i < ARRAY_SIZE(supported_devices); i++) { if (supported_devices[i].did == did) { - BUG_ON(supported_devices[i].device_info == NULL); + BUG_ON(!supported_devices[i].device_info); return supported_devices[i].device_info; } } @@ -212,7 +212,7 @@ static int iommu_invalid_ppr_cb(struct pci_dev *pdev, int pasid, flags); dev = kfd_device_by_pci_dev(pdev); - BUG_ON(dev == NULL); + BUG_ON(!dev); kfd_signal_iommu_event(dev, pasid, address, flags & PPR_FAULT_WRITE, flags & PPR_FAULT_EXEC); @@ -262,7 +262,7 @@ bool kgd2kfd_device_init(struct kfd_dev *kfd, kfd_doorbell_init(kfd); - if (kfd_topology_add_device(kfd) != 0) { + if (kfd_topology_add_device(kfd)) { dev_err(kfd_device, "Error adding device to topology\n"); goto kfd_topology_add_device_error; } @@ -288,7 +288,7 @@ bool kgd2kfd_device_init(struct kfd_dev *kfd, goto device_queue_manager_error; } - if (kfd->dqm->ops.start(kfd->dqm) != 0) { + if (kfd->dqm->ops.start(kfd->dqm)) { dev_err(kfd_device, "Error starting queue manager for device %x:%x\n", kfd->pdev->vendor, kfd->pdev->device); @@ -341,7 +341,7 @@ void kgd2kfd_device_exit(struct kfd_dev *kfd) void kgd2kfd_suspend(struct kfd_dev *kfd) { - BUG_ON(kfd == NULL); + BUG_ON(!kfd); if (kfd->init_complete) { kfd->dqm->ops.stop(kfd->dqm); |