amdgpu: Don't print error message if parse_one_line returned -EAGAIN
authorMichel Dänzer <michel.daenzer@amd.com>
Mon, 8 Jan 2018 10:20:25 +0000 (11:20 +0100)
committerMichel Dänzer <michel@daenzer.net>
Mon, 15 Jan 2018 09:01:39 +0000 (10:01 +0100)
It means it just didn't find an entry for the GPU in the amdgpu.ids file.

Fixes spurious

 amdgpu_parse_asic_ids: Cannot parse ASIC IDs: Resource temporarily unavailable

error messages in that case.

Reported-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
amdgpu/amdgpu_asic_id.c

index 0c8925e..62459c0 100644 (file)
@@ -155,7 +155,7 @@ void amdgpu_parse_asic_ids(struct amdgpu_device *dev)
        if (r == -EINVAL) {
                fprintf(stderr, "Invalid format: %s: line %d: %s\n",
                        AMDGPU_ASIC_ID_TABLE, line_num, line);
-       } else if (r) {
+       } else if (r && r != -EAGAIN) {
                fprintf(stderr, "%s: Cannot parse ASIC IDs: %s\n",
                        __func__, strerror(-r));
        }