]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
drm/amd/display: add macros to simplify code
authorWenjing Liu <wenjing.liu@amd.com>
Thu, 6 Nov 2025 05:49:18 +0000 (13:49 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 12 Nov 2025 02:53:26 +0000 (21:53 -0500)
commit815e260a18a3af4dab59025ee99a7156c0e8b5e0
tree55dc050afd9271d74e44cfb0b197110af06929a6
parentc154a96b550b66bdf032216cab613269cb91e79e
drm/amd/display: add macros to simplify code

[Why & How]
Adding macros to simplify the process of adding new error codes.
Currently, to add an error code, the developer needs to add both the
enum and the string translation. This is error prone and can lead to
inconsistencies. The refactor adds a macro to automatically add the
string translation based on the enum.

Reviewed-by: Aric Cyr <aric.cyr@amd.com>
Signed-off-by: Wenjing Liu <wenjing.liu@amd.com>
Signed-off-by: Ray Wu <ray.wu@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/modules/hdcp/hdcp_log.c
drivers/gpu/drm/amd/display/modules/inc/mod_hdcp.h