* sound/pci/au88x0/au88x0_core.c:2029 vortex_adb_checkinout() warn: signedness bug returning '(-22)'
@ 2020-10-09 12:00 kernel test robot
2020-10-09 16:19 ` Luc Van Oostenryck
0 siblings, 1 reply; 6+ messages in thread
From: kernel test robot @ 2020-10-09 12:00 UTC (permalink / raw)
To: kbuild, Luc Van Oostenryck
Cc: lkp, Dan Carpenter, kbuild-all, linux-kernel, Masahiro Yamada
[-- Attachment #1: Type: text/plain, Size: 5045 bytes --]
Hi Luc,
First bad commit (maybe != root cause):
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: c85fb28b6f999db9928b841f63f1beeb3074eeca
commit: 80591e61a0f7e88deaada69844e4a31280c4a38f kbuild: tell sparse about the $ARCH
config: powerpc64-randconfig-m031-20201008 (attached as .config)
compiler: powerpc-linux-gcc (GCC) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
New smatch warnings:
sound/pci/au88x0/au88x0_core.c:2029 vortex_adb_checkinout() warn: signedness bug returning '(-22)'
sound/pci/rme9652/hdsp.c:4085 snd_hdsp_channel_info() warn: impossible condition '(hdsp->channel_map[channel] < 0) => (0-255 < 0)'
Old smatch warnings:
sound/pci/au88x0/au88x0_core.c:2046 vortex_adb_checkinout() warn: signedness bug returning '(-12)'
sound/pci/rme9652/hdsp.c:3338 snd_hdsp_proc_read() warn: argument 5 to %lx specifier is cast from pointer
sound/pci/rme9652/hdsp.c:5305 snd_hdsp_create() warn: 'hdsp->iobase' not released on lines: 5237.
sound/pci/rme9652/hdsp.c:5305 snd_hdsp_create() warn: 'pci' not released on lines: 5237.
vim +2029 sound/pci/au88x0/au88x0_core.c
^1da177e4c3f415 Linus Torvalds 2005-04-16 2001 static char
^^^^
Is char unsigned on PowerPC? I thought that was only on s390.
^1da177e4c3f415 Linus Torvalds 2005-04-16 2002 vortex_adb_checkinout(vortex_t * vortex, int resmap[], int out, int restype)
^1da177e4c3f415 Linus Torvalds 2005-04-16 2003 {
^1da177e4c3f415 Linus Torvalds 2005-04-16 2004 int i, qty = resnum[restype], resinuse = 0;
^1da177e4c3f415 Linus Torvalds 2005-04-16 2005
^1da177e4c3f415 Linus Torvalds 2005-04-16 2006 if (out) {
^1da177e4c3f415 Linus Torvalds 2005-04-16 2007 /* Gather used resources by all streams. */
^1da177e4c3f415 Linus Torvalds 2005-04-16 2008 for (i = 0; i < NR_ADB; i++) {
^1da177e4c3f415 Linus Torvalds 2005-04-16 2009 resinuse |= vortex->dma_adb[i].resources[restype];
^1da177e4c3f415 Linus Torvalds 2005-04-16 2010 }
^1da177e4c3f415 Linus Torvalds 2005-04-16 2011 resinuse |= vortex->fixed_res[restype];
^1da177e4c3f415 Linus Torvalds 2005-04-16 2012 /* Find and take free resource. */
^1da177e4c3f415 Linus Torvalds 2005-04-16 2013 for (i = 0; i < qty; i++) {
^1da177e4c3f415 Linus Torvalds 2005-04-16 2014 if ((resinuse & (1 << i)) == 0) {
^1da177e4c3f415 Linus Torvalds 2005-04-16 2015 if (resmap != NULL)
^1da177e4c3f415 Linus Torvalds 2005-04-16 2016 resmap[restype] |= (1 << i);
^1da177e4c3f415 Linus Torvalds 2005-04-16 2017 else
^1da177e4c3f415 Linus Torvalds 2005-04-16 2018 vortex->dma_adb[i].resources[restype] |= (1 << i);
ee419653a38de93 Takashi Iwai 2009-02-05 2019 /*
e7e69265b626976 Sudip Mukherjee 2014-09-08 2020 pr_debug(
ee419653a38de93 Takashi Iwai 2009-02-05 2021 "vortex: ResManager: type %d out %d\n",
ee419653a38de93 Takashi Iwai 2009-02-05 2022 restype, i);
ee419653a38de93 Takashi Iwai 2009-02-05 2023 */
^1da177e4c3f415 Linus Torvalds 2005-04-16 2024 return i;
^1da177e4c3f415 Linus Torvalds 2005-04-16 2025 }
^1da177e4c3f415 Linus Torvalds 2005-04-16 2026 }
^1da177e4c3f415 Linus Torvalds 2005-04-16 2027 } else {
^1da177e4c3f415 Linus Torvalds 2005-04-16 2028 if (resmap == NULL)
^1da177e4c3f415 Linus Torvalds 2005-04-16 @2029 return -EINVAL;
^^^^^^^^^^^^^^^
^1da177e4c3f415 Linus Torvalds 2005-04-16 2030 /* Checkin first resource of type restype. */
^1da177e4c3f415 Linus Torvalds 2005-04-16 2031 for (i = 0; i < qty; i++) {
^1da177e4c3f415 Linus Torvalds 2005-04-16 2032 if (resmap[restype] & (1 << i)) {
^1da177e4c3f415 Linus Torvalds 2005-04-16 2033 resmap[restype] &= ~(1 << i);
ee419653a38de93 Takashi Iwai 2009-02-05 2034 /*
e7e69265b626976 Sudip Mukherjee 2014-09-08 2035 pr_debug(
ee419653a38de93 Takashi Iwai 2009-02-05 2036 "vortex: ResManager: type %d in %d\n",
ee419653a38de93 Takashi Iwai 2009-02-05 2037 restype, i);
ee419653a38de93 Takashi Iwai 2009-02-05 2038 */
^1da177e4c3f415 Linus Torvalds 2005-04-16 2039 return i;
^1da177e4c3f415 Linus Torvalds 2005-04-16 2040 }
^1da177e4c3f415 Linus Torvalds 2005-04-16 2041 }
^1da177e4c3f415 Linus Torvalds 2005-04-16 2042 }
70c84418bf74f58 Sudip Mukherjee 2014-10-13 2043 dev_err(vortex->card->dev,
70c84418bf74f58 Sudip Mukherjee 2014-10-13 2044 "FATAL: ResManager: resource type %d exhausted.\n",
70c84418bf74f58 Sudip Mukherjee 2014-10-13 2045 restype);
^1da177e4c3f415 Linus Torvalds 2005-04-16 2046 return -ENOMEM;
^1da177e4c3f415 Linus Torvalds 2005-04-16 2047 }
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 28999 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: sound/pci/au88x0/au88x0_core.c:2029 vortex_adb_checkinout() warn: signedness bug returning '(-22)'
2020-10-09 12:00 sound/pci/au88x0/au88x0_core.c:2029 vortex_adb_checkinout() warn: signedness bug returning '(-22)' kernel test robot
2020-10-09 16:19 ` Luc Van Oostenryck
@ 2020-10-09 16:19 ` Luc Van Oostenryck
0 siblings, 0 replies; 6+ messages in thread
From: Luc Van Oostenryck @ 2020-10-09 16:19 UTC (permalink / raw)
To: kbuild
[-- Attachment #1: Type: text/plain, Size: 1787 bytes --]
On Fri, Oct 09, 2020 at 03:00:43PM +0300, kernel test robot wrote:
> Hi Luc,
>
> First bad commit (maybe != root cause):
>
> tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> head: c85fb28b6f999db9928b841f63f1beeb3074eeca
> commit: 80591e61a0f7e88deaada69844e4a31280c4a38f kbuild: tell sparse about the $ARCH
> config: powerpc64-randconfig-m031-20201008 (attached as .config)
> compiler: powerpc-linux-gcc (GCC) 9.3.0
>
> If you fix the issue, kindly add following tag as appropriate
> Reported-by: kernel test robot <lkp@intel.com>
> Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
>
> New smatch warnings:
> sound/pci/au88x0/au88x0_core.c:2029 vortex_adb_checkinout() warn: signedness bug returning '(-22)'
> sound/pci/rme9652/hdsp.c:4085 snd_hdsp_channel_info() warn: impossible condition '(hdsp->channel_map[channel] < 0) => (0-255 < 0)'
>
> Old smatch warnings:
> sound/pci/au88x0/au88x0_core.c:2046 vortex_adb_checkinout() warn: signedness bug returning '(-12)'
> sound/pci/rme9652/hdsp.c:3338 snd_hdsp_proc_read() warn: argument 5 to %lx specifier is cast from pointer
> sound/pci/rme9652/hdsp.c:5305 snd_hdsp_create() warn: 'hdsp->iobase' not released on lines: 5237.
> sound/pci/rme9652/hdsp.c:5305 snd_hdsp_create() warn: 'pci' not released on lines: 5237.
>
> vim +2029 sound/pci/au88x0/au88x0_core.c
>
> ^1da177e4c3f415 Linus Torvalds 2005-04-16 2001 static char
> ^^^^
> Is char unsigned on PowerPC? I thought that was only on s390.
All PowerPC machines or cross compiler I have access to give me:
$ gcc -E -dD -o - - < /dev/null | grep __CHAR_UNSIGNED__
#define __CHAR_UNSIGNED__ 1
and the PPC ABI requires it so.
-- Luc
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: sound/pci/au88x0/au88x0_core.c:2029 vortex_adb_checkinout() warn: signedness bug returning '(-22)'
@ 2020-10-09 16:19 ` Luc Van Oostenryck
0 siblings, 0 replies; 6+ messages in thread
From: Luc Van Oostenryck @ 2020-10-09 16:19 UTC (permalink / raw)
To: kernel test robot
Cc: kbuild, Dan Carpenter, kbuild-all, linux-kernel, Masahiro Yamada
On Fri, Oct 09, 2020 at 03:00:43PM +0300, kernel test robot wrote:
> Hi Luc,
>
> First bad commit (maybe != root cause):
>
> tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> head: c85fb28b6f999db9928b841f63f1beeb3074eeca
> commit: 80591e61a0f7e88deaada69844e4a31280c4a38f kbuild: tell sparse about the $ARCH
> config: powerpc64-randconfig-m031-20201008 (attached as .config)
> compiler: powerpc-linux-gcc (GCC) 9.3.0
>
> If you fix the issue, kindly add following tag as appropriate
> Reported-by: kernel test robot <lkp@intel.com>
> Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
>
> New smatch warnings:
> sound/pci/au88x0/au88x0_core.c:2029 vortex_adb_checkinout() warn: signedness bug returning '(-22)'
> sound/pci/rme9652/hdsp.c:4085 snd_hdsp_channel_info() warn: impossible condition '(hdsp->channel_map[channel] < 0) => (0-255 < 0)'
>
> Old smatch warnings:
> sound/pci/au88x0/au88x0_core.c:2046 vortex_adb_checkinout() warn: signedness bug returning '(-12)'
> sound/pci/rme9652/hdsp.c:3338 snd_hdsp_proc_read() warn: argument 5 to %lx specifier is cast from pointer
> sound/pci/rme9652/hdsp.c:5305 snd_hdsp_create() warn: 'hdsp->iobase' not released on lines: 5237.
> sound/pci/rme9652/hdsp.c:5305 snd_hdsp_create() warn: 'pci' not released on lines: 5237.
>
> vim +2029 sound/pci/au88x0/au88x0_core.c
>
> ^1da177e4c3f415 Linus Torvalds 2005-04-16 2001 static char
> ^^^^
> Is char unsigned on PowerPC? I thought that was only on s390.
All PowerPC machines or cross compiler I have access to give me:
$ gcc -E -dD -o - - < /dev/null | grep __CHAR_UNSIGNED__
#define __CHAR_UNSIGNED__ 1
and the PPC ABI requires it so.
-- Luc
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: sound/pci/au88x0/au88x0_core.c:2029 vortex_adb_checkinout() warn: signedness bug returning '(-22)'
@ 2020-10-09 16:19 ` Luc Van Oostenryck
0 siblings, 0 replies; 6+ messages in thread
From: Luc Van Oostenryck @ 2020-10-09 16:19 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 1787 bytes --]
On Fri, Oct 09, 2020 at 03:00:43PM +0300, kernel test robot wrote:
> Hi Luc,
>
> First bad commit (maybe != root cause):
>
> tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> head: c85fb28b6f999db9928b841f63f1beeb3074eeca
> commit: 80591e61a0f7e88deaada69844e4a31280c4a38f kbuild: tell sparse about the $ARCH
> config: powerpc64-randconfig-m031-20201008 (attached as .config)
> compiler: powerpc-linux-gcc (GCC) 9.3.0
>
> If you fix the issue, kindly add following tag as appropriate
> Reported-by: kernel test robot <lkp@intel.com>
> Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
>
> New smatch warnings:
> sound/pci/au88x0/au88x0_core.c:2029 vortex_adb_checkinout() warn: signedness bug returning '(-22)'
> sound/pci/rme9652/hdsp.c:4085 snd_hdsp_channel_info() warn: impossible condition '(hdsp->channel_map[channel] < 0) => (0-255 < 0)'
>
> Old smatch warnings:
> sound/pci/au88x0/au88x0_core.c:2046 vortex_adb_checkinout() warn: signedness bug returning '(-12)'
> sound/pci/rme9652/hdsp.c:3338 snd_hdsp_proc_read() warn: argument 5 to %lx specifier is cast from pointer
> sound/pci/rme9652/hdsp.c:5305 snd_hdsp_create() warn: 'hdsp->iobase' not released on lines: 5237.
> sound/pci/rme9652/hdsp.c:5305 snd_hdsp_create() warn: 'pci' not released on lines: 5237.
>
> vim +2029 sound/pci/au88x0/au88x0_core.c
>
> ^1da177e4c3f415 Linus Torvalds 2005-04-16 2001 static char
> ^^^^
> Is char unsigned on PowerPC? I thought that was only on s390.
All PowerPC machines or cross compiler I have access to give me:
$ gcc -E -dD -o - - < /dev/null | grep __CHAR_UNSIGNED__
#define __CHAR_UNSIGNED__ 1
and the PPC ABI requires it so.
-- Luc
^ permalink raw reply [flat|nested] 6+ messages in thread
* sound/pci/au88x0/au88x0_core.c:2029 vortex_adb_checkinout() warn: signedness bug returning '(-22)'
@ 2020-10-08 7:24 kernel test robot
0 siblings, 0 replies; 6+ messages in thread
From: kernel test robot @ 2020-10-08 7:24 UTC (permalink / raw)
To: kbuild
[-- Attachment #1: Type: text/plain, Size: 6451 bytes --]
CC: kbuild-all(a)lists.01.org
CC: linux-kernel(a)vger.kernel.org
TO: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
CC: Masahiro Yamada <yamada.masahiro@socionext.com>
Hi Luc,
First bad commit (maybe != root cause):
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: c85fb28b6f999db9928b841f63f1beeb3074eeca
commit: 80591e61a0f7e88deaada69844e4a31280c4a38f kbuild: tell sparse about the $ARCH
date: 11 months ago
:::::: branch date: 2 days ago
:::::: commit date: 11 months ago
config: powerpc64-randconfig-m031-20201008 (attached as .config)
compiler: powerpc-linux-gcc (GCC) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
New smatch warnings:
sound/pci/au88x0/au88x0_core.c:2029 vortex_adb_checkinout() warn: signedness bug returning '(-22)'
sound/pci/rme9652/hdsp.c:4085 snd_hdsp_channel_info() warn: impossible condition '(hdsp->channel_map[channel] < 0) => (0-255 < 0)'
Old smatch warnings:
sound/pci/au88x0/au88x0_core.c:2046 vortex_adb_checkinout() warn: signedness bug returning '(-12)'
sound/pci/rme9652/hdsp.c:3338 snd_hdsp_proc_read() warn: argument 5 to %lx specifier is cast from pointer
sound/pci/rme9652/hdsp.c:5305 snd_hdsp_create() warn: 'hdsp->iobase' not released on lines: 5237.
sound/pci/rme9652/hdsp.c:5305 snd_hdsp_create() warn: 'pci' not released on lines: 5237.
vim +2029 sound/pci/au88x0/au88x0_core.c
^1da177e4c3f415 Linus Torvalds 2005-04-16 1990
^1da177e4c3f415 Linus Torvalds 2005-04-16 1991 /* Resource manager */
^1da177e4c3f415 Linus Torvalds 2005-04-16 1992 static int resnum[VORTEX_RESOURCE_LAST] =
^1da177e4c3f415 Linus Torvalds 2005-04-16 1993 { NR_ADB, NR_SRC, NR_MIXIN, NR_MIXOUT, NR_A3D };
^1da177e4c3f415 Linus Torvalds 2005-04-16 1994 /*
^1da177e4c3f415 Linus Torvalds 2005-04-16 1995 Checkout/Checkin resource of given type.
^1da177e4c3f415 Linus Torvalds 2005-04-16 1996 resmap: resource map to be used. If NULL means that we want to allocate
^1da177e4c3f415 Linus Torvalds 2005-04-16 1997 a DMA resource (root of all other resources of a dma channel).
^1da177e4c3f415 Linus Torvalds 2005-04-16 1998 out: Mean checkout if != 0. Else mean Checkin resource.
^1da177e4c3f415 Linus Torvalds 2005-04-16 1999 restype: Indicates type of resource to be checked in or out.
^1da177e4c3f415 Linus Torvalds 2005-04-16 2000 */
^1da177e4c3f415 Linus Torvalds 2005-04-16 2001 static char
^1da177e4c3f415 Linus Torvalds 2005-04-16 2002 vortex_adb_checkinout(vortex_t * vortex, int resmap[], int out, int restype)
^1da177e4c3f415 Linus Torvalds 2005-04-16 2003 {
^1da177e4c3f415 Linus Torvalds 2005-04-16 2004 int i, qty = resnum[restype], resinuse = 0;
^1da177e4c3f415 Linus Torvalds 2005-04-16 2005
^1da177e4c3f415 Linus Torvalds 2005-04-16 2006 if (out) {
^1da177e4c3f415 Linus Torvalds 2005-04-16 2007 /* Gather used resources by all streams. */
^1da177e4c3f415 Linus Torvalds 2005-04-16 2008 for (i = 0; i < NR_ADB; i++) {
^1da177e4c3f415 Linus Torvalds 2005-04-16 2009 resinuse |= vortex->dma_adb[i].resources[restype];
^1da177e4c3f415 Linus Torvalds 2005-04-16 2010 }
^1da177e4c3f415 Linus Torvalds 2005-04-16 2011 resinuse |= vortex->fixed_res[restype];
^1da177e4c3f415 Linus Torvalds 2005-04-16 2012 /* Find and take free resource. */
^1da177e4c3f415 Linus Torvalds 2005-04-16 2013 for (i = 0; i < qty; i++) {
^1da177e4c3f415 Linus Torvalds 2005-04-16 2014 if ((resinuse & (1 << i)) == 0) {
^1da177e4c3f415 Linus Torvalds 2005-04-16 2015 if (resmap != NULL)
^1da177e4c3f415 Linus Torvalds 2005-04-16 2016 resmap[restype] |= (1 << i);
^1da177e4c3f415 Linus Torvalds 2005-04-16 2017 else
^1da177e4c3f415 Linus Torvalds 2005-04-16 2018 vortex->dma_adb[i].resources[restype] |= (1 << i);
ee419653a38de93 Takashi Iwai 2009-02-05 2019 /*
e7e69265b626976 Sudip Mukherjee 2014-09-08 2020 pr_debug(
ee419653a38de93 Takashi Iwai 2009-02-05 2021 "vortex: ResManager: type %d out %d\n",
ee419653a38de93 Takashi Iwai 2009-02-05 2022 restype, i);
ee419653a38de93 Takashi Iwai 2009-02-05 2023 */
^1da177e4c3f415 Linus Torvalds 2005-04-16 2024 return i;
^1da177e4c3f415 Linus Torvalds 2005-04-16 2025 }
^1da177e4c3f415 Linus Torvalds 2005-04-16 2026 }
^1da177e4c3f415 Linus Torvalds 2005-04-16 2027 } else {
^1da177e4c3f415 Linus Torvalds 2005-04-16 2028 if (resmap == NULL)
^1da177e4c3f415 Linus Torvalds 2005-04-16 @2029 return -EINVAL;
^1da177e4c3f415 Linus Torvalds 2005-04-16 2030 /* Checkin first resource of type restype. */
^1da177e4c3f415 Linus Torvalds 2005-04-16 2031 for (i = 0; i < qty; i++) {
^1da177e4c3f415 Linus Torvalds 2005-04-16 2032 if (resmap[restype] & (1 << i)) {
^1da177e4c3f415 Linus Torvalds 2005-04-16 2033 resmap[restype] &= ~(1 << i);
ee419653a38de93 Takashi Iwai 2009-02-05 2034 /*
e7e69265b626976 Sudip Mukherjee 2014-09-08 2035 pr_debug(
ee419653a38de93 Takashi Iwai 2009-02-05 2036 "vortex: ResManager: type %d in %d\n",
ee419653a38de93 Takashi Iwai 2009-02-05 2037 restype, i);
ee419653a38de93 Takashi Iwai 2009-02-05 2038 */
^1da177e4c3f415 Linus Torvalds 2005-04-16 2039 return i;
^1da177e4c3f415 Linus Torvalds 2005-04-16 2040 }
^1da177e4c3f415 Linus Torvalds 2005-04-16 2041 }
^1da177e4c3f415 Linus Torvalds 2005-04-16 2042 }
70c84418bf74f58 Sudip Mukherjee 2014-10-13 2043 dev_err(vortex->card->dev,
70c84418bf74f58 Sudip Mukherjee 2014-10-13 2044 "FATAL: ResManager: resource type %d exhausted.\n",
70c84418bf74f58 Sudip Mukherjee 2014-10-13 2045 restype);
^1da177e4c3f415 Linus Torvalds 2005-04-16 2046 return -ENOMEM;
^1da177e4c3f415 Linus Torvalds 2005-04-16 2047 }
^1da177e4c3f415 Linus Torvalds 2005-04-16 2048
:::::: The code at line 2029 was first introduced by commit
:::::: 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 Linux-2.6.12-rc2
:::::: TO: Linus Torvalds <torvalds@ppc970.osdl.org>
:::::: CC: Linus Torvalds <torvalds@ppc970.osdl.org>
---
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: 28999 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread* sound/pci/au88x0/au88x0_core.c:2029 vortex_adb_checkinout() warn: signedness bug returning '(-22)'
@ 2020-08-22 23:59 kernel test robot
0 siblings, 0 replies; 6+ messages in thread
From: kernel test robot @ 2020-08-22 23:59 UTC (permalink / raw)
To: kbuild
[-- Attachment #1: Type: text/plain, Size: 6673 bytes --]
CC: kbuild-all(a)lists.01.org
CC: linux-kernel(a)vger.kernel.org
TO: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
CC: Masahiro Yamada <yamada.masahiro@socionext.com>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: c3d8f220d01220a5b253e422be407d068dc65511
commit: 80591e61a0f7e88deaada69844e4a31280c4a38f kbuild: tell sparse about the $ARCH
date: 9 months ago
:::::: branch date: 7 hours ago
:::::: commit date: 9 months ago
config: riscv-randconfig-m031-20200823 (attached as .config)
compiler: riscv64-linux-gcc (GCC) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
New smatch warnings:
sound/pci/au88x0/au88x0_core.c:2029 vortex_adb_checkinout() warn: signedness bug returning '(-22)'
sound/pci/rme9652/hdsp.c:4085 snd_hdsp_channel_info() warn: impossible condition '(hdsp->channel_map[channel] < 0) => (0-255 < 0)'
Old smatch warnings:
arch/riscv/include/asm/current.h:30 get_current() error: uninitialized symbol 'tp'.
sound/pci/au88x0/au88x0_core.c:2046 vortex_adb_checkinout() warn: signedness bug returning '(-12)'
arch/riscv/include/asm/current.h:30 get_current() error: uninitialized symbol 'tp'.
sound/pci/rme9652/hdsp.c:3338 snd_hdsp_proc_read() warn: argument 5 to %lx specifier is cast from pointer
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=80591e61a0f7e88deaada69844e4a31280c4a38f
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 80591e61a0f7e88deaada69844e4a31280c4a38f
vim +2029 sound/pci/au88x0/au88x0_core.c
^1da177e4c3f415 Linus Torvalds 2005-04-16 1990
^1da177e4c3f415 Linus Torvalds 2005-04-16 1991 /* Resource manager */
^1da177e4c3f415 Linus Torvalds 2005-04-16 1992 static int resnum[VORTEX_RESOURCE_LAST] =
^1da177e4c3f415 Linus Torvalds 2005-04-16 1993 { NR_ADB, NR_SRC, NR_MIXIN, NR_MIXOUT, NR_A3D };
^1da177e4c3f415 Linus Torvalds 2005-04-16 1994 /*
^1da177e4c3f415 Linus Torvalds 2005-04-16 1995 Checkout/Checkin resource of given type.
^1da177e4c3f415 Linus Torvalds 2005-04-16 1996 resmap: resource map to be used. If NULL means that we want to allocate
^1da177e4c3f415 Linus Torvalds 2005-04-16 1997 a DMA resource (root of all other resources of a dma channel).
^1da177e4c3f415 Linus Torvalds 2005-04-16 1998 out: Mean checkout if != 0. Else mean Checkin resource.
^1da177e4c3f415 Linus Torvalds 2005-04-16 1999 restype: Indicates type of resource to be checked in or out.
^1da177e4c3f415 Linus Torvalds 2005-04-16 2000 */
^1da177e4c3f415 Linus Torvalds 2005-04-16 2001 static char
^1da177e4c3f415 Linus Torvalds 2005-04-16 2002 vortex_adb_checkinout(vortex_t * vortex, int resmap[], int out, int restype)
^1da177e4c3f415 Linus Torvalds 2005-04-16 2003 {
^1da177e4c3f415 Linus Torvalds 2005-04-16 2004 int i, qty = resnum[restype], resinuse = 0;
^1da177e4c3f415 Linus Torvalds 2005-04-16 2005
^1da177e4c3f415 Linus Torvalds 2005-04-16 2006 if (out) {
^1da177e4c3f415 Linus Torvalds 2005-04-16 2007 /* Gather used resources by all streams. */
^1da177e4c3f415 Linus Torvalds 2005-04-16 2008 for (i = 0; i < NR_ADB; i++) {
^1da177e4c3f415 Linus Torvalds 2005-04-16 2009 resinuse |= vortex->dma_adb[i].resources[restype];
^1da177e4c3f415 Linus Torvalds 2005-04-16 2010 }
^1da177e4c3f415 Linus Torvalds 2005-04-16 2011 resinuse |= vortex->fixed_res[restype];
^1da177e4c3f415 Linus Torvalds 2005-04-16 2012 /* Find and take free resource. */
^1da177e4c3f415 Linus Torvalds 2005-04-16 2013 for (i = 0; i < qty; i++) {
^1da177e4c3f415 Linus Torvalds 2005-04-16 2014 if ((resinuse & (1 << i)) == 0) {
^1da177e4c3f415 Linus Torvalds 2005-04-16 2015 if (resmap != NULL)
^1da177e4c3f415 Linus Torvalds 2005-04-16 2016 resmap[restype] |= (1 << i);
^1da177e4c3f415 Linus Torvalds 2005-04-16 2017 else
^1da177e4c3f415 Linus Torvalds 2005-04-16 2018 vortex->dma_adb[i].resources[restype] |= (1 << i);
ee419653a38de93 Takashi Iwai 2009-02-05 2019 /*
e7e69265b626976 Sudip Mukherjee 2014-09-08 2020 pr_debug(
ee419653a38de93 Takashi Iwai 2009-02-05 2021 "vortex: ResManager: type %d out %d\n",
ee419653a38de93 Takashi Iwai 2009-02-05 2022 restype, i);
ee419653a38de93 Takashi Iwai 2009-02-05 2023 */
^1da177e4c3f415 Linus Torvalds 2005-04-16 2024 return i;
^1da177e4c3f415 Linus Torvalds 2005-04-16 2025 }
^1da177e4c3f415 Linus Torvalds 2005-04-16 2026 }
^1da177e4c3f415 Linus Torvalds 2005-04-16 2027 } else {
^1da177e4c3f415 Linus Torvalds 2005-04-16 2028 if (resmap == NULL)
^1da177e4c3f415 Linus Torvalds 2005-04-16 @2029 return -EINVAL;
^1da177e4c3f415 Linus Torvalds 2005-04-16 2030 /* Checkin first resource of type restype. */
^1da177e4c3f415 Linus Torvalds 2005-04-16 2031 for (i = 0; i < qty; i++) {
^1da177e4c3f415 Linus Torvalds 2005-04-16 2032 if (resmap[restype] & (1 << i)) {
^1da177e4c3f415 Linus Torvalds 2005-04-16 2033 resmap[restype] &= ~(1 << i);
ee419653a38de93 Takashi Iwai 2009-02-05 2034 /*
e7e69265b626976 Sudip Mukherjee 2014-09-08 2035 pr_debug(
ee419653a38de93 Takashi Iwai 2009-02-05 2036 "vortex: ResManager: type %d in %d\n",
ee419653a38de93 Takashi Iwai 2009-02-05 2037 restype, i);
ee419653a38de93 Takashi Iwai 2009-02-05 2038 */
^1da177e4c3f415 Linus Torvalds 2005-04-16 2039 return i;
^1da177e4c3f415 Linus Torvalds 2005-04-16 2040 }
^1da177e4c3f415 Linus Torvalds 2005-04-16 2041 }
^1da177e4c3f415 Linus Torvalds 2005-04-16 2042 }
70c84418bf74f58 Sudip Mukherjee 2014-10-13 2043 dev_err(vortex->card->dev,
70c84418bf74f58 Sudip Mukherjee 2014-10-13 2044 "FATAL: ResManager: resource type %d exhausted.\n",
70c84418bf74f58 Sudip Mukherjee 2014-10-13 2045 restype);
^1da177e4c3f415 Linus Torvalds 2005-04-16 2046 return -ENOMEM;
^1da177e4c3f415 Linus Torvalds 2005-04-16 2047 }
^1da177e4c3f415 Linus Torvalds 2005-04-16 2048
:::::: The code at line 2029 was first introduced by commit
:::::: 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 Linux-2.6.12-rc2
:::::: TO: Linus Torvalds <torvalds@ppc970.osdl.org>
:::::: CC: Linus Torvalds <torvalds@ppc970.osdl.org>
---
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: 28727 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2020-10-09 16:19 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-10-09 12:00 sound/pci/au88x0/au88x0_core.c:2029 vortex_adb_checkinout() warn: signedness bug returning '(-22)' kernel test robot
2020-10-09 16:19 ` Luc Van Oostenryck
2020-10-09 16:19 ` Luc Van Oostenryck
2020-10-09 16:19 ` Luc Van Oostenryck
-- strict thread matches above, loose matches on Subject: below --
2020-10-08 7:24 kernel test robot
2020-08-22 23:59 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.