]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
drm/tegra: sor: use str_plural in tegra_sor_dp_link_configure
authorThorsten Blum <thorsten.blum@linux.dev>
Thu, 21 May 2026 19:47:00 +0000 (21:47 +0200)
committerThierry Reding <treding@nvidia.com>
Thu, 28 May 2026 15:19:27 +0000 (17:19 +0200)
Replace the manual ternary "s" pluralization with str_plural() to
simplify the code.

Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Link: https://patch.msgid.link/20260521194658.366737-4-thorsten.blum@linux.dev
drivers/gpu/drm/tegra/sor.c

index de8b2dfc4984c4534b723ebf043f2eb0f277157a..93e5ffd4f206bd116f7b578b63204bc992bcad0b 100644 (file)
@@ -13,6 +13,7 @@
 #include <linux/pm_runtime.h>
 #include <linux/regulator/consumer.h>
 #include <linux/reset.h>
+#include <linux/string_choices.h>
 
 #include <soc/tegra/pmc.h>
 
@@ -940,7 +941,7 @@ static int tegra_sor_dp_link_configure(struct drm_dp_link *link)
        err = tegra_sor_power_up_lanes(sor, lanes);
        if (err < 0) {
                dev_err(sor->dev, "failed to power up %u lane%s: %d\n",
-                       lanes, (lanes != 1) ? "s" : "", err);
+                       lanes, str_plural(lanes), err);
                return err;
        }