aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichel Dänzer2017-11-30 11:28:01 -0600
committerMichel Dänzer2017-12-01 09:52:01 -0600
commit85c6b0b00ab894116880d2338776727ccff2d5c3 (patch)
treea4d8d3738b77fb3ab1edc1cf04294671cf97baff /amdgpu/amdgpu_device.c
parentbc21168fa924d3fc4a000492e861f50a1a135b25 (diff)
downloadexternal-libdrm-85c6b0b00ab894116880d2338776727ccff2d5c3.tar.gz
external-libdrm-85c6b0b00ab894116880d2338776727ccff2d5c3.tar.xz
external-libdrm-85c6b0b00ab894116880d2338776727ccff2d5c3.zip
amdgpu: Clean up amdgpu_parse_asic_ids error handling
* Move error message printing into amdgpu_parse_asic_ids and make it return void * Print only "Invalid format" error message if parse_one_line returns -EINVAL * Use strerror instead of printing the (negative) error code in hex Acked-by: Slava Abramov <slava.abramov@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'amdgpu/amdgpu_device.c')
-rw-r--r--amdgpu/amdgpu_device.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/amdgpu/amdgpu_device.c b/amdgpu/amdgpu_device.c
index 344e87ed..e7aaf4fc 100644
--- a/amdgpu/amdgpu_device.c
+++ b/amdgpu/amdgpu_device.c
@@ -280,11 +280,7 @@ int amdgpu_device_initialize(int fd,
280 amdgpu_vamgr_init(&dev->vamgr, start, max, 280 amdgpu_vamgr_init(&dev->vamgr, start, max,
281 dev->dev_info.virtual_address_alignment); 281 dev->dev_info.virtual_address_alignment);
282 282
283 r = amdgpu_parse_asic_ids(&dev->asic_ids); 283 amdgpu_parse_asic_ids(&dev->asic_ids);
284 if (r) {
285 fprintf(stderr, "%s: Cannot parse ASIC IDs, 0x%x.",
286 __func__, r);
287 }
288 284
289 *major_version = dev->major_version; 285 *major_version = dev->major_version;
290 *minor_version = dev->minor_version; 286 *minor_version = dev->minor_version;