Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/amdkfd: avoid CONFIG_ prefix for non-Kconfig symbols

The CONFIG_ prefix is reserved for Kconfig options in Make and CPP
syntax. Various static analysis tools rely on this naming convention
and check if CONFIG_ prefixed symbols are defined Kconfig. Hence add
yet another prefix AMD_ to CONFIG_REG_{BASE,END,SISE} to apply to this
convention and make static analysis tools happy.

Signed-off-by: Valentin Rothberg <valentinrothberg@gmail.com>
Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com>

authored by

Valentin Rothberg and committed by
Oded Gabbay
f4e04022 ae455773

+8 -8
+5 -5
drivers/gpu/drm/amd/amdkfd/kfd_dbgdev.c
··· 445 445 aw_reg_add_dword /= sizeof(uint32_t); 446 446 447 447 packets_vec[0].bitfields2.reg_offset = 448 - aw_reg_add_dword - CONFIG_REG_BASE; 448 + aw_reg_add_dword - AMD_CONFIG_REG_BASE; 449 449 450 450 packets_vec[0].reg_data[0] = cntl.u32All; 451 451 ··· 458 458 aw_reg_add_dword /= sizeof(uint32_t); 459 459 460 460 packets_vec[1].bitfields2.reg_offset = 461 - aw_reg_add_dword - CONFIG_REG_BASE; 461 + aw_reg_add_dword - AMD_CONFIG_REG_BASE; 462 462 packets_vec[1].reg_data[0] = addrHi.u32All; 463 463 464 464 aw_reg_add_dword = ··· 470 470 aw_reg_add_dword /= sizeof(uint32_t); 471 471 472 472 packets_vec[2].bitfields2.reg_offset = 473 - aw_reg_add_dword - CONFIG_REG_BASE; 473 + aw_reg_add_dword - AMD_CONFIG_REG_BASE; 474 474 packets_vec[2].reg_data[0] = addrLo.u32All; 475 475 476 476 /* enable watch flag if address is not zero*/ ··· 488 488 aw_reg_add_dword /= sizeof(uint32_t); 489 489 490 490 packets_vec[3].bitfields2.reg_offset = 491 - aw_reg_add_dword - CONFIG_REG_BASE; 491 + aw_reg_add_dword - AMD_CONFIG_REG_BASE; 492 492 packets_vec[3].reg_data[0] = cntl.u32All; 493 493 494 494 status = dbgdev_diq_submit_ib( ··· 690 690 packets_vec[1].header.opcode = IT_SET_CONFIG_REG; 691 691 packets_vec[1].header.type = PM4_TYPE_3; 692 692 packets_vec[1].bitfields2.reg_offset = SQ_CMD / (sizeof(uint32_t)) - 693 - CONFIG_REG_BASE; 693 + AMD_CONFIG_REG_BASE; 694 694 695 695 packets_vec[1].bitfields2.vmid_shift = SQ_CMD_VMID_OFFSET; 696 696 packets_vec[1].bitfields2.insert_vmid = 1;
+3 -3
drivers/gpu/drm/amd/amdkfd/kfd_dbgdev.h
··· 48 48 49 49 /* CONFIG reg space definition */ 50 50 enum { 51 - CONFIG_REG_BASE = 0x2000, /* in dwords */ 52 - CONFIG_REG_END = 0x2B00, 53 - CONFIG_REG_SIZE = CONFIG_REG_END - CONFIG_REG_BASE 51 + AMD_CONFIG_REG_BASE = 0x2000, /* in dwords */ 52 + AMD_CONFIG_REG_END = 0x2B00, 53 + AMD_CONFIG_REG_SIZE = AMD_CONFIG_REG_END - AMD_CONFIG_REG_BASE 54 54 }; 55 55 56 56 /* SH reg space definition */