OSDN Git Service

drm/amdgpu/atomfirmware: Clean up errors in amdgpu_atomfirmware.c
authorRan Sun <sunran001@208suo.com>
Wed, 2 Aug 2023 06:51:27 +0000 (06:51 +0000)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 9 Aug 2023 13:43:23 +0000 (09:43 -0400)
Fix the following errors reported by checkpatch:

ERROR: spaces required around that '>=' (ctx:WxV)
ERROR: spaces required around that '!=' (ctx:WxV)
ERROR: code indent should use tabs where possible

Signed-off-by: Ran Sun <sunran001@208suo.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_atomfirmware.c

index 0b7f4c4..835980e 100644 (file)
@@ -58,7 +58,7 @@ uint32_t amdgpu_atomfirmware_query_firmware_capability(struct amdgpu_device *ade
        if (amdgpu_atom_parse_data_header(adev->mode_info.atom_context,
                                index, &size, &frev, &crev, &data_offset)) {
                /* support firmware_info 3.1 + */
-               if ((frev == 3 && crev >=1) || (frev > 3)) {
+               if ((frev == 3 && crev >= 1) || (frev > 3)) {
                        firmware_info = (union firmware_info *)
                                (mode_info->atom_context->bios + data_offset);
                        fw_cap = le32_to_cpu(firmware_info->v31.firmware_capability);
@@ -597,7 +597,7 @@ bool amdgpu_atomfirmware_ras_rom_addr(struct amdgpu_device *adev,
                                          index, &size, &frev, &crev,
                                          &data_offset)) {
                /* support firmware_info 3.4 + */
-               if ((frev == 3 && crev >=4) || (frev > 3)) {
+               if ((frev == 3 && crev >= 4) || (frev > 3)) {
                        firmware_info = (union firmware_info *)
                                (mode_info->atom_context->bios + data_offset);
                        /* The ras_rom_i2c_slave_addr should ideally
@@ -850,7 +850,7 @@ int amdgpu_atomfirmware_get_fw_reserved_fb_size(struct amdgpu_device *adev)
 
        firmware_info = (union firmware_info *)(ctx->bios + data_offset);
 
-       if (frev !=3)
+       if (frev != 3)
                return -EINVAL;
 
        switch (crev) {
@@ -909,7 +909,7 @@ int amdgpu_atomfirmware_asic_init(struct amdgpu_device *adev, bool fb_reset)
        }
 
        index = get_index_into_master_table(atom_master_list_of_command_functions_v2_1,
-                                            asic_init);
+                                       asic_init);
        if (amdgpu_atom_parse_cmd_header(mode_info->atom_context, index, &frev, &crev)) {
                if (frev == 2 && crev >= 1) {
                        memset(&asic_init_ps_v2_1, 0, sizeof(asic_init_ps_v2_1));