[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202107190930.OIQyzkVL-lkp@intel.com>
Date: Mon, 19 Jul 2021 09:18:37 +0800
From: kernel test robot <lkp@...el.com>
To: Bailey Forrest <bcf@...gle.com>
Cc: kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org,
Willem de Bruijn <willemb@...gle.com>,
Catherine Sullivan <csully@...gle.com>
Subject: drivers/net/ethernet/google/gve/gve_tx_dqo.c:753:25: warning:
variable 'buf' set but not used
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 2734d6c1b1a089fb593ef6a23d4b70903526fe0c
commit: a57e5de476be0b4b7f42beb6a21c19ad9c577aa3 gve: DQO: Add TX path
date: 3 weeks ago
config: i386-randconfig-r035-20210719 (attached as .config)
compiler: gcc-10 (Ubuntu 10.3.0-1ubuntu1~20.04) 10.3.0
reproduce (this is a W=1 build):
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=a57e5de476be0b4b7f42beb6a21c19ad9c577aa3
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout a57e5de476be0b4b7f42beb6a21c19ad9c577aa3
# save the attached .config to linux build tree
make W=1 ARCH=i386
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/net/ethernet/google/gve/gve_tx_dqo.c: In function 'gve_tx_clean_pending_packets':
drivers/net/ethernet/google/gve/gve_tx_dqo.c:88:27: warning: unused variable 'buf' [-Wunused-variable]
88 | struct gve_tx_dma_buf *buf = &cur_state->bufs[j];
| ^~~
drivers/net/ethernet/google/gve/gve_tx_dqo.c: In function 'gve_tx_add_skb_no_copy_dqo':
drivers/net/ethernet/google/gve/gve_tx_dqo.c:496:26: warning: unused variable 'buf' [-Wunused-variable]
496 | struct gve_tx_dma_buf *buf =
| ^~~
drivers/net/ethernet/google/gve/gve_tx_dqo.c:515:26: warning: unused variable 'buf' [-Wunused-variable]
515 | struct gve_tx_dma_buf *buf =
| ^~~
drivers/net/ethernet/google/gve/gve_tx_dqo.c:556:26: warning: unused variable 'buf' [-Wunused-variable]
556 | struct gve_tx_dma_buf *buf = &pending_packet->bufs[i];
| ^~~
drivers/net/ethernet/google/gve/gve_tx_dqo.c: In function 'remove_from_list':
drivers/net/ethernet/google/gve/gve_tx_dqo.c:730:6: warning: variable 'index' set but not used [-Wunused-but-set-variable]
730 | s16 index, prev_index, next_index;
| ^~~~~
drivers/net/ethernet/google/gve/gve_tx_dqo.c: In function 'gve_unmap_packet':
>> drivers/net/ethernet/google/gve/gve_tx_dqo.c:753:25: warning: variable 'buf' set but not used [-Wunused-but-set-variable]
753 | struct gve_tx_dma_buf *buf;
| ^~~
In file included from include/linux/printk.h:7,
from include/linux/kernel.h:17,
from arch/x86/include/asm/percpu.h:27,
from arch/x86/include/asm/current.h:6,
from include/linux/sched.h:12,
from include/linux/ratelimit.h:6,
from include/linux/dev_printk.h:16,
from include/linux/device.h:15,
from include/linux/dma-mapping.h:7,
from drivers/net/ethernet/google/gve/gve.h:10,
from drivers/net/ethernet/google/gve/gve_tx_dqo.c:7:
drivers/net/ethernet/google/gve/gve_tx_dqo.c: In function 'remove_miss_completions':
include/linux/kern_levels.h:5:18: warning: format '%ld' expects argument of type 'long int', but argument 3 has type 'int' [-Wformat=]
5 | #define KERN_SOH "\001" /* ASCII Start Of Header */
| ^~~~~~
include/linux/kern_levels.h:11:18: note: in expansion of macro 'KERN_SOH'
11 | #define KERN_ERR KERN_SOH "3" /* error conditions */
| ^~~~~~~~
include/linux/printk.h:343:9: note: in expansion of macro 'KERN_ERR'
343 | printk(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~~~
include/linux/net.h:247:3: note: in expansion of macro 'pr_err'
247 | function(__VA_ARGS__); \
| ^~~~~~~~
include/linux/net.h:257:2: note: in expansion of macro 'net_ratelimited_function'
257 | net_ratelimited_function(pr_err, fmt, ##__VA_ARGS__)
| ^~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/ethernet/google/gve/gve_tx_dqo.c:893:3: note: in expansion of macro 'net_err_ratelimited'
893 | net_err_ratelimited("%s: No reinjection completion was received for: %ld.\n",
| ^~~~~~~~~~~~~~~~~~~
vim +/buf +753 drivers/net/ethernet/google/gve/gve_tx_dqo.c
749
750 static void gve_unmap_packet(struct device *dev,
751 struct gve_tx_pending_packet_dqo *pending_packet)
752 {
> 753 struct gve_tx_dma_buf *buf;
754 int i;
755
756 /* SKB linear portion is guaranteed to be mapped */
757 buf = &pending_packet->bufs[0];
758 dma_unmap_single(dev, dma_unmap_addr(buf, dma),
759 dma_unmap_len(buf, len), DMA_TO_DEVICE);
760 for (i = 1; i < pending_packet->num_bufs; i++) {
761 buf = &pending_packet->bufs[i];
762 dma_unmap_page(dev, dma_unmap_addr(buf, dma),
763 dma_unmap_len(buf, len), DMA_TO_DEVICE);
764 }
765 pending_packet->num_bufs = 0;
766 }
767
---
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" (46603 bytes)
Powered by blists - more mailing lists