CC: [email protected]
BCC: [email protected]
CC: [email protected]
TO: Denis Efremov <[email protected]>
CC: Julia Lawall <[email protected]>
CC: Jaroslav Kysela <[email protected]>
CC: Takashi Iwai <[email protected]>
CC: Ranjani Sridharan <[email protected]>
CC: [email protected]
CC: [email protected]

From: kernel test robot <[email protected]>

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 <[email protected]>
Reported-by: kernel test robot <[email protected]>
Signed-off-by: kernel test robot <[email protected]>
---

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 
master
head:   88e6c0207623874922712e162e25d9dafd39661e
commit: 5f66f73b9ff4dcabd4e2405ba9c32e80e02f9408 coccinelle: misc: add minmax 
script
:::::: branch date: 3 hours ago
:::::: commit date: 11 months ago

Please take the patch only if it's a positive warning. Thanks!

 sound/pci/hda/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 -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to