drivers/soundwire/stream.c:260:12: warning: stack frame size of 2832 bytes in function 'sdw_program_port_params'

From: kernel test robot
Date: Sun Feb 07 2021 - 21:25:40 EST


tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 61556703b610a104de324e4f061dc6cf7b218b46
commit: 41ff91741c25d4987bf0405fa219b9eb339f24ee soundwire: stream: use FIELD_{GET|PREP}
date: 5 months ago
config: powerpc64-randconfig-r014-20210207 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project c9439ca36342fb6013187d0a69aef92736951476)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install powerpc64 cross compiling tool for clang build
# apt-get install binutils-powerpc64-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=41ff91741c25d4987bf0405fa219b9eb339f24ee
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 41ff91741c25d4987bf0405fa219b9eb339f24ee
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=powerpc64

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

All warnings (new ones prefixed by >>):

In file included from drivers/soundwire/stream.c:16:
In file included from include/sound/soc.h:18:
In file included from include/linux/interrupt.h:11:
In file included from include/linux/hardirq.h:10:
In file included from arch/powerpc/include/asm/hardirq.h:6:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:604:
arch/powerpc/include/asm/io-defs.h:45:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(insw, (unsigned long p, void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:601:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:194:1: note: expanded from here
__do_insw
^
arch/powerpc/include/asm/io.h:542:56: note: expanded from macro '__do_insw'
#define __do_insw(p, b, n) readsw((PCI_IO_ADDR)_IO_BASE+(p), (b), (n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from drivers/soundwire/stream.c:16:
In file included from include/sound/soc.h:18:
In file included from include/linux/interrupt.h:11:
In file included from include/linux/hardirq.h:10:
In file included from arch/powerpc/include/asm/hardirq.h:6:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:604:
arch/powerpc/include/asm/io-defs.h:47:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(insl, (unsigned long p, void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:601:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:199:1: note: expanded from here
__do_insl
^
arch/powerpc/include/asm/io.h:543:56: note: expanded from macro '__do_insl'
#define __do_insl(p, b, n) readsl((PCI_IO_ADDR)_IO_BASE+(p), (b), (n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from drivers/soundwire/stream.c:16:
In file included from include/sound/soc.h:18:
In file included from include/linux/interrupt.h:11:
In file included from include/linux/hardirq.h:10:
In file included from arch/powerpc/include/asm/hardirq.h:6:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:604:
arch/powerpc/include/asm/io-defs.h:49:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(outsb, (unsigned long p, const void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:601:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:204:1: note: expanded from here
__do_outsb
^
arch/powerpc/include/asm/io.h:544:58: note: expanded from macro '__do_outsb'
#define __do_outsb(p, b, n) writesb((PCI_IO_ADDR)_IO_BASE+(p),(b),(n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from drivers/soundwire/stream.c:16:
In file included from include/sound/soc.h:18:
In file included from include/linux/interrupt.h:11:
In file included from include/linux/hardirq.h:10:
In file included from arch/powerpc/include/asm/hardirq.h:6:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:604:
arch/powerpc/include/asm/io-defs.h:51:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(outsw, (unsigned long p, const void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:601:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:209:1: note: expanded from here
__do_outsw
^
arch/powerpc/include/asm/io.h:545:58: note: expanded from macro '__do_outsw'
#define __do_outsw(p, b, n) writesw((PCI_IO_ADDR)_IO_BASE+(p),(b),(n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from drivers/soundwire/stream.c:16:
In file included from include/sound/soc.h:18:
In file included from include/linux/interrupt.h:11:
In file included from include/linux/hardirq.h:10:
In file included from arch/powerpc/include/asm/hardirq.h:6:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:604:
arch/powerpc/include/asm/io-defs.h:53:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(outsl, (unsigned long p, const void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:601:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:214:1: note: expanded from here
__do_outsl
^
arch/powerpc/include/asm/io.h:546:58: note: expanded from macro '__do_outsl'
#define __do_outsl(p, b, n) writesl((PCI_IO_ADDR)_IO_BASE+(p),(b),(n))
~~~~~~~~~~~~~~~~~~~~~^
>> drivers/soundwire/stream.c:260:12: warning: stack frame size of 2832 bytes in function 'sdw_program_port_params' [-Wframe-larger-than=]
static int sdw_program_port_params(struct sdw_master_runtime *m_rt)
^
13 warnings generated.


vim +/sdw_program_port_params +260 drivers/soundwire/stream.c

f8101c74aa542b Sanyog Kale 2018-04-26 253
f8101c74aa542b Sanyog Kale 2018-04-26 254 /**
f8101c74aa542b Sanyog Kale 2018-04-26 255 * sdw_program_port_params() - Programs transport parameters of Master(s)
f8101c74aa542b Sanyog Kale 2018-04-26 256 * and Slave(s)
f8101c74aa542b Sanyog Kale 2018-04-26 257 *
f8101c74aa542b Sanyog Kale 2018-04-26 258 * @m_rt: Master stream runtime
f8101c74aa542b Sanyog Kale 2018-04-26 259 */
f8101c74aa542b Sanyog Kale 2018-04-26 @260 static int sdw_program_port_params(struct sdw_master_runtime *m_rt)
f8101c74aa542b Sanyog Kale 2018-04-26 261 {
f8101c74aa542b Sanyog Kale 2018-04-26 262 struct sdw_slave_runtime *s_rt = NULL;
f8101c74aa542b Sanyog Kale 2018-04-26 263 struct sdw_bus *bus = m_rt->bus;
f8101c74aa542b Sanyog Kale 2018-04-26 264 struct sdw_port_runtime *p_rt;
f8101c74aa542b Sanyog Kale 2018-04-26 265 int ret = 0;
f8101c74aa542b Sanyog Kale 2018-04-26 266
f8101c74aa542b Sanyog Kale 2018-04-26 267 /* Program transport & port parameters for Slave(s) */
f8101c74aa542b Sanyog Kale 2018-04-26 268 list_for_each_entry(s_rt, &m_rt->slave_rt_list, m_rt_node) {
f8101c74aa542b Sanyog Kale 2018-04-26 269 list_for_each_entry(p_rt, &s_rt->port_list, port_node) {
f8101c74aa542b Sanyog Kale 2018-04-26 270 ret = sdw_program_slave_port_params(bus, s_rt, p_rt);
f8101c74aa542b Sanyog Kale 2018-04-26 271 if (ret < 0)
f8101c74aa542b Sanyog Kale 2018-04-26 272 return ret;
f8101c74aa542b Sanyog Kale 2018-04-26 273 }
f8101c74aa542b Sanyog Kale 2018-04-26 274 }
f8101c74aa542b Sanyog Kale 2018-04-26 275
f8101c74aa542b Sanyog Kale 2018-04-26 276 /* Program transport & port parameters for Master(s) */
f8101c74aa542b Sanyog Kale 2018-04-26 277 list_for_each_entry(p_rt, &m_rt->port_list, port_node) {
f8101c74aa542b Sanyog Kale 2018-04-26 278 ret = sdw_program_master_port_params(bus, p_rt);
f8101c74aa542b Sanyog Kale 2018-04-26 279 if (ret < 0)
f8101c74aa542b Sanyog Kale 2018-04-26 280 return ret;
f8101c74aa542b Sanyog Kale 2018-04-26 281 }
f8101c74aa542b Sanyog Kale 2018-04-26 282
f8101c74aa542b Sanyog Kale 2018-04-26 283 return 0;
f8101c74aa542b Sanyog Kale 2018-04-26 284 }
f8101c74aa542b Sanyog Kale 2018-04-26 285

:::::: The code at line 260 was first introduced by commit
:::::: f8101c74aa542b6e583513216176679a9e922b2f soundwire: Add Master and Slave port programming

:::::: TO: Sanyog Kale <sanyog.r.kale@xxxxxxxxx>
:::::: CC: Vinod Koul <vkoul@xxxxxxxxxx>

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

Attachment: .config.gz
Description: application/gzip