[PATCH 12/37] drm/amdkfd: Coding style cleanup

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Kent Russell <kent.russell@xxxxxxx>

Minor cleanup that was missed previously because code moved around.

Signed-off-by: Kent Russell <kent.russell at amd.com>
Signed-off-by: Felix Kuehling <Felix.Kuehling at amd.com>
---
 drivers/gpu/drm/amd/amdkfd/kfd_crat.c     | 12 ++++++------
 drivers/gpu/drm/amd/amdkfd/kfd_crat.h     |  2 +-
 drivers/gpu/drm/amd/amdkfd/kfd_topology.c |  2 +-
 3 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_crat.c b/drivers/gpu/drm/amd/amdkfd/kfd_crat.c
index 1e331be..f2dda60 100644
--- a/drivers/gpu/drm/amd/amdkfd/kfd_crat.c
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_crat.c
@@ -91,11 +91,11 @@ static int kfd_parse_subtype_mem(struct crat_subtype_memory *mem)
 	int i = 0;
 
 	pr_info("Found memory entry in CRAT table with proximity_domain=%d\n",
-			mem->promixity_domain);
+			mem->proximity_domain);
 	list_for_each_entry(dev, &topology_device_list, list) {
-		if (mem->promixity_domain == i) {
+		if (mem->proximity_domain == i) {
 			props = kfd_alloc_struct(props);
-			if (props == NULL)
+			if (!props)
 				return -ENOMEM;
 
 			if (dev->node_props.cpu_cores_count == 0)
@@ -141,7 +141,7 @@ static int kfd_parse_subtype_cache(struct crat_subtype_cache *cache)
 		if (id == dev->node_props.cpu_core_id_base ||
 		    id == dev->node_props.simd_id_base) {
 			props = kfd_alloc_struct(props);
-			if (props == NULL)
+			if (!props)
 				return -ENOMEM;
 
 			props->processor_id_low = id;
@@ -190,7 +190,7 @@ static int kfd_parse_subtype_iolink(struct crat_subtype_iolink *iolink)
 	list_for_each_entry(dev, &topology_device_list, list) {
 		if (id_from == i) {
 			props = kfd_alloc_struct(props);
-			if (props == NULL)
+			if (!props)
 				return -ENOMEM;
 
 			props->node_from = id_from;
@@ -260,7 +260,7 @@ static int kfd_parse_subtype(struct crat_subtype_generic *sub_type_hdr)
 		ret = kfd_parse_subtype_iolink(iolink);
 		break;
 	default:
-		pr_warn("Unknown subtype (%d) in CRAT\n",
+		pr_warn("Unknown subtype %d in CRAT\n",
 				sub_type_hdr->type);
 	}
 
diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_crat.h b/drivers/gpu/drm/amd/amdkfd/kfd_crat.h
index 15371cb..920697b 100644
--- a/drivers/gpu/drm/amd/amdkfd/kfd_crat.h
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_crat.h
@@ -127,7 +127,7 @@ struct crat_subtype_memory {
 	uint8_t		length;
 	uint16_t	reserved;
 	uint32_t	flags;
-	uint32_t	promixity_domain;
+	uint32_t	proximity_domain;
 	uint32_t	base_addr_low;
 	uint32_t	base_addr_high;
 	uint32_t	length_low;
diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_topology.c b/drivers/gpu/drm/amd/amdkfd/kfd_topology.c
index 2b3fe95..b6cf785 100644
--- a/drivers/gpu/drm/amd/amdkfd/kfd_topology.c
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_topology.c
@@ -895,7 +895,7 @@ int kfd_topology_remove_device(struct kfd_dev *gpu)
 
 	up_write(&topology_lock);
 
-	if (res == 0)
+	if (!res)
 		kfd_notify_gpu_change(gpu_id, 0);
 
 	return res;
-- 
2.7.4



[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux