[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <202209060019.VUMe4qJF-lkp@intel.com>
Date: Tue, 6 Sep 2022 01:12:13 +0800
From: kernel test robot <lkp@...el.com>
To: Mattias Forsblad <mattias.forsblad@...il.com>,
netdev@...r.kernel.org
Cc: kbuild-all@...ts.01.org, Andrew Lunn <andrew@...n.ch>,
Vivien Didelot <vivien.didelot@...il.com>,
Florian Fainelli <f.fainelli@...il.com>,
Vladimir Oltean <olteanv@...il.com>,
"David S . Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>,
Paolo Abeni <pabeni@...hat.com>,
Mattias Forsblad <mattias.forsblad@...il.com>
Subject: Re: [PATCH net-next v3 1/2] net: dsa: mv88e6xxx: Add functionality
for handling RMU frames.
Hi Mattias,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on net-next/master]
url: https://github.com/intel-lab-lkp/linux/commits/Mattias-Forsblad/net-dsa-mv88e6xxx-qca8k-Add-RMU-support/20220905-212125
base: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git 5f3c5193479e5b9d51b201245febab6fbda4c477
config: x86_64-allyesconfig (https://download.01.org/0day-ci/archive/20220906/202209060019.VUMe4qJF-lkp@intel.com/config)
compiler: gcc-11 (Debian 11.3.0-5) 11.3.0
reproduce (this is a W=1 build):
# https://github.com/intel-lab-lkp/linux/commit/50e5d9b5948e53c773edc3c710020e01f6045f9f
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review Mattias-Forsblad/net-dsa-mv88e6xxx-qca8k-Add-RMU-support/20220905-212125
git checkout 50e5d9b5948e53c773edc3c710020e01f6045f9f
# save the config file
mkdir build_dir && cp config build_dir/.config
make W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash drivers/net/dsa/mv88e6xxx/
If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@...el.com>
All warnings (new ones prefixed by >>):
drivers/net/dsa/mv88e6xxx/rmu.c: In function 'mv88e6xxx_decode_frame2reg_handler':
>> drivers/net/dsa/mv88e6xxx/rmu.c:239:33: warning: variable 'tagger_data' set but not used [-Wunused-but-set-variable]
239 | struct dsa_tagger_data *tagger_data;
| ^~~~~~~~~~~
vim +/tagger_data +239 drivers/net/dsa/mv88e6xxx/rmu.c
236
237 void mv88e6xxx_decode_frame2reg_handler(struct net_device *dev, struct sk_buff *skb)
238 {
> 239 struct dsa_tagger_data *tagger_data;
240 struct dsa_port *dp = dev->dsa_ptr;
241 struct dsa_switch *ds = dp->ds;
242 struct mv88e6xxx_chip *chip;
243 int source_device;
244 u8 *dsa_header;
245 u16 format;
246 u16 code;
247 u8 seqno;
248
249 tagger_data = ds->tagger_data;
250
251 if (mv88e6xxx_validate_mac(ds, skb))
252 return;
253
254 /* Decode Frame2Reg DSA portion */
255 dsa_header = skb->data - 2;
256
257 source_device = FIELD_GET(MV88E6XXX_SOURCE_DEV, dsa_header[0]);
258 ds = dsa_switch_find(ds->dst->index, source_device);
259 if (!ds) {
260 net_dbg_ratelimited("RMU: Didn't find switch with index %d", source_device);
261 return;
262 }
263
264 chip = ds->priv;
265 seqno = dsa_header[3];
266 if (seqno != chip->rmu.inband_seqno) {
267 net_dbg_ratelimited("RMU: wrong seqno received. Was %d, expected %d",
268 seqno, chip->rmu.inband_seqno);
269 return;
270 }
271
272 /* Pull DSA L2 data */
273 skb_pull(skb, MV88E6XXX_DSA_HLEN);
274
275 format = get_unaligned_be16(&skb->data[0]);
276 if (format != MV88E6XXX_RMU_RESP_FORMAT_1 &&
277 format != MV88E6XXX_RMU_RESP_FORMAT_2) {
278 net_dbg_ratelimited("RMU: received unknown format 0x%04x", format);
279 return;
280 }
281
282 code = get_unaligned_be16(&skb->data[4]);
283 if (code == MV88E6XXX_RMU_RESP_ERROR) {
284 net_dbg_ratelimited("RMU: error response code 0x%04x", code);
285 return;
286 }
287
288 if (code == MV88E6XXX_RMU_RESP_CODE_GOT_ID)
289 mv88e6xxx_prod_id_handler(ds, skb);
290 else if (code == MV88E6XXX_RMU_RESP_CODE_DUMP_MIB)
291 mv88e6xxx_mib_handler(ds, skb);
292
293 dsa_switch_inband_complete(ds, NULL);
294 }
295
--
0-DAY CI Kernel Test Service
https://01.org/lkp
Powered by blists - more mailing lists