lkml.org 
[lkml]   [2019]   [Sep]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] x86_64: new and improved memset()
Hi Alexey,

I love your patch! Perhaps something to improve:

[auto build test WARNING on linus/master]
[cannot apply to v5.3 next-20190915]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url: https://github.com/0day-ci/linux/commits/Alexey-Dobriyan/x86_64-new-and-improved-memset/20190916-140315
config: x86_64-fedora-25 (attached as .config)
compiler: gcc-7 (Debian 7.4.0-11) 7.4.0
reproduce:
# save the attached .config to linux build tree
make ARCH=x86_64

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@intel.com>

Note: it may well be a FALSE warning. FWIW you are at least aware of it now.
http://gcc.gnu.org/wiki/Better_Uninitialized_Warnings

All warnings (new ones prefixed by >>):

sound/core/pcm_iec958.c: In function 'create_iec958_consumer':
>> sound/core/pcm_iec958.c:77:9: warning: 'ws' may be used uninitialized in this function [-Wmaybe-uninitialized]
cs[4] = ws;
~~~~~~^~~~

vim +/ws +77 sound/core/pcm_iec958.c

9203dd016a5d8f Russell King 2015-05-09 11
4a4436573a6669 Jyri Sarha 2016-03-31 12 static int create_iec958_consumer(uint rate, uint sample_width,
4a4436573a6669 Jyri Sarha 2016-03-31 13 u8 *cs, size_t len)
9203dd016a5d8f Russell King 2015-05-09 14 {
9203dd016a5d8f Russell King 2015-05-09 15 unsigned int fs, ws;
9203dd016a5d8f Russell King 2015-05-09 16
9203dd016a5d8f Russell King 2015-05-09 17 if (len < 4)
9203dd016a5d8f Russell King 2015-05-09 18 return -EINVAL;
9203dd016a5d8f Russell King 2015-05-09 19
4a4436573a6669 Jyri Sarha 2016-03-31 20 switch (rate) {
9203dd016a5d8f Russell King 2015-05-09 21 case 32000:
9203dd016a5d8f Russell King 2015-05-09 22 fs = IEC958_AES3_CON_FS_32000;
9203dd016a5d8f Russell King 2015-05-09 23 break;
9203dd016a5d8f Russell King 2015-05-09 24 case 44100:
9203dd016a5d8f Russell King 2015-05-09 25 fs = IEC958_AES3_CON_FS_44100;
9203dd016a5d8f Russell King 2015-05-09 26 break;
9203dd016a5d8f Russell King 2015-05-09 27 case 48000:
9203dd016a5d8f Russell King 2015-05-09 28 fs = IEC958_AES3_CON_FS_48000;
9203dd016a5d8f Russell King 2015-05-09 29 break;
9203dd016a5d8f Russell King 2015-05-09 30 case 88200:
9203dd016a5d8f Russell King 2015-05-09 31 fs = IEC958_AES3_CON_FS_88200;
9203dd016a5d8f Russell King 2015-05-09 32 break;
9203dd016a5d8f Russell King 2015-05-09 33 case 96000:
9203dd016a5d8f Russell King 2015-05-09 34 fs = IEC958_AES3_CON_FS_96000;
9203dd016a5d8f Russell King 2015-05-09 35 break;
9203dd016a5d8f Russell King 2015-05-09 36 case 176400:
9203dd016a5d8f Russell King 2015-05-09 37 fs = IEC958_AES3_CON_FS_176400;
9203dd016a5d8f Russell King 2015-05-09 38 break;
9203dd016a5d8f Russell King 2015-05-09 39 case 192000:
9203dd016a5d8f Russell King 2015-05-09 40 fs = IEC958_AES3_CON_FS_192000;
9203dd016a5d8f Russell King 2015-05-09 41 break;
9203dd016a5d8f Russell King 2015-05-09 42 default:
9203dd016a5d8f Russell King 2015-05-09 43 return -EINVAL;
9203dd016a5d8f Russell King 2015-05-09 44 }
9203dd016a5d8f Russell King 2015-05-09 45
9203dd016a5d8f Russell King 2015-05-09 46 if (len > 4) {
4a4436573a6669 Jyri Sarha 2016-03-31 47 switch (sample_width) {
9203dd016a5d8f Russell King 2015-05-09 48 case 16:
9203dd016a5d8f Russell King 2015-05-09 49 ws = IEC958_AES4_CON_WORDLEN_20_16;
9203dd016a5d8f Russell King 2015-05-09 50 break;
9203dd016a5d8f Russell King 2015-05-09 51 case 18:
9203dd016a5d8f Russell King 2015-05-09 52 ws = IEC958_AES4_CON_WORDLEN_22_18;
9203dd016a5d8f Russell King 2015-05-09 53 break;
9203dd016a5d8f Russell King 2015-05-09 54 case 20:
9203dd016a5d8f Russell King 2015-05-09 55 ws = IEC958_AES4_CON_WORDLEN_20_16 |
9203dd016a5d8f Russell King 2015-05-09 56 IEC958_AES4_CON_MAX_WORDLEN_24;
9203dd016a5d8f Russell King 2015-05-09 57 break;
9203dd016a5d8f Russell King 2015-05-09 58 case 24:
4a462ce084d5be Jyri Sarha 2016-03-31 59 case 32: /* Assume 24-bit width for 32-bit samples. */
9203dd016a5d8f Russell King 2015-05-09 60 ws = IEC958_AES4_CON_WORDLEN_24_20 |
9203dd016a5d8f Russell King 2015-05-09 61 IEC958_AES4_CON_MAX_WORDLEN_24;
9203dd016a5d8f Russell King 2015-05-09 62 break;
9203dd016a5d8f Russell King 2015-05-09 63
9203dd016a5d8f Russell King 2015-05-09 64 default:
9203dd016a5d8f Russell King 2015-05-09 65 return -EINVAL;
9203dd016a5d8f Russell King 2015-05-09 66 }
9203dd016a5d8f Russell King 2015-05-09 67 }
9203dd016a5d8f Russell King 2015-05-09 68
9203dd016a5d8f Russell King 2015-05-09 69 memset(cs, 0, len);
9203dd016a5d8f Russell King 2015-05-09 70
9203dd016a5d8f Russell King 2015-05-09 71 cs[0] = IEC958_AES0_CON_NOT_COPYRIGHT | IEC958_AES0_CON_EMPHASIS_NONE;
9203dd016a5d8f Russell King 2015-05-09 72 cs[1] = IEC958_AES1_CON_GENERAL;
9203dd016a5d8f Russell King 2015-05-09 73 cs[2] = IEC958_AES2_CON_SOURCE_UNSPEC | IEC958_AES2_CON_CHANNEL_UNSPEC;
9203dd016a5d8f Russell King 2015-05-09 74 cs[3] = IEC958_AES3_CON_CLOCK_1000PPM | fs;
9203dd016a5d8f Russell King 2015-05-09 75
9203dd016a5d8f Russell King 2015-05-09 76 if (len > 4)
9203dd016a5d8f Russell King 2015-05-09 @77 cs[4] = ws;
9203dd016a5d8f Russell King 2015-05-09 78
9203dd016a5d8f Russell King 2015-05-09 79 return len;
9203dd016a5d8f Russell King 2015-05-09 80 }
4a4436573a6669 Jyri Sarha 2016-03-31 81

:::::: The code at line 77 was first introduced by commit
:::::: 9203dd016a5d8ffb2eb6acdca60cd0b5dfe38c2b ALSA: pcm: add IEC958 channel status helper

:::::: TO: Russell King <rmk+kernel@arm.linux.org.uk>
:::::: CC: Takashi Iwai <tiwai@suse.de>

---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[unhandled content-type:application/gzip]
\
 
 \ /
  Last update: 2019-09-16 09:56    [W:0.078 / U:2.960 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site