[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202106181841.X5wKOSq1-lkp@intel.com>
Date: Fri, 18 Jun 2021 18:12:48 +0800
From: kernel test robot <lkp@...el.com>
To: Min Li <min.li.xe@...esas.com>
Cc: kbuild-all@...ts.01.org, clang-built-linux@...glegroups.com,
linux-kernel@...r.kernel.org
Subject: drivers/ptp/ptp_clockmatrix.c:2089:12: warning: stack frame size of
17952 bytes in function 'idtcm_probe'
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: fd0aa1a4567d0f09e1bfe367a950b004f99ac290
commit: 957ff4278e0db34f56c2bc121fdd6393e4523ef2 ptp: ptp_clockmatrix: use i2c_master_send for i2c write
date: 10 months ago
config: riscv-randconfig-r036-20210618 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 64720f57bea6a6bf033feef4a5751ab9c0c3b401)
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 riscv cross compiling tool for clang build
# apt-get install binutils-riscv64-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=957ff4278e0db34f56c2bc121fdd6393e4523ef2
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 957ff4278e0db34f56c2bc121fdd6393e4523ef2
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=riscv
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@...el.com>
All warnings (new ones prefixed by >>):
>> drivers/ptp/ptp_clockmatrix.c:2089:12: warning: stack frame size of 17952 bytes in function 'idtcm_probe' [-Wframe-larger-than=]
static int idtcm_probe(struct i2c_client *client,
^
>> drivers/ptp/ptp_clockmatrix.c:703:12: warning: stack frame size of 11328 bytes in function '_idtcm_settime' [-Wframe-larger-than=]
static int _idtcm_settime(struct idtcm_channel *channel,
^
2 warnings generated.
vim +/idtcm_probe +2089 drivers/ptp/ptp_clockmatrix.c
3a6ba7dc779935 Vincent Cheng 2019-10-31 2088
3a6ba7dc779935 Vincent Cheng 2019-10-31 @2089 static int idtcm_probe(struct i2c_client *client,
3a6ba7dc779935 Vincent Cheng 2019-10-31 2090 const struct i2c_device_id *id)
3a6ba7dc779935 Vincent Cheng 2019-10-31 2091 {
3a6ba7dc779935 Vincent Cheng 2019-10-31 2092 struct idtcm *idtcm;
3a6ba7dc779935 Vincent Cheng 2019-10-31 2093 int err;
3a6ba7dc779935 Vincent Cheng 2019-10-31 2094 u8 i;
7ea5fda2b1325e Min Li 2020-07-28 2095 char *fmt = "Failed at %d in line %s with channel output %d!\n";
3a6ba7dc779935 Vincent Cheng 2019-10-31 2096
3a6ba7dc779935 Vincent Cheng 2019-10-31 2097 /* Unused for now */
3a6ba7dc779935 Vincent Cheng 2019-10-31 2098 (void)id;
3a6ba7dc779935 Vincent Cheng 2019-10-31 2099
3a6ba7dc779935 Vincent Cheng 2019-10-31 2100 idtcm = devm_kzalloc(&client->dev, sizeof(struct idtcm), GFP_KERNEL);
3a6ba7dc779935 Vincent Cheng 2019-10-31 2101
3a6ba7dc779935 Vincent Cheng 2019-10-31 2102 if (!idtcm)
3a6ba7dc779935 Vincent Cheng 2019-10-31 2103 return -ENOMEM;
3a6ba7dc779935 Vincent Cheng 2019-10-31 2104
3a6ba7dc779935 Vincent Cheng 2019-10-31 2105 idtcm->client = client;
3a6ba7dc779935 Vincent Cheng 2019-10-31 2106 idtcm->page_offset = 0xff;
3a6ba7dc779935 Vincent Cheng 2019-10-31 2107 idtcm->calculate_overhead_flag = 0;
3a6ba7dc779935 Vincent Cheng 2019-10-31 2108
3a6ba7dc779935 Vincent Cheng 2019-10-31 2109 set_default_masks(idtcm);
3a6ba7dc779935 Vincent Cheng 2019-10-31 2110
3a6ba7dc779935 Vincent Cheng 2019-10-31 2111 mutex_init(&idtcm->reg_lock);
3a6ba7dc779935 Vincent Cheng 2019-10-31 2112 mutex_lock(&idtcm->reg_lock);
3a6ba7dc779935 Vincent Cheng 2019-10-31 2113
3a6ba7dc779935 Vincent Cheng 2019-10-31 2114 idtcm_display_version_info(idtcm);
3a6ba7dc779935 Vincent Cheng 2019-10-31 2115
3a6ba7dc779935 Vincent Cheng 2019-10-31 2116 err = idtcm_load_firmware(idtcm, &client->dev);
3a6ba7dc779935 Vincent Cheng 2019-10-31 2117
3a6ba7dc779935 Vincent Cheng 2019-10-31 2118 if (err)
3a6ba7dc779935 Vincent Cheng 2019-10-31 2119 dev_warn(&idtcm->client->dev,
3a6ba7dc779935 Vincent Cheng 2019-10-31 2120 "loading firmware failed with %d\n", err);
3a6ba7dc779935 Vincent Cheng 2019-10-31 2121
7ea5fda2b1325e Min Li 2020-07-28 2122 if (idtcm->tod_mask) {
7ea5fda2b1325e Min Li 2020-07-28 2123 for (i = 0; i < MAX_TOD; i++) {
7ea5fda2b1325e Min Li 2020-07-28 2124 if (idtcm->tod_mask & (1 << i)) {
3a6ba7dc779935 Vincent Cheng 2019-10-31 2125 err = idtcm_enable_channel(idtcm, i);
7ea5fda2b1325e Min Li 2020-07-28 2126 if (err) {
7ea5fda2b1325e Min Li 2020-07-28 2127 dev_err(&idtcm->client->dev,
7ea5fda2b1325e Min Li 2020-07-28 2128 fmt,
7ea5fda2b1325e Min Li 2020-07-28 2129 __LINE__,
7ea5fda2b1325e Min Li 2020-07-28 2130 __func__,
7ea5fda2b1325e Min Li 2020-07-28 2131 i);
3a6ba7dc779935 Vincent Cheng 2019-10-31 2132 break;
3a6ba7dc779935 Vincent Cheng 2019-10-31 2133 }
3a6ba7dc779935 Vincent Cheng 2019-10-31 2134 }
7ea5fda2b1325e Min Li 2020-07-28 2135 }
3a6ba7dc779935 Vincent Cheng 2019-10-31 2136 } else {
3a6ba7dc779935 Vincent Cheng 2019-10-31 2137 dev_err(&idtcm->client->dev,
3a6ba7dc779935 Vincent Cheng 2019-10-31 2138 "no PLLs flagged as PHCs, nothing to do\n");
3a6ba7dc779935 Vincent Cheng 2019-10-31 2139 err = -ENODEV;
3a6ba7dc779935 Vincent Cheng 2019-10-31 2140 }
3a6ba7dc779935 Vincent Cheng 2019-10-31 2141
3a6ba7dc779935 Vincent Cheng 2019-10-31 2142 mutex_unlock(&idtcm->reg_lock);
3a6ba7dc779935 Vincent Cheng 2019-10-31 2143
3a6ba7dc779935 Vincent Cheng 2019-10-31 2144 if (err) {
3a6ba7dc779935 Vincent Cheng 2019-10-31 2145 ptp_clock_unregister_all(idtcm);
3a6ba7dc779935 Vincent Cheng 2019-10-31 2146 return err;
3a6ba7dc779935 Vincent Cheng 2019-10-31 2147 }
3a6ba7dc779935 Vincent Cheng 2019-10-31 2148
3a6ba7dc779935 Vincent Cheng 2019-10-31 2149 i2c_set_clientdata(client, idtcm);
3a6ba7dc779935 Vincent Cheng 2019-10-31 2150
3a6ba7dc779935 Vincent Cheng 2019-10-31 2151 return 0;
3a6ba7dc779935 Vincent Cheng 2019-10-31 2152 }
3a6ba7dc779935 Vincent Cheng 2019-10-31 2153
:::::: The code at line 2089 was first introduced by commit
:::::: 3a6ba7dc7799355557938fbdc15a558236011429 ptp: Add a ptp clock driver for IDT ClockMatrix.
:::::: TO: Vincent Cheng <vincent.cheng.xh@...esas.com>
:::::: CC: David S. Miller <davem@...emloft.net>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
Download attachment ".config.gz" of type "application/gzip" (35818 bytes)
Powered by blists - more mailing lists