From: kernel test robot <lkp@intel.com>
To: Mattias Forsblad <mattias.forsblad@gmail.com>
Cc: llvm@lists.linux.dev, kbuild-all@lists.01.org
Subject: Re: [RFC net-next PATCH 2/3] mv88e6xxx: Implement remote management support (RMU)
Date: Thu, 18 Aug 2022 20:40:03 +0800 [thread overview]
Message-ID: <202208182008.s00O6DMN-lkp@intel.com> (raw)
In-Reply-To: <20220818102924.287719-3-mattias.forsblad@gmail.com>
Hi Mattias,
[FYI, it's a private test report for your RFC patch.]
[auto build test WARNING on net-next/master]
url: https://github.com/intel-lab-lkp/linux/commits/Mattias-Forsblad/net-dsa-mv88e6xxx-Add-RMU-support/20220818-183122
base: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git e34cfee65ec891a319ce79797dda18083af33a76
config: i386-randconfig-a013 (https://download.01.org/0day-ci/archive/20220818/202208182008.s00O6DMN-lkp@intel.com/config)
compiler: clang version 16.0.0 (https://github.com/llvm/llvm-project aed5e3bea138ce581d682158eb61c27b3cfdd6ec)
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
# https://github.com/intel-lab-lkp/linux/commit/8543f260de6b37602bb98a7c6646b97e2b94fba6
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review Mattias-Forsblad/net-dsa-mv88e6xxx-Add-RMU-support/20220818-183122
git checkout 8543f260de6b37602bb98a7c6646b97e2b94fba6
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=i386 SHELL=/bin/bash drivers/net/dsa/mv88e6xxx/
If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
drivers/net/dsa/mv88e6xxx/rmu.c:147:21: warning: variable 'master' set but not used [-Wunused-but-set-variable]
struct net_device *master;
^
>> drivers/net/dsa/mv88e6xxx/rmu.c:211:5: warning: no previous prototype for function 'mv88e6xxx_rmu_stats_get' [-Wmissing-prototypes]
int mv88e6xxx_rmu_stats_get(struct mv88e6xxx_chip *chip, int port, uint64_t *data)
^
drivers/net/dsa/mv88e6xxx/rmu.c:211:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int mv88e6xxx_rmu_stats_get(struct mv88e6xxx_chip *chip, int port, uint64_t *data)
^
static
2 warnings generated.
vim +/mv88e6xxx_rmu_stats_get +211 drivers/net/dsa/mv88e6xxx/rmu.c
142
143 static int mv88e6xxx_rmu_send_wait(struct mv88e6xxx_chip *chip, int port,
144 int request, const char *msg, int len)
145 {
146 const struct dsa_port *dp;
> 147 struct net_device *master;
148 int ret = 0;
149
150 dp = dsa_to_port(chip->ds, port);
151 if (!dp)
152 return 0;
153
154 master = dp->master;
155
156 mutex_lock(&chip->rmu.mutex);
157
158 chip->rmu.request_cmd = request;
159
160 ret = mv88e6xxx_rmu_tx(chip, port, msg, len);
161 if (ret == -ENODEV) {
162 /* Device not ready yet? Try again later */
163 ret = 0;
164 goto out;
165 }
166
167 if (ret) {
168 dev_err(chip->dev, "RMU: error transmitting request (%d)", ret);
169 goto out;
170 }
171
172 ret = wait_for_completion_timeout(&chip->rmu.completion,
173 msecs_to_jiffies(MV88E6XXX_WAIT_POLL_TIME_MS));
174 if (ret == 0) {
175 dev_err(chip->dev,
176 "RMU: timeout waiting for request %d (%d) on dev:port %d:%d\n",
177 request, ret, chip->ds->index, port);
178 ret = -ETIMEDOUT;
179 }
180
181 out:
182 mutex_unlock(&chip->rmu.mutex);
183
184 return ret > 0 ? 0 : ret;
185 }
186
187 static int mv88e6xxx_rmu_get_id(struct mv88e6xxx_chip *chip, int port)
188 {
189 const u8 get_id[8] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
190 int ret = -1;
191
192 if (chip->rmu.got_id)
193 return 0;
194
195 chip->rmu.netdev = dev_get_by_name(&init_net, "chan0");
196 if (!chip->rmu.netdev) {
197 dev_err(chip->dev, "RMU: unable to get interface");
198 return -ENODEV;
199 }
200
201 ret = mv88e6xxx_rmu_send_wait(chip, port, RMU_REQ_GET_ID, get_id, 8);
202 if (ret) {
203 dev_err(chip->dev, "RMU: error for command GET_ID %d index %d\n", ret,
204 chip->ds->index);
205 return ret;
206 }
207
208 return 0;
209 }
210
> 211 int mv88e6xxx_rmu_stats_get(struct mv88e6xxx_chip *chip, int port, uint64_t *data)
212 {
213 u8 dump_mib[8] = { 0x00, 0x01, 0x00, 0x00, 0x10, 0x20, 0x00, 0x00 };
214 int ret;
215
216 if (!chip)
217 return 0;
218
219 ret = mv88e6xxx_rmu_get_id(chip, port);
220 if (ret)
221 return ret;
222
223 /* Send a GET_MIB command */
224 dump_mib[7] = port;
225 ret = mv88e6xxx_rmu_send_wait(chip, port, RMU_REQ_DUMP_MIB, dump_mib, 8);
226 if (ret) {
227 dev_err(chip->dev, "RMU: error for command DUMP_MIB %d dev %d:%d\n", ret,
228 chip->ds->index, port);
229 return ret;
230 }
231
232 /* Update MIB for port */
233 if (chip->info->ops->stats_get_stats)
234 return chip->info->ops->stats_get_stats(chip, port, data);
235
236 return 0;
237 }
238
--
0-DAY CI Kernel Test Service
https://01.org/lkp
next prev parent reply other threads:[~2022-08-18 12:40 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-18 10:29 [RFC net-next PATCH 0/3] net: dsa: mv88e6xxx: Add RMU support Mattias Forsblad
2022-08-18 10:29 ` [RFC net-next PATCH 1/3] dsa: Add ability to handle RMU frames Mattias Forsblad
2022-08-18 12:44 ` Andrew Lunn
2022-08-19 5:21 ` Mattias Forsblad
2022-08-18 10:29 ` [RFC net-next PATCH 2/3] mv88e6xxx: Implement remote management support (RMU) Mattias Forsblad
2022-08-18 12:40 ` kernel test robot [this message]
2022-08-18 13:21 ` Andrew Lunn
2022-08-19 5:28 ` Mattias Forsblad
2022-08-19 12:29 ` Andrew Lunn
2022-08-18 10:29 ` [RFC net-next PATCH 3/3] mv88e6xxx: rmon: Use RMU to collect rmon data Mattias Forsblad
2022-08-18 15:36 ` Andrew Lunn
2022-08-19 5:47 ` Mattias Forsblad
2022-08-18 11:58 ` [RFC net-next PATCH 0/3] net: dsa: mv88e6xxx: Add RMU support Vladimir Oltean
2022-08-19 5:07 ` Mattias Forsblad
2022-08-18 12:31 ` Andrew Lunn
2022-08-19 5:14 ` Mattias Forsblad
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202208182008.s00O6DMN-lkp@intel.com \
--to=lkp@intel.com \
--cc=kbuild-all@lists.01.org \
--cc=llvm@lists.linux.dev \
--cc=mattias.forsblad@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.