CC: [email protected] CC: [email protected] TO: Ioana Ciornei <[email protected]> CC: Claudiu Manoil <[email protected]> CC: Vladimir Oltean <[email protected]>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master head: 0c947b893d69231a9add855939da7c66237ab44f commit: fb8629e2cbfce2b695521d6d33d029117ceda007 net: enetc: add support for software TSO date: 3 months ago :::::: branch date: 10 hours ago :::::: commit date: 3 months ago compiler: sparc64-linux-gcc (GCC) 11.2.0 If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot <[email protected]> cppcheck possible warnings: (new ones prefixed by >>, may not real problems) >> drivers/net/ethernet/freescale/enetc/enetc.c:356:3: warning: Assignment of >> function parameter has no effect outside the function. Did you forget >> dereferencing it? [uselessAssignmentPtrArg] tx_swbd = &tx_ring->tx_swbd[*i]; ^ vim +356 drivers/net/ethernet/freescale/enetc/enetc.c d4fd0404c1c95b Claudiu Manoil 2019-01-22 317 fb8629e2cbfce2 Ioana Ciornei 2021-10-07 318 static void enetc_map_tx_tso_hdr(struct enetc_bdr *tx_ring, struct sk_buff *skb, fb8629e2cbfce2 Ioana Ciornei 2021-10-07 319 struct enetc_tx_swbd *tx_swbd, fb8629e2cbfce2 Ioana Ciornei 2021-10-07 320 union enetc_tx_bd *txbd, int *i, int hdr_len, fb8629e2cbfce2 Ioana Ciornei 2021-10-07 321 int data_len) fb8629e2cbfce2 Ioana Ciornei 2021-10-07 322 { fb8629e2cbfce2 Ioana Ciornei 2021-10-07 323 union enetc_tx_bd txbd_tmp; fb8629e2cbfce2 Ioana Ciornei 2021-10-07 324 u8 flags = 0, e_flags = 0; fb8629e2cbfce2 Ioana Ciornei 2021-10-07 325 dma_addr_t addr; fb8629e2cbfce2 Ioana Ciornei 2021-10-07 326 fb8629e2cbfce2 Ioana Ciornei 2021-10-07 327 enetc_clear_tx_bd(&txbd_tmp); fb8629e2cbfce2 Ioana Ciornei 2021-10-07 328 addr = tx_ring->tso_headers_dma + *i * TSO_HEADER_SIZE; fb8629e2cbfce2 Ioana Ciornei 2021-10-07 329 fb8629e2cbfce2 Ioana Ciornei 2021-10-07 330 if (skb_vlan_tag_present(skb)) fb8629e2cbfce2 Ioana Ciornei 2021-10-07 331 flags |= ENETC_TXBD_FLAGS_EX; fb8629e2cbfce2 Ioana Ciornei 2021-10-07 332 fb8629e2cbfce2 Ioana Ciornei 2021-10-07 333 txbd_tmp.addr = cpu_to_le64(addr); fb8629e2cbfce2 Ioana Ciornei 2021-10-07 334 txbd_tmp.buf_len = cpu_to_le16(hdr_len); fb8629e2cbfce2 Ioana Ciornei 2021-10-07 335 fb8629e2cbfce2 Ioana Ciornei 2021-10-07 336 /* first BD needs frm_len and offload flags set */ fb8629e2cbfce2 Ioana Ciornei 2021-10-07 337 txbd_tmp.frm_len = cpu_to_le16(hdr_len + data_len); fb8629e2cbfce2 Ioana Ciornei 2021-10-07 338 txbd_tmp.flags = flags; fb8629e2cbfce2 Ioana Ciornei 2021-10-07 339 fb8629e2cbfce2 Ioana Ciornei 2021-10-07 340 /* For the TSO header we do not set the dma address since we do not fb8629e2cbfce2 Ioana Ciornei 2021-10-07 341 * want it unmapped when we do cleanup. We still set len so that we fb8629e2cbfce2 Ioana Ciornei 2021-10-07 342 * count the bytes sent. fb8629e2cbfce2 Ioana Ciornei 2021-10-07 343 */ fb8629e2cbfce2 Ioana Ciornei 2021-10-07 344 tx_swbd->len = hdr_len; fb8629e2cbfce2 Ioana Ciornei 2021-10-07 345 tx_swbd->do_twostep_tstamp = false; fb8629e2cbfce2 Ioana Ciornei 2021-10-07 346 tx_swbd->check_wb = false; fb8629e2cbfce2 Ioana Ciornei 2021-10-07 347 fb8629e2cbfce2 Ioana Ciornei 2021-10-07 348 /* Actually write the header in the BD */ fb8629e2cbfce2 Ioana Ciornei 2021-10-07 349 *txbd = txbd_tmp; fb8629e2cbfce2 Ioana Ciornei 2021-10-07 350 fb8629e2cbfce2 Ioana Ciornei 2021-10-07 351 /* Add extension BD for VLAN */ fb8629e2cbfce2 Ioana Ciornei 2021-10-07 352 if (flags & ENETC_TXBD_FLAGS_EX) { fb8629e2cbfce2 Ioana Ciornei 2021-10-07 353 /* Get the next BD */ fb8629e2cbfce2 Ioana Ciornei 2021-10-07 354 enetc_bdr_idx_inc(tx_ring, i); fb8629e2cbfce2 Ioana Ciornei 2021-10-07 355 txbd = ENETC_TXBD(*tx_ring, *i); fb8629e2cbfce2 Ioana Ciornei 2021-10-07 @356 tx_swbd = &tx_ring->tx_swbd[*i]; fb8629e2cbfce2 Ioana Ciornei 2021-10-07 357 prefetchw(txbd); fb8629e2cbfce2 Ioana Ciornei 2021-10-07 358 fb8629e2cbfce2 Ioana Ciornei 2021-10-07 359 /* Setup the VLAN fields */ fb8629e2cbfce2 Ioana Ciornei 2021-10-07 360 enetc_clear_tx_bd(&txbd_tmp); fb8629e2cbfce2 Ioana Ciornei 2021-10-07 361 txbd_tmp.ext.vid = cpu_to_le16(skb_vlan_tag_get(skb)); fb8629e2cbfce2 Ioana Ciornei 2021-10-07 362 txbd_tmp.ext.tpid = 0; /* < C-TAG */ fb8629e2cbfce2 Ioana Ciornei 2021-10-07 363 e_flags |= ENETC_TXBD_E_FLAGS_VLAN_INS; fb8629e2cbfce2 Ioana Ciornei 2021-10-07 364 fb8629e2cbfce2 Ioana Ciornei 2021-10-07 365 /* Write the BD */ fb8629e2cbfce2 Ioana Ciornei 2021-10-07 366 txbd_tmp.ext.e_flags = e_flags; fb8629e2cbfce2 Ioana Ciornei 2021-10-07 367 *txbd = txbd_tmp; fb8629e2cbfce2 Ioana Ciornei 2021-10-07 368 } fb8629e2cbfce2 Ioana Ciornei 2021-10-07 369 } fb8629e2cbfce2 Ioana Ciornei 2021-10-07 370 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/[email protected] _______________________________________________ kbuild mailing list -- [email protected] To unsubscribe send an email to [email protected]
