]> git.alsa-project.org Git - alsa-utils.git/commitdiff
Topology: NHLT: Intel: Fix compile warning in dmic-process.c
authorSeppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
Tue, 18 Jun 2024 12:47:05 +0000 (15:47 +0300)
committerJaroslav Kysela <perex@perex.cz>
Fri, 21 Jun 2024 14:04:23 +0000 (16:04 +0200)
This patch fixes warnings like:

intel/dmic/dmic-process.c: In function 'select_mode':
intel/dmic/dmic-process.c:498:35: warning:
format '%s' expects a matching 'char *' argument [-Wformat=]

The intended __func__ string is missing from the two fprintf()
prints for errors.

Closes: https://github.com/alsa-project/alsa-utils/pull/270
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
topology/nhlt/intel/dmic/dmic-process.c

index 15b8c10759b7f22474e27c7b0175c59f952ea4bc..adbec79be219b0e03196048be1a4ac22a4833990 100644 (file)
@@ -495,7 +495,7 @@ static int select_mode(struct intel_dmic_params *dmic, struct dmic_calc_configur
        g_cic = mcic * mcic * mcic * mcic * mcic;
        if (g_cic < 0) {
                /* Erroneous decimation factor and CIC gain */
-               fprintf(stderr, "%s: erroneous decimation factor and CIC gain\n");
+               fprintf(stderr, "%s: erroneous decimation factor and CIC gain\n", __func__);
                return -EINVAL;
        }
 
@@ -520,7 +520,7 @@ static int select_mode(struct intel_dmic_params *dmic, struct dmic_calc_configur
                                     cfg->fir_a->length, gain_to_fir);
                if (ret < 0) {
                        /* Invalid coefficient set found, should not happen. */
-                       fprintf(stderr, "%s: invalid coefficient set found\n");
+                       fprintf(stderr, "%s: invalid coefficient set found\n", __func__);
                        return -EINVAL;
                }
        } else {