Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>,
	alsa-devel@alsa-project.org
Cc: oe-kbuild-all@lists.linux.dev, Takashi Iwai <tiwai@suse.de>,
	Jaroslav Kysela <perex@perex.cz>
Subject: Re: [PATCH 8/8] ALSA: emu10k1: add high-rate playback in E-MU D.A.S. mode
Date: Thu, 22 Jun 2023 15:05:50 +0800	[thread overview]
Message-ID: <202306221430.7QukSHhG-lkp@intel.com> (raw)
In-Reply-To: <20230613073822.1343234-9-oswald.buddenhagen@gmx.de>

Hi Oswald,

kernel test robot noticed the following build warnings:

[auto build test WARNING on tiwai-sound/for-next]
[also build test WARNING on next-20230621]
[cannot apply to tiwai-sound/for-linus linus/master v6.4-rc7]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Oswald-Buddenhagen/ALSA-emu10k1-introduce-alternative-E-MU-D-A-S-mode/20230613-154242
base:   https://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound.git for-next
patch link:    https://lore.kernel.org/r/20230613073822.1343234-9-oswald.buddenhagen%40gmx.de
patch subject: [PATCH 8/8] ALSA: emu10k1: add high-rate playback in E-MU D.A.S. mode
config: i386-randconfig-s002-20230621 (https://download.01.org/0day-ci/archive/20230622/202306221430.7QukSHhG-lkp@intel.com/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce: (https://download.01.org/0day-ci/archive/20230622/202306221430.7QukSHhG-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/202306221430.7QukSHhG-lkp@intel.com/

sparse warnings: (new ones prefixed by >>)
>> sound/pci/emu10k1/emupcm.c:1180:45: sparse: sparse: cast removes address space '__user' of expression
>> sound/pci/emu10k1/emupcm.c:1182:41: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const volatile [noderef] __user *ptr @@     got unsigned int [usertype] *src @@
   sound/pci/emu10k1/emupcm.c:1182:41: sparse:     expected void const volatile [noderef] __user *ptr
   sound/pci/emu10k1/emupcm.c:1182:41: sparse:     got unsigned int [usertype] *src

vim +/__user +1180 sound/pci/emu10k1/emupcm.c

  1146	
  1147	static int snd_emu10k1_efx_playback_copy_user(struct snd_pcm_substream *substream,
  1148						      int channel, unsigned long hwoff,
  1149						      void __user *buf, unsigned long bytes)
  1150	{
  1151		struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream);
  1152		struct snd_pcm_runtime *runtime = substream->runtime;
  1153		unsigned shift = emu->emu1010.clock_shift;
  1154		unsigned i, j, k, channels, subchans, voices, frame_size, frames;
  1155	
  1156		if (!shift) {
  1157			// Non-interleaved source
  1158			if (copy_from_user(get_dma_ptr(runtime, channel, hwoff), buf, bytes))
  1159				return -EFAULT;
  1160		} else {
  1161			// Interleaved source
  1162			channels = runtime->channels;
  1163			subchans = 1 << shift;
  1164			voices = channels << shift;
  1165			frame_size = voices << 2;
  1166			// It is recommended that writes are period-sized, and it appears
  1167			// unlikely that someone would actually use a period size which
  1168			// is not divisible by four, so don't bother making it work.
  1169			// This check should also prevent that hwoff becomes unaligned.
  1170			// Ideally, snd_pcm_sw_params.xfer_align would handle this ...
  1171			if (bytes % frame_size)
  1172				return -EIO;
  1173			frames = bytes / frame_size;
  1174			hwoff /= voices;
  1175			if (!user_access_begin(buf, bytes))
  1176				return -EFAULT;
  1177			for (i = 0; i < channels; i++) {
  1178				for (j = 0; j < subchans; j++) {
  1179					u32 *dst = get_dma_ptr_x(runtime, shift, i, j, hwoff);
> 1180					u32 *src = (u32 *)buf + j * channels + i;
  1181					for (k = 0; k < frames; k++, dst++, src += voices)
> 1182						unsafe_get_user(*dst, src, faulted);
  1183				}
  1184			}
  1185			user_access_end();
  1186		}
  1187		return 0;
  1188	
  1189	faulted:
  1190		user_access_end();
  1191		return -EFAULT;
  1192	}
  1193	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

      reply	other threads:[~2023-06-22  7:08 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-13  7:38 [PATCH 0/8] ALSA: emu10k1: add support for high-bitrate modes of E-MU cards Oswald Buddenhagen
2023-06-13  7:38 ` [PATCH 1/8] ALSA: emu10k1: introduce alternative E-MU D.A.S. mode Oswald Buddenhagen
2023-06-13  7:38 ` [PATCH 2/8] ALSA: emu10k1: improve mixer control naming in " Oswald Buddenhagen
2023-06-13  7:38 ` [PATCH 3/8] ALSA: emu10k1: set the "no filtering" bits on PCM voices Oswald Buddenhagen
2023-06-13  7:38 ` [PATCH 4/8] ALSA: emu10k1: make playback in E-MU D.A.S. mode 32-bit Oswald Buddenhagen
2023-06-13  7:38 ` [PATCH 5/8] ALSA: add snd_ctl_add_locked() Oswald Buddenhagen
2023-06-13  7:38 ` [PATCH 6/8] ALSA: emu10k1: add support for 2x/4x word clocks in E-MU D.A.S. mode Oswald Buddenhagen
2023-06-13  9:20   ` Takashi Iwai
2023-06-13 10:52     ` Oswald Buddenhagen
2023-06-13 11:08       ` Takashi Iwai
2023-06-13 14:00         ` Oswald Buddenhagen
2023-06-13 14:13           ` Takashi Iwai
2023-06-13 15:23             ` Oswald Buddenhagen
2023-06-13 15:43               ` Takashi Iwai
2023-06-13 17:14                 ` Oswald Buddenhagen
2023-06-14  6:36                   ` Takashi Iwai
2023-06-14  8:52                     ` Oswald Buddenhagen
2023-06-14  9:16                       ` Takashi Iwai
2023-06-14 10:53                         ` Oswald Buddenhagen
2023-06-13  7:38 ` [PATCH 7/8] ALSA: emu10k1: add high-rate capture " Oswald Buddenhagen
2023-06-13  7:38 ` [PATCH 8/8] ALSA: emu10k1: add high-rate playback " Oswald Buddenhagen
2023-06-22  7:05   ` kernel test robot [this message]

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=202306221430.7QukSHhG-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=oswald.buddenhagen@gmx.de \
    --cc=perex@perex.cz \
    --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