]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
ASoC: SOF: ipc3: Use str_enabled_disabled() helper function
authorThorsten Blum <thorsten.blum@linux.dev>
Mon, 10 Feb 2025 22:44:54 +0000 (23:44 +0100)
committerMark Brown <broonie@kernel.org>
Mon, 17 Feb 2025 12:09:40 +0000 (12:09 +0000)
Remove hard-coded strings by using the str_enabled_disabled() helper
function. Remove unnecessary curly braces.

Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
Link: https://patch.msgid.link/20250210224453.363638-2-thorsten.blum@linux.dev
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/sof/ipc3.c

index 7de5e3d285e73dcbf258060e57d26c27cbe40e43..4a194a705ace66ae9aacddb7a940fa3752415f99 100644 (file)
@@ -801,20 +801,16 @@ int sof_ipc3_validate_fw_version(struct snd_sof_dev *sdev)
                return -EINVAL;
        }
 
-       if (ready->flags & SOF_IPC_INFO_BUILD) {
+       if (ready->flags & SOF_IPC_INFO_BUILD)
                dev_info(sdev->dev,
                         "Firmware debug build %d on %s-%s - options:\n"
                         " GDB: %s\n"
                         " lock debug: %s\n"
                         " lock vdebug: %s\n",
                         v->build, v->date, v->time,
-                        (ready->flags & SOF_IPC_INFO_GDB) ?
-                               "enabled" : "disabled",
-                        (ready->flags & SOF_IPC_INFO_LOCKS) ?
-                               "enabled" : "disabled",
-                        (ready->flags & SOF_IPC_INFO_LOCKSV) ?
-                               "enabled" : "disabled");
-       }
+                        str_enabled_disabled(ready->flags & SOF_IPC_INFO_GDB),
+                        str_enabled_disabled(ready->flags & SOF_IPC_INFO_LOCKS),
+                        str_enabled_disabled(ready->flags & SOF_IPC_INFO_LOCKSV));
 
        /* copy the fw_version into debugfs at first boot */
        memcpy(&sdev->fw_version, v, sizeof(*v));