drm/amd/display: Use str_enable_disable() helper
Subsystems (3)
PATCH 1/1 drm/amd/display: Use str_enable_disable() helper
Replace the open-coded enable ? "enable" : "disable" ternary with the str_enable_disable() helper from <linux/string_choices.h>.
Found by scripts/coccinelle/api/string_choices.cocci.
Signed-off-by Baran Tuna <[email protected]>
---
Compile-tested only.
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +2 -1
@@ -85,6 +85,7 @@#include <linux/firmware.h> #include <linux/component.h> #include <linux/sort.h> +#include <linux/string_choices.h> #include <drm/drm_privacy_screen_consumer.h> #include <drm/display/drm_dp_mst_helper.h>
@@ -1468,7 +1469,7 @@ STATIC_IFN_KUNIT void dm_gpureset_toggle_interrupts(struct amdgpu_device *adev, rc =amdgpu_dm_irq_set (adev, irq_source, enable) ?0 : -EBUSY ;if (rc)drm_warn (adev_to_drm (adev),"Failed to %s pflip interrupts\n" , - enable ?"enable" :"disable" ); +str_enable_disable (enable));if (dc_supports_vrr (adev->dm.dc->ctx->dce_version)) {if (enable) {
base-commit: 25faec9ce61c01fb45abf812a222c5b43c3cd5c5
Signature · 1 line
2.53.0