From: kernel test robot <lkp@intel.com>
To: Takashi Iwai <tiwai@suse.de>
Cc: oe-kbuild-all@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: sound/core/ump.c:676:25: warning: array subscript 'struct snd_ump_block_info[0]' is partly outside array bounds of 'char[20]'
Date: Tue, 19 Sep 2023 19:06:43 +0800 [thread overview]
Message-ID: <202309191806.9xysweCr-lkp@intel.com> (raw)
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 2cf0f715623872823a72e451243bbf555d10d032
commit: 4a16a3af05712e7fd5a205f34e2908055bd9fb5e ALSA: seq: ump: Handle FB info update
date: 3 months ago
config: x86_64-randconfig-004-20230919 (https://download.01.org/0day-ci/archive/20230919/202309191806.9xysweCr-lkp@intel.com/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20230919/202309191806.9xysweCr-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202309191806.9xysweCr-lkp@intel.com/
All warnings (new ones prefixed by >>):
In function 'fill_fb_info',
inlined from 'is_fb_info_updated.constprop' at sound/core/ump.c:699:2:
>> sound/core/ump.c:676:25: warning: array subscript 'struct snd_ump_block_info[0]' is partly outside array bounds of 'char[20]' [-Warray-bounds]
676 | info->direction = buf->fb_info.direction;
| ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
sound/core/ump.c: In function 'is_fb_info_updated.constprop':
sound/core/ump.c:696:14: note: object 'tmpbuf' of size 20
696 | char tmpbuf[offsetof(struct snd_ump_block_info, name)];
| ^~~~~~
In function 'fill_fb_info',
inlined from 'is_fb_info_updated.constprop' at sound/core/ump.c:699:2:
sound/core/ump.c:677:23: warning: array subscript 'struct snd_ump_block_info[0]' is partly outside array bounds of 'char[20]' [-Warray-bounds]
677 | info->ui_hint = buf->fb_info.ui_hint;
| ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
sound/core/ump.c: In function 'is_fb_info_updated.constprop':
sound/core/ump.c:696:14: note: object 'tmpbuf' of size 20
696 | char tmpbuf[offsetof(struct snd_ump_block_info, name)];
| ^~~~~~
In function 'fill_fb_info',
inlined from 'is_fb_info_updated.constprop' at sound/core/ump.c:699:2:
sound/core/ump.c:678:27: warning: array subscript 'struct snd_ump_block_info[0]' is partly outside array bounds of 'char[20]' [-Warray-bounds]
678 | info->first_group = buf->fb_info.first_group;
| ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
sound/core/ump.c: In function 'is_fb_info_updated.constprop':
sound/core/ump.c:696:14: note: object 'tmpbuf' of size 20
696 | char tmpbuf[offsetof(struct snd_ump_block_info, name)];
| ^~~~~~
In function 'fill_fb_info',
inlined from 'is_fb_info_updated.constprop' at sound/core/ump.c:699:2:
sound/core/ump.c:679:26: warning: array subscript 'struct snd_ump_block_info[0]' is partly outside array bounds of 'char[20]' [-Warray-bounds]
679 | info->num_groups = buf->fb_info.num_groups;
| ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
sound/core/ump.c: In function 'is_fb_info_updated.constprop':
sound/core/ump.c:696:14: note: object 'tmpbuf' of size 20
696 | char tmpbuf[offsetof(struct snd_ump_block_info, name)];
| ^~~~~~
In function 'fill_fb_info',
inlined from 'is_fb_info_updated.constprop' at sound/core/ump.c:699:2:
sound/core/ump.c:680:21: warning: array subscript 'struct snd_ump_block_info[0]' is partly outside array bounds of 'char[20]' [-Warray-bounds]
680 | info->flags = buf->fb_info.midi_10;
| ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
sound/core/ump.c: In function 'is_fb_info_updated.constprop':
sound/core/ump.c:696:14: note: object 'tmpbuf' of size 20
696 | char tmpbuf[offsetof(struct snd_ump_block_info, name)];
| ^~~~~~
In function 'fill_fb_info',
inlined from 'is_fb_info_updated.constprop' at sound/core/ump.c:699:2:
sound/core/ump.c:681:22: warning: array subscript 'struct snd_ump_block_info[0]' is partly outside array bounds of 'char[20]' [-Warray-bounds]
681 | info->active = buf->fb_info.active;
| ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~
sound/core/ump.c: In function 'is_fb_info_updated.constprop':
sound/core/ump.c:696:14: note: object 'tmpbuf' of size 20
696 | char tmpbuf[offsetof(struct snd_ump_block_info, name)];
| ^~~~~~
In function 'fill_fb_info',
inlined from 'is_fb_info_updated.constprop' at sound/core/ump.c:699:2:
sound/core/ump.c:682:31: warning: array subscript 'struct snd_ump_block_info[0]' is partly outside array bounds of 'char[20]' [-Warray-bounds]
682 | info->midi_ci_version = buf->fb_info.midi_ci_version;
| ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
sound/core/ump.c: In function 'is_fb_info_updated.constprop':
sound/core/ump.c:696:14: note: object 'tmpbuf' of size 20
696 | char tmpbuf[offsetof(struct snd_ump_block_info, name)];
| ^~~~~~
In function 'fill_fb_info',
inlined from 'is_fb_info_updated.constprop' at sound/core/ump.c:699:2:
sound/core/ump.c:683:30: warning: array subscript 'struct snd_ump_block_info[0]' is partly outside array bounds of 'char[20]' [-Warray-bounds]
683 | info->sysex8_streams = buf->fb_info.sysex8_streams;
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
sound/core/ump.c: In function 'is_fb_info_updated.constprop':
sound/core/ump.c:696:14: note: object 'tmpbuf' of size 20
696 | char tmpbuf[offsetof(struct snd_ump_block_info, name)];
| ^~~~~~
vim +676 sound/core/ump.c
37e0e14128e068 Takashi Iwai 2023-06-12 670
37e0e14128e068 Takashi Iwai 2023-06-12 671 /* Extract Function Block info from UMP packet */
37e0e14128e068 Takashi Iwai 2023-06-12 672 static void fill_fb_info(struct snd_ump_endpoint *ump,
37e0e14128e068 Takashi Iwai 2023-06-12 673 struct snd_ump_block_info *info,
37e0e14128e068 Takashi Iwai 2023-06-12 674 const union snd_ump_stream_msg *buf)
37e0e14128e068 Takashi Iwai 2023-06-12 675 {
37e0e14128e068 Takashi Iwai 2023-06-12 @676 info->direction = buf->fb_info.direction;
37e0e14128e068 Takashi Iwai 2023-06-12 677 info->ui_hint = buf->fb_info.ui_hint;
37e0e14128e068 Takashi Iwai 2023-06-12 678 info->first_group = buf->fb_info.first_group;
37e0e14128e068 Takashi Iwai 2023-06-12 679 info->num_groups = buf->fb_info.num_groups;
37e0e14128e068 Takashi Iwai 2023-06-12 680 info->flags = buf->fb_info.midi_10;
37e0e14128e068 Takashi Iwai 2023-06-12 681 info->active = buf->fb_info.active;
37e0e14128e068 Takashi Iwai 2023-06-12 682 info->midi_ci_version = buf->fb_info.midi_ci_version;
37e0e14128e068 Takashi Iwai 2023-06-12 683 info->sysex8_streams = buf->fb_info.sysex8_streams;
37e0e14128e068 Takashi Iwai 2023-06-12 684
37e0e14128e068 Takashi Iwai 2023-06-12 685 ump_dbg(ump, "FB %d: dir=%d, active=%d, first_gp=%d, num_gp=%d, midici=%d, sysex8=%d, flags=0x%x\n",
37e0e14128e068 Takashi Iwai 2023-06-12 686 info->block_id, info->direction, info->active,
37e0e14128e068 Takashi Iwai 2023-06-12 687 info->first_group, info->num_groups, info->midi_ci_version,
37e0e14128e068 Takashi Iwai 2023-06-12 688 info->sysex8_streams, info->flags);
37e0e14128e068 Takashi Iwai 2023-06-12 689 }
37e0e14128e068 Takashi Iwai 2023-06-12 690
:::::: The code at line 676 was first introduced by commit
:::::: 37e0e14128e0685267dc5c037bf655421a6ce2ea ALSA: ump: Support UMP Endpoint and Function Block parsing
:::::: TO: Takashi Iwai <tiwai@suse.de>
:::::: CC: Takashi Iwai <tiwai@suse.de>
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
reply other threads:[~2023-09-19 11:07 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202309191806.9xysweCr-lkp@intel.com \
--to=lkp@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=tiwai@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®