lkml.org 
[lkml]   [2021]   [Jan]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subjectdrivers/net/can/spi/mcp251xfd/mcp251xfd-core.c:2060:20: warning: stack frame size of 2496 bytes in function 'mcp251xfd_irq'
tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: e71ba9452f0b5b2e8dc8aa5445198cd9214a6a62
commit: eb79a267c9b3e608e7762a1b221428f37ace3aa3 can: mcp251xfd: rename all remaining occurrence to mcp251xfd
date: 3 months ago
config: powerpc64-randconfig-r021-20210104 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project 98cd1c33e3c2c3cfee36fb0fea3285fda06224d3)
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=eb79a267c9b3e608e7762a1b221428f37ace3aa3
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout eb79a267c9b3e608e7762a1b221428f37ace3aa3
# 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@intel.com>

All warnings (new ones prefixed by >>):

drivers/net/can/spi/mcp251xfd/mcp251xfd-core.c:511:1: warning: unused function 'mcp251xfd_chip_set_mode_nowait' [-Wunused-function]
mcp251xfd_chip_set_mode_nowait(const struct mcp251xfd_priv *priv,
^
>> drivers/net/can/spi/mcp251xfd/mcp251xfd-core.c:2060:20: warning: stack frame size of 2496 bytes in function 'mcp251xfd_irq' [-Wframe-larger-than=]
static irqreturn_t mcp251xfd_irq(int irq, void *dev_id)
^
2 warnings generated.

Kconfig warnings: (for reference only)
WARNING: unmet direct dependencies detected for HOTPLUG_PCI_POWERNV
Depends on PCI && HOTPLUG_PCI && PPC_POWERNV && EEH
Selected by
- OCXL && PPC_POWERNV && PCI && EEH


vim +/mcp251xfd_irq +2060 drivers/net/can/spi/mcp251xfd/mcp251xfd-core.c

2059
> 2060 static irqreturn_t mcp251xfd_irq(int irq, void *dev_id)
2061 {
2062 struct mcp251xfd_priv *priv = dev_id;
2063 irqreturn_t handled = IRQ_NONE;
2064 int err;
2065
2066 if (priv->rx_int)
2067 do {
2068 int rx_pending;
2069
2070 rx_pending = gpiod_get_value_cansleep(priv->rx_int);
2071 if (!rx_pending)
2072 break;
2073
2074 err = mcp251xfd_handle(priv, rxif);
2075 if (err)
2076 goto out_fail;
2077
2078 handled = IRQ_HANDLED;
2079 } while (1);
2080
2081 do {
2082 u32 intf_pending, intf_pending_clearable;
2083 bool set_normal_mode = false;
2084
2085 err = regmap_bulk_read(priv->map_reg, MCP251XFD_REG_INT,
2086 &priv->regs_status,
2087 sizeof(priv->regs_status) /
2088 sizeof(u32));
2089 if (err)
2090 goto out_fail;
2091
2092 intf_pending = FIELD_GET(MCP251XFD_REG_INT_IF_MASK,
2093 priv->regs_status.intf) &
2094 FIELD_GET(MCP251XFD_REG_INT_IE_MASK,
2095 priv->regs_status.intf);
2096
2097 if (!(intf_pending))
2098 return handled;
2099
2100 /* Some interrupts must be ACKed in the
2101 * MCP251XFD_REG_INT register.
2102 * - First ACK then handle, to avoid lost-IRQ race
2103 * condition on fast re-occurring interrupts.
2104 * - Write "0" to clear active IRQs, "1" to all other,
2105 * to avoid r/m/w race condition on the
2106 * MCP251XFD_REG_INT register.
2107 */
2108 intf_pending_clearable = intf_pending &
2109 MCP251XFD_REG_INT_IF_CLEARABLE_MASK;
2110 if (intf_pending_clearable) {
2111 err = regmap_update_bits(priv->map_reg,
2112 MCP251XFD_REG_INT,
2113 MCP251XFD_REG_INT_IF_MASK,
2114 ~intf_pending_clearable);
2115 if (err)
2116 goto out_fail;
2117 }
2118
2119 if (intf_pending & MCP251XFD_REG_INT_MODIF) {
2120 err = mcp251xfd_handle(priv, modif, &set_normal_mode);
2121 if (err)
2122 goto out_fail;
2123 }
2124
2125 if (intf_pending & MCP251XFD_REG_INT_RXIF) {
2126 err = mcp251xfd_handle(priv, rxif);
2127 if (err)
2128 goto out_fail;
2129 }
2130
2131 if (intf_pending & MCP251XFD_REG_INT_TEFIF) {
2132 err = mcp251xfd_handle(priv, tefif);
2133 if (err)
2134 goto out_fail;
2135 }
2136
2137 if (intf_pending & MCP251XFD_REG_INT_RXOVIF) {
2138 err = mcp251xfd_handle(priv, rxovif);
2139 if (err)
2140 goto out_fail;
2141 }
2142
2143 if (intf_pending & MCP251XFD_REG_INT_TXATIF) {
2144 err = mcp251xfd_handle(priv, txatif);
2145 if (err)
2146 goto out_fail;
2147 }
2148
2149 if (intf_pending & MCP251XFD_REG_INT_IVMIF) {
2150 err = mcp251xfd_handle(priv, ivmif);
2151 if (err)
2152 goto out_fail;
2153 }
2154
2155 if (intf_pending & MCP251XFD_REG_INT_SERRIF) {
2156 err = mcp251xfd_handle(priv, serrif);
2157 if (err)
2158 goto out_fail;
2159 }
2160
2161 if (intf_pending & MCP251XFD_REG_INT_ECCIF) {
2162 err = mcp251xfd_handle(priv, eccif, set_normal_mode);
2163 if (err)
2164 goto out_fail;
2165 }
2166
2167 if (intf_pending & MCP251XFD_REG_INT_SPICRCIF) {
2168 err = mcp251xfd_handle(priv, spicrcif);
2169 if (err)
2170 goto out_fail;
2171 }
2172
2173 /* On the MCP2527FD and MCP2518FD, we don't get a
2174 * CERRIF IRQ on the transition TX ERROR_WARNING -> TX
2175 * ERROR_ACTIVE.
2176 */
2177 if (intf_pending & MCP251XFD_REG_INT_CERRIF ||
2178 priv->can.state > CAN_STATE_ERROR_ACTIVE) {
2179 err = mcp251xfd_handle(priv, cerrif);
2180 if (err)
2181 goto out_fail;
2182
2183 /* In Bus Off we completely shut down the
2184 * controller. Every subsequent register read
2185 * will read bogus data, and if
2186 * MCP251XFD_QUIRK_CRC_REG is enabled the CRC
2187 * check will fail, too. So leave IRQ handler
2188 * directly.
2189 */
2190 if (priv->can.state == CAN_STATE_BUS_OFF)
2191 return IRQ_HANDLED;
2192 }
2193
2194 handled = IRQ_HANDLED;
2195 } while (1);
2196
2197 out_fail:
2198 netdev_err(priv->ndev, "IRQ handler returned %d (intf=0x%08x).\n",
2199 err, priv->regs_status.intf);
2200 mcp251xfd_chip_interrupts_disable(priv);
2201
2202 return handled;
2203 }
2204

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[unhandled content-type:application/gzip]
\
 
 \ /
  Last update: 2021-01-04 03:55    [W:0.030 / U:31.404 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site