Hi Daniel,
I love your patch! Perhaps something to improve:
[auto build test WARNING on sound/for-next] [also build test WARNING on asoc/for-next v5.4 next-20191208] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system. BTW, we also suggest to use '--base' option to specify the base tree in git format-patch, please see https://stackoverflow.com/a/37406982]
url: https://github.com/0day-ci/linux/commits/Daniel-Mack/ALSA-core-add-snd_pcm_f... base: https://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound.git for-next reproduce: # apt-get install sparse # sparse version: v0.6.1-91-g817270f-dirty make ARCH=x86_64 allmodconfig make C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__'
If you fix the issue, kindly add following tag Reported-by: kbuild test robot lkp@intel.com
sparse warnings: (new ones prefixed by >>)
sound/soc/generic/simple-card-utils.c:79:49: sparse: sparse: restricted snd_pcm_format_t degrades to integer
vim +79 sound/soc/generic/simple-card-utils.c
54 55 void asoc_simple_parse_c2c_params(struct device *dev, 56 struct device_node *np, 57 char *prefix, 58 struct snd_soc_pcm_stream *dest) 59 { 60 unsigned int rate, channels; 61 const char *format_string; 62 snd_pcm_format_t format; 63 char prop[128]; 64 int ret; 65 66 if (!prefix) 67 prefix = ""; 68 69 snprintf(prop, sizeof(prop), "%s%s", prefix, "codec-to-codec-rate"); 70 of_property_read_u32(np, prop, &rate); 71 72 snprintf(prop, sizeof(prop), "%s%s", prefix, "codec-to-codec-channels"); 73 of_property_read_u32(np, prop, &channels); 74 75 snprintf(prop, sizeof(prop), "%s%s", prefix, "codec-to-codec-format"); 76 if (!of_property_read_string(np, prop, &format_string)) { 77 ret = snd_pcm_format_by_name(format_string, &format); 78 if (ret == 0) {
79 dest->formats = 1ULL << format;
80 dest->channels_min = dest->channels_max = channels; 81 dest->rate_min = dest->rate_max = rate; 82 } else { 83 dev_err(dev, "unknown dai format %s\n", format_string); 84 } 85 } 86 } 87 EXPORT_SYMBOL_GPL(asoc_simple_parse_c2c_params); 88
--- 0-DAY kernel test infrastructure Open Source Technology Center https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org Intel Corporation