From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id EE105C71133 for ; Fri, 25 Aug 2023 10:52:07 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 213788E0015; Fri, 25 Aug 2023 06:52:07 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 19D798E0011; Fri, 25 Aug 2023 06:52:07 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 03F868E0015; Fri, 25 Aug 2023 06:52:06 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) by kanga.kvack.org (Postfix) with ESMTP id E8EB18E0011 for ; Fri, 25 Aug 2023 06:52:06 -0400 (EDT) Received: from smtpin13.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id B5E1D140581 for ; Fri, 25 Aug 2023 10:52:06 +0000 (UTC) X-FDA: 81162312252.13.83C7BCA Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.43]) by imf08.hostedemail.com (Postfix) with ESMTP id 78496160006 for ; Fri, 25 Aug 2023 10:52:02 +0000 (UTC) Authentication-Results: imf08.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b=lqXd95hh; dmarc=pass (policy=none) header.from=intel.com; spf=pass (imf08.hostedemail.com: domain of lkp@intel.com designates 192.55.52.43 as permitted sender) smtp.mailfrom=lkp@intel.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1692960725; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding:in-reply-to: references:dkim-signature; bh=1534EsQVAbeamnSrq7WYx1vR1GJ4Jn+tIhN4kGi+nQE=; b=AedlJ0xrQRTGZ9xkYMdp3KF1NCabsR0YZtH0Yvy8NbAyAbJgL9skfjLaEoC4aJkV+bE4Hc 8O4lIDZ5RtBFFABIyvahnZNF3d9no3w2q3TzvubbpwW3T7BJVFClXPiKAoLqC9WYhmSW+z tX2UHEex5J2apn0vkxjO0+/4MU+JlZo= ARC-Authentication-Results: i=1; imf08.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b=lqXd95hh; dmarc=pass (policy=none) header.from=intel.com; spf=pass (imf08.hostedemail.com: domain of lkp@intel.com designates 192.55.52.43 as permitted sender) smtp.mailfrom=lkp@intel.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1692960725; a=rsa-sha256; cv=none; b=KOEDJ+8RMoACC1w9hlzGrl5iCgx+BX6NcNmHS6em5RbzsJmKcyuiz5hoTs9m5WeM/Lp60r fiCOFPX3uJ4xWob0B4Ct5TOsXc6kdLRyZFc6iH4RKysgh6pTbXEsiOnnlO8uLABhAFLRPo mPjajIvNOIrxw3toVVGue9V37JvuHRw= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1692960723; x=1724496723; h=date:from:to:cc:subject:message-id:mime-version; bh=3HNm/6a9XHt0w9oaO2F07Ql+LmtVdx6BDfueJqdI2yo=; b=lqXd95hh6t2vJK0iEfXTzw06UYwfqRTuiAHkVUTa4+DWrMfk/NI9oSxd dsBj+bimEsbnT1s1SvnRkeRyBmtl7NRFc5GiTUkkrsiBfUgQicAVBsQgT ISpVEIpnGNX1luPL08tvIi2oerYKkeWRq/yND1Qy4G7lVV2Uj9EVx3zWr sC54S7fHTwem4D+SRNd8/AkgcvUl7s9EJbl2VZdQjIYlAJTvVsFb6rchu wrDNoHTnnEfl5W3lFXLVxBHrbgC/GeuDjq6la1q5j/3JNdl6O1Q1NsYx/ Xkdd1Nudx6yptcoMaFmpbaOdNrwSG6ReR2PJtls094v3jjxSPTsTPBtaF w==; X-IronPort-AV: E=McAfee;i="6600,9927,10812"; a="461048667" X-IronPort-AV: E=Sophos;i="6.02,195,1688454000"; d="scan'208";a="461048667" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Aug 2023 03:51:56 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10812"; a="827549432" X-IronPort-AV: E=Sophos;i="6.02,195,1688454000"; d="scan'208";a="827549432" Received: from lkp-server02.sh.intel.com (HELO daf8bb0a381d) ([10.239.97.151]) by FMSMGA003.fm.intel.com with ESMTP; 25 Aug 2023 03:51:55 -0700 Received: from kbuild by daf8bb0a381d with local (Exim 4.96) (envelope-from ) id 1qZUPy-0003T6-11; Fri, 25 Aug 2023 10:51:54 +0000 Date: Fri, 25 Aug 2023 18:51:37 +0800 From: kernel test robot To: Takashi Iwai Cc: oe-kbuild-all@lists.linux.dev, Linux Memory Management List Subject: [linux-next:master 12822/12910] sound/core/ump.c:1194:53: warning: '%s' directive output may be truncated writing up to 127 bytes into a region of size 80 Message-ID: <202308251844.1FuQYsql-lkp@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Rspamd-Queue-Id: 78496160006 X-Rspam-User: X-Rspamd-Server: rspam05 X-Stat-Signature: nmenh9dfyn1x5nu5tis3xx4oi4xm1nh1 X-HE-Tag: 1692960722-66858 X-HE-Meta: U2FsdGVkX1969P00/CmN/044fYpr6C3lOAQM9kktOw4NQRfWqgG9p+ZjhR6r9Gq7FoGYQBTmDP/jA/1iQ7+NpPUumMfN/jc3d3cd/oIC6zjlDgfhStO04/l9keVY+UQYge95yRiTN/DP3IbSsGivw5QBYDv4eCMUfy7dJTpztzd4oH9UkxqrxVTLPgxfix/QgF1oicMtviW1wnCKOd0ufm7ng/iO5bfYDwh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HO18wCUHkloOZxJGvFoCbGPosmPWVXAVW1IgMJh+PTEMRm4w== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master head: 6269320850097903b30be8f07a5c61d9f7592393 commit: 7266869cd146d5b98a659dad9afb747e90fc45ce [12822/12910] Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound.git config: x86_64-allyesconfig (https://download.01.org/0day-ci/archive/20230825/202308251844.1FuQYsql-lkp@intel.com/config) compiler: gcc-12 (Debian 12.2.0-14) 12.2.0 reproduce: (https://download.01.org/0day-ci/archive/20230825/202308251844.1FuQYsql-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 | Closes: https://lore.kernel.org/oe-kbuild-all/202308251844.1FuQYsql-lkp@intel.com/ All warnings (new ones prefixed by >>): sound/core/ump.c: In function 'snd_ump_attach_legacy_rawmidi': >> sound/core/ump.c:1194:53: warning: '%s' directive output may be truncated writing up to 127 bytes into a region of size 80 [-Wformat-truncation=] 1194 | snprintf(rmidi->name, sizeof(rmidi->name), "%s (MIDI 1.0)", | ^~ sound/core/ump.c:1194:9: note: 'snprintf' output between 12 and 139 bytes into a destination of size 80 1194 | snprintf(rmidi->name, sizeof(rmidi->name), "%s (MIDI 1.0)", | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1195 | ump->info.name); | ~~~~~~~~~~~~~~~ >> sound/core/ump.c:1194:53: warning: '%s' directive output may be truncated writing up to 127 bytes into a region of size 80 [-Wformat-truncation=] 1194 | snprintf(rmidi->name, sizeof(rmidi->name), "%s (MIDI 1.0)", | ^~ sound/core/ump.c:1194:9: note: 'snprintf' output between 12 and 139 bytes into a destination of size 80 1194 | snprintf(rmidi->name, sizeof(rmidi->name), "%s (MIDI 1.0)", | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1195 | ump->info.name); | ~~~~~~~~~~~~~~~ >> sound/core/ump.c:1194:53: warning: '%s' directive output may be truncated writing up to 127 bytes into a region of size 80 [-Wformat-truncation=] 1194 | snprintf(rmidi->name, sizeof(rmidi->name), "%s (MIDI 1.0)", | ^~ sound/core/ump.c:1194:9: note: 'snprintf' output between 12 and 139 bytes into a destination of size 80 1194 | snprintf(rmidi->name, sizeof(rmidi->name), "%s (MIDI 1.0)", | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1195 | ump->info.name); | ~~~~~~~~~~~~~~~ >> sound/core/ump.c:1160:63: warning: '%s' directive output may be truncated writing up to 127 bytes into a region of size between 21 and 23 [-Wformat-truncation=] 1160 | snprintf(s->name, sizeof(s->name), "Group %d (%s)", | ^~ In function 'fill_substream_names', inlined from 'snd_ump_attach_legacy_rawmidi' at sound/core/ump.c:1201:3: sound/core/ump.c:1160:17: note: 'snprintf' output between 11 and 140 bytes into a destination of size 32 1160 | snprintf(s->name, sizeof(s->name), "Group %d (%s)", | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1161 | ump->legacy_mapping[s->number] + 1, ump->info.name); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ sound/core/ump.c: In function 'snd_ump_attach_legacy_rawmidi': >> sound/core/ump.c:1160:63: warning: '%s' directive output may be truncated writing up to 127 bytes into a region of size between 21 and 23 [-Wformat-truncation=] 1160 | snprintf(s->name, sizeof(s->name), "Group %d (%s)", | ^~ In function 'fill_substream_names', inlined from 'snd_ump_attach_legacy_rawmidi' at sound/core/ump.c:1203:3: sound/core/ump.c:1160:17: note: 'snprintf' output between 11 and 140 bytes into a destination of size 32 1160 | snprintf(s->name, sizeof(s->name), "Group %d (%s)", | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1161 | ump->legacy_mapping[s->number] + 1, ump->info.name); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ vim +1194 sound/core/ump.c b2bcbd031d34d1b Takashi Iwai 2023-08-24 1153 1761f4cc114af53 Takashi Iwai 2023-08-24 1154 static void fill_substream_names(struct snd_ump_endpoint *ump, 1761f4cc114af53 Takashi Iwai 2023-08-24 1155 struct snd_rawmidi *rmidi, int dir) 1761f4cc114af53 Takashi Iwai 2023-08-24 1156 { 1761f4cc114af53 Takashi Iwai 2023-08-24 1157 struct snd_rawmidi_substream *s; 1761f4cc114af53 Takashi Iwai 2023-08-24 1158 1761f4cc114af53 Takashi Iwai 2023-08-24 1159 list_for_each_entry(s, &rmidi->streams[dir].substreams, list) 1761f4cc114af53 Takashi Iwai 2023-08-24 @1160 snprintf(s->name, sizeof(s->name), "Group %d (%s)", b2bcbd031d34d1b Takashi Iwai 2023-08-24 1161 ump->legacy_mapping[s->number] + 1, ump->info.name); 1761f4cc114af53 Takashi Iwai 2023-08-24 1162 } 1761f4cc114af53 Takashi Iwai 2023-08-24 1163 0b5288f5fe63eab Takashi Iwai 2023-05-23 1164 int snd_ump_attach_legacy_rawmidi(struct snd_ump_endpoint *ump, 0b5288f5fe63eab Takashi Iwai 2023-05-23 1165 char *id, int device) 0b5288f5fe63eab Takashi Iwai 2023-05-23 1166 { 0b5288f5fe63eab Takashi Iwai 2023-05-23 1167 struct snd_rawmidi *rmidi; 0b5288f5fe63eab Takashi Iwai 2023-05-23 1168 bool input, output; b2bcbd031d34d1b Takashi Iwai 2023-08-24 1169 int err, num; 0b5288f5fe63eab Takashi Iwai 2023-05-23 1170 b2bcbd031d34d1b Takashi Iwai 2023-08-24 1171 ump->out_cvts = kcalloc(SNDRV_UMP_MAX_GROUPS, b2bcbd031d34d1b Takashi Iwai 2023-08-24 1172 sizeof(*ump->out_cvts), GFP_KERNEL); 33cd7630782df22 Takashi Iwai 2023-06-23 1173 if (!ump->out_cvts) 33cd7630782df22 Takashi Iwai 2023-06-23 1174 return -ENOMEM; 0b5288f5fe63eab Takashi Iwai 2023-05-23 1175 b2bcbd031d34d1b Takashi Iwai 2023-08-24 1176 num = fill_legacy_mapping(ump); b2bcbd031d34d1b Takashi Iwai 2023-08-24 1177 0b5288f5fe63eab Takashi Iwai 2023-05-23 1178 input = ump->core.info_flags & SNDRV_RAWMIDI_INFO_INPUT; 0b5288f5fe63eab Takashi Iwai 2023-05-23 1179 output = ump->core.info_flags & SNDRV_RAWMIDI_INFO_OUTPUT; 0b5288f5fe63eab Takashi Iwai 2023-05-23 1180 err = snd_rawmidi_new(ump->core.card, id, device, b2bcbd031d34d1b Takashi Iwai 2023-08-24 1181 output ? num : 0, input ? num : 0, 0b5288f5fe63eab Takashi Iwai 2023-05-23 1182 &rmidi); 0b5288f5fe63eab Takashi Iwai 2023-05-23 1183 if (err < 0) { 33cd7630782df22 Takashi Iwai 2023-06-23 1184 kfree(ump->out_cvts); 0b5288f5fe63eab Takashi Iwai 2023-05-23 1185 return err; 0b5288f5fe63eab Takashi Iwai 2023-05-23 1186 } 0b5288f5fe63eab Takashi Iwai 2023-05-23 1187 0b5288f5fe63eab Takashi Iwai 2023-05-23 1188 if (input) 0b5288f5fe63eab Takashi Iwai 2023-05-23 1189 snd_rawmidi_set_ops(rmidi, SNDRV_RAWMIDI_STREAM_INPUT, 0b5288f5fe63eab Takashi Iwai 2023-05-23 1190 &snd_ump_legacy_input_ops); 0b5288f5fe63eab Takashi Iwai 2023-05-23 1191 if (output) 0b5288f5fe63eab Takashi Iwai 2023-05-23 1192 snd_rawmidi_set_ops(rmidi, SNDRV_RAWMIDI_STREAM_OUTPUT, 0b5288f5fe63eab Takashi Iwai 2023-05-23 1193 &snd_ump_legacy_output_ops); 5f11dd938fe7657 Takashi Iwai 2023-08-24 @1194 snprintf(rmidi->name, sizeof(rmidi->name), "%s (MIDI 1.0)", 5f11dd938fe7657 Takashi Iwai 2023-08-24 1195 ump->info.name); 0b5288f5fe63eab Takashi Iwai 2023-05-23 1196 rmidi->info_flags = ump->core.info_flags & ~SNDRV_RAWMIDI_INFO_UMP; 0b5288f5fe63eab Takashi Iwai 2023-05-23 1197 rmidi->ops = &snd_ump_legacy_ops; 0b5288f5fe63eab Takashi Iwai 2023-05-23 1198 rmidi->private_data = ump; 0b5288f5fe63eab Takashi Iwai 2023-05-23 1199 ump->legacy_rmidi = rmidi; 1761f4cc114af53 Takashi Iwai 2023-08-24 1200 if (input) 1761f4cc114af53 Takashi Iwai 2023-08-24 1201 fill_substream_names(ump, rmidi, SNDRV_RAWMIDI_STREAM_INPUT); 1761f4cc114af53 Takashi Iwai 2023-08-24 1202 if (output) 1761f4cc114af53 Takashi Iwai 2023-08-24 1203 fill_substream_names(ump, rmidi, SNDRV_RAWMIDI_STREAM_OUTPUT); 1761f4cc114af53 Takashi Iwai 2023-08-24 1204 0b5288f5fe63eab Takashi Iwai 2023-05-23 1205 ump_dbg(ump, "Created a legacy rawmidi #%d (%s)\n", device, id); 0b5288f5fe63eab Takashi Iwai 2023-05-23 1206 return 0; 0b5288f5fe63eab Takashi Iwai 2023-05-23 1207 } 0b5288f5fe63eab Takashi Iwai 2023-05-23 1208 EXPORT_SYMBOL_GPL(snd_ump_attach_legacy_rawmidi); 0b5288f5fe63eab Takashi Iwai 2023-05-23 1209 #endif /* CONFIG_SND_UMP_LEGACY_RAWMIDI */ 0b5288f5fe63eab Takashi Iwai 2023-05-23 1210 :::::: The code at line 1194 was first introduced by commit :::::: 5f11dd938fe7657899ca79b2ffc4d708e43f4737 ALSA: usb-audio: Attach legacy rawmidi after probing all UMP EPs :::::: TO: Takashi Iwai :::::: CC: Takashi Iwai -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki