CC: kbuild-...@lists.01.org CC: linux-ker...@vger.kernel.org TO: Denis Efremov <efre...@linux.com> CC: Julia Lawall <julia.law...@inria.fr> CC: Jaroslav Kysela <pe...@perex.cz> CC: Takashi Iwai <ti...@suse.com> CC: Ranjani Sridharan <ranjani.sridha...@linux.intel.com> CC: "Pierre-Louis Bossart" <pierre-louis.boss...@linux.intel.com> CC: alsa-de...@alsa-project.org CC: linux-ker...@vger.kernel.org
From: kernel test robot <l...@intel.com> sound/pci/hda/hda_codec.c:337:19-20: WARNING opportunity for min() Check for opencoded min(), max() implementations. Generated patches sometimes require adding a cast to fix compile warning. Warnings/patches scope intentionally limited to a function body. Generated by: scripts/coccinelle/misc/minmax.cocci CC: Denis Efremov <efre...@linux.com> Reported-by: kernel test robot <l...@intel.com> Signed-off-by: kernel test robot <l...@intel.com> --- tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master head: f4bc5bbb5fef3cf421ba3485d6d383c27ec473ed commit: 5f66f73b9ff4dcabd4e2405ba9c32e80e02f9408 coccinelle: misc: add minmax script :::::: branch date: 7 hours ago :::::: commit date: 9 months ago Please take the patch only if it's a positive warning. Thanks! hda_codec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/sound/pci/hda/hda_codec.c +++ b/sound/pci/hda/hda_codec.c @@ -334,7 +334,7 @@ int snd_hda_get_devices(struct hda_codec return 0; dev_len = parm + 1; - dev_len = dev_len < max_devices ? dev_len : max_devices; + dev_len = min(dev_len, max_devices); devices = 0; while (devices < dev_len) { _______________________________________________ kbuild mailing list -- kbuild@lists.01.org To unsubscribe send an email to kbuild-le...@lists.01.org