All of lore.kernel.org
 help / color / mirror / Atom feed
* [intel-linux-intel-lts:4.19/android 2/2] sound/soc/intel/skylake/skl-sst-ipc.c:506:28: sparse: sparse: incorrect type in argument 1 (different address spaces)
@ 2020-09-10  5:50 kernel test robot
  0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2020-09-10  5:50 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 4504 bytes --]

tree:   https://github.com/intel/linux-intel-lts.git 4.19/android
head:   ea9961eec18fbdbf0d3513d88cc7da2a718415d5
commit: ea9961eec18fbdbf0d3513d88cc7da2a718415d5 [2/2] ASoC: Intel: Skylake: Update stackdump collection
config: x86_64-randconfig-s021-20200909 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce:
        # apt-get install sparse
        # sparse version: v0.6.2-191-g10164920-dirty
        git checkout ea9961eec18fbdbf0d3513d88cc7da2a718415d5
        # save the attached .config to linux build tree
        make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=x86_64 

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


sparse warnings: (new ones prefixed by >>)

   sound/soc/intel/skylake/skl-sst-ipc.c:500:17: sparse: sparse: cast removes address space '<asn:2>' of expression
>> sound/soc/intel/skylake/skl-sst-ipc.c:506:28: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const volatile [noderef] <asn:2> *addr @@     got unsigned char [usertype] * @@
>> sound/soc/intel/skylake/skl-sst-ipc.c:506:28: sparse:     expected void const volatile [noderef] <asn:2> *addr
>> sound/soc/intel/skylake/skl-sst-ipc.c:506:28: sparse:     got unsigned char [usertype] *
--
   sound/soc/intel/skylake/skl-sst-utils.c:295:17: sparse: sparse: cast removes address space '<asn:2>' of expression
>> sound/soc/intel/skylake/skl-sst-utils.c:295:14: sparse: sparse: incorrect type in assignment (different address spaces) @@     expected void [noderef] <asn:2> *base @@     got unsigned char [usertype] * @@
>> sound/soc/intel/skylake/skl-sst-utils.c:295:14: sparse:     expected void [noderef] <asn:2> *base
>> sound/soc/intel/skylake/skl-sst-utils.c:295:14: sparse:     got unsigned char [usertype] *
>> sound/soc/intel/skylake/skl-sst-utils.c:368:39: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void volatile [noderef] <asn:2> *addr @@     got unsigned char [usertype] *[assigned] base @@
   sound/soc/intel/skylake/skl-sst-utils.c:368:39: sparse:     expected void volatile [noderef] <asn:2> *addr
>> sound/soc/intel/skylake/skl-sst-utils.c:368:39: sparse:     got unsigned char [usertype] *[assigned] base
   sound/soc/intel/skylake/skl-sst-utils.c:1074:24: sparse: sparse: Variable length array is used.

# https://github.com/intel/linux-intel-lts/commit/ea9961eec18fbdbf0d3513d88cc7da2a718415d5
git remote add intel-linux-intel-lts https://github.com/intel/linux-intel-lts.git
git fetch --no-tags intel-linux-intel-lts 4.19/android
git checkout ea9961eec18fbdbf0d3513d88cc7da2a718415d5
vim +506 sound/soc/intel/skylake/skl-sst-ipc.c

   475	
   476	void
   477	skl_process_log_buffer(struct sst_dsp *sst, int core)
   478	{
   479		int size;
   480		u32 *ptr;
   481		u8 *base;
   482		u32 write, read;
   483	
   484		if (!(BIT(core) & sst->trace_wind.flags)) {
   485			dev_err(sst->dev, "Logging is disabled on dsp %d\n", core);
   486			return;
   487		}
   488		if (skl_dsp_get_buff_users(sst, core) > 2) {
   489			dev_err(sst->dev, "Can't handle log buffer notification, \
   490				previous writer is not finished yet !\n \
   491				dropping log buffer\n");
   492			return;
   493		}
   494		skl_dsp_get_log_buff(sst, core);
   495	#if defined(CONFIG_SND_SOC_INTEL_CNL_FPGA)
   496		size = sst->trace_wind.size;
   497	#else
   498		size = sst->trace_wind.size/sst->trace_wind.nr_dsp;
   499	#endif
   500		base = (u8 *)sst->trace_wind.addr;
   501		/* move to the source dsp tracing window */
   502		base += (core * size);
   503		ptr = (u32 *) base;
   504		read = ptr[0];
   505		write = ptr[1];
 > 506		if (readl(base + 8 + read % (size - 8)) == STACK_DUMP_TYPE_DWORD)
   507			goto exit;
   508		if (write > read) {
   509			skl_dsp_write_log(sst, (void __iomem *)(base + 8 + read),
   510						core, (write - read));
   511			/* read pointer */
   512			ptr[0] += write - read;
   513		} else {
   514			skl_dsp_write_log(sst, (void __iomem *) (base + 8 + read),
   515						core, size - 8 - read);
   516			skl_dsp_write_log(sst, (void __iomem *) (base + 8),
   517						core, write);
   518			ptr[0] = write;
   519		}
   520	exit:
   521		skl_dsp_put_log_buff(sst, core);
   522	}
   523	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 28099 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [intel-linux-intel-lts:4.19/android 2/2] sound/soc/intel/skylake/skl-sst-ipc.c:506:28: sparse: sparse: incorrect type in argument 1 (different address spaces)
@ 2021-03-07 11:29 kernel test robot
  0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2021-03-07 11:29 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 4369 bytes --]

tree:   https://github.com/intel/linux-intel-lts.git 4.19/android
head:   ea9961eec18fbdbf0d3513d88cc7da2a718415d5
commit: ea9961eec18fbdbf0d3513d88cc7da2a718415d5 [2/2] ASoC: Intel: Skylake: Update stackdump collection
config: i386-randconfig-s002-20210307 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce:
        # apt-get install sparse
        # sparse version: v0.6.3-245-gacc5c298-dirty
        # https://github.com/intel/linux-intel-lts/commit/ea9961eec18fbdbf0d3513d88cc7da2a718415d5
        git remote add intel-linux-intel-lts https://github.com/intel/linux-intel-lts.git
        git fetch --no-tags intel-linux-intel-lts 4.19/android
        git checkout ea9961eec18fbdbf0d3513d88cc7da2a718415d5
        # save the attached .config to linux build tree
        make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=i386 

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


"sparse warnings: (new ones prefixed by >>)"
   sound/soc/intel/skylake/skl-sst-ipc.c:500:17: sparse: sparse: cast removes address space '<asn:2>' of expression
>> sound/soc/intel/skylake/skl-sst-ipc.c:506:28: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const volatile [noderef] <asn:2> *addr @@     got unsigned char [usertype] * @@
   sound/soc/intel/skylake/skl-sst-ipc.c:506:28: sparse:     expected void const volatile [noderef] <asn:2> *addr
   sound/soc/intel/skylake/skl-sst-ipc.c:506:28: sparse:     got unsigned char [usertype] *
--
   sound/soc/intel/skylake/skl-sst-utils.c:295:17: sparse: sparse: cast removes address space '<asn:2>' of expression
>> sound/soc/intel/skylake/skl-sst-utils.c:295:14: sparse: sparse: incorrect type in assignment (different address spaces) @@     expected void [noderef] <asn:2> *base @@     got unsigned char [usertype] * @@
   sound/soc/intel/skylake/skl-sst-utils.c:295:14: sparse:     expected void [noderef] <asn:2> *base
   sound/soc/intel/skylake/skl-sst-utils.c:295:14: sparse:     got unsigned char [usertype] *
>> sound/soc/intel/skylake/skl-sst-utils.c:368:39: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void volatile [noderef] <asn:2> *addr @@     got unsigned char [usertype] *[assigned] base @@
   sound/soc/intel/skylake/skl-sst-utils.c:368:39: sparse:     expected void volatile [noderef] <asn:2> *addr
   sound/soc/intel/skylake/skl-sst-utils.c:368:39: sparse:     got unsigned char [usertype] *[assigned] base

vim +506 sound/soc/intel/skylake/skl-sst-ipc.c

   475	
   476	void
   477	skl_process_log_buffer(struct sst_dsp *sst, int core)
   478	{
   479		int size;
   480		u32 *ptr;
   481		u8 *base;
   482		u32 write, read;
   483	
   484		if (!(BIT(core) & sst->trace_wind.flags)) {
   485			dev_err(sst->dev, "Logging is disabled on dsp %d\n", core);
   486			return;
   487		}
   488		if (skl_dsp_get_buff_users(sst, core) > 2) {
   489			dev_err(sst->dev, "Can't handle log buffer notification, \
   490				previous writer is not finished yet !\n \
   491				dropping log buffer\n");
   492			return;
   493		}
   494		skl_dsp_get_log_buff(sst, core);
   495	#if defined(CONFIG_SND_SOC_INTEL_CNL_FPGA)
   496		size = sst->trace_wind.size;
   497	#else
   498		size = sst->trace_wind.size/sst->trace_wind.nr_dsp;
   499	#endif
 > 500		base = (u8 *)sst->trace_wind.addr;
   501		/* move to the source dsp tracing window */
   502		base += (core * size);
   503		ptr = (u32 *) base;
   504		read = ptr[0];
   505		write = ptr[1];
 > 506		if (readl(base + 8 + read % (size - 8)) == STACK_DUMP_TYPE_DWORD)
   507			goto exit;
   508		if (write > read) {
   509			skl_dsp_write_log(sst, (void __iomem *)(base + 8 + read),
   510						core, (write - read));
   511			/* read pointer */
   512			ptr[0] += write - read;
   513		} else {
   514			skl_dsp_write_log(sst, (void __iomem *) (base + 8 + read),
   515						core, size - 8 - read);
   516			skl_dsp_write_log(sst, (void __iomem *) (base + 8),
   517						core, write);
   518			ptr[0] = write;
   519		}
   520	exit:
   521		skl_dsp_put_log_buff(sst, core);
   522	}
   523	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 32475 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-03-07 11:29 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-10  5:50 [intel-linux-intel-lts:4.19/android 2/2] sound/soc/intel/skylake/skl-sst-ipc.c:506:28: sparse: sparse: incorrect type in argument 1 (different address spaces) kernel test robot
2021-03-07 11:29 kernel test robot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.