linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] virtio_ring: remove unused variable in virtqueue_add()
@ 2022-05-20  7:07 Bo Liu
  2022-05-20 14:12 ` kernel test robot
  0 siblings, 1 reply; 2+ messages in thread
From: Bo Liu @ 2022-05-20  7:07 UTC (permalink / raw)
  To: mst, jasowang; +Cc: virtualization, linux-kernel, Bo Liu

The parameter vq in virtqueue_add() is useless, so remove it.

Signed-off-by: Bo Liu <liubo03@inspur.com>
---
 drivers/virtio/virtio_ring.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/virtio/virtio_ring.c b/drivers/virtio/virtio_ring.c
index cfb028ca238e..7368e4394069 100644
--- a/drivers/virtio/virtio_ring.c
+++ b/drivers/virtio/virtio_ring.c
@@ -1782,8 +1782,6 @@ static inline int virtqueue_add(struct virtqueue *_vq,
 				void *ctx,
 				gfp_t gfp)
 {
-	struct vring_virtqueue *vq = to_vvq(_vq);
-
 	return vq->packed_ring ? virtqueue_add_packed(_vq, sgs, total_sg,
 					out_sgs, in_sgs, data, ctx, gfp) :
 				 virtqueue_add_split(_vq, sgs, total_sg,
-- 
2.27.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] virtio_ring: remove unused variable in virtqueue_add()
  2022-05-20  7:07 [PATCH] virtio_ring: remove unused variable in virtqueue_add() Bo Liu
@ 2022-05-20 14:12 ` kernel test robot
  0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2022-05-20 14:12 UTC (permalink / raw)
  To: Bo Liu, mst, jasowang; +Cc: kbuild-all, virtualization, linux-kernel, Bo Liu

Hi Bo,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on linus/master]
[also build test ERROR on v5.18-rc7 next-20220519]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/intel-lab-lkp/linux/commits/Bo-Liu/virtio_ring-remove-unused-variable-in-virtqueue_add/20220520-161845
base:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 3d7285a335edaf23b699e87c528cf0b0070e3293
config: x86_64-rhel-8.3-func (https://download.01.org/0day-ci/archive/20220520/202205202236.ztzLWFZ4-lkp@intel.com/config)
compiler: gcc-11 (Debian 11.3.0-1) 11.3.0
reproduce (this is a W=1 build):
        # https://github.com/intel-lab-lkp/linux/commit/8344061823a47f3245d81db45f5898d940ac488e
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review Bo-Liu/virtio_ring-remove-unused-variable-in-virtqueue_add/20220520-161845
        git checkout 8344061823a47f3245d81db45f5898d940ac488e
        # 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/

If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

   drivers/virtio/virtio_ring.c: In function 'virtqueue_add':
>> drivers/virtio/virtio_ring.c:1785:16: error: 'vq' undeclared (first use in this function); did you mean '_vq'?
    1785 |         return vq->packed_ring ? virtqueue_add_packed(_vq, sgs, total_sg,
         |                ^~
         |                _vq
   drivers/virtio/virtio_ring.c:1785:16: note: each undeclared identifier is reported only once for each function it appears in
   drivers/virtio/virtio_ring.c:1789:1: error: control reaches end of non-void function [-Werror=return-type]
    1789 | }
         | ^
   cc1: some warnings being treated as errors


vim +1785 drivers/virtio/virtio_ring.c

1ce9e6055fa0a9 Tiwei Bie 2018-11-21  1770  
1ce9e6055fa0a9 Tiwei Bie 2018-11-21  1771  
e6f633e5beab65 Tiwei Bie 2018-11-21  1772  /*
e6f633e5beab65 Tiwei Bie 2018-11-21  1773   * Generic functions and exported symbols.
e6f633e5beab65 Tiwei Bie 2018-11-21  1774   */
e6f633e5beab65 Tiwei Bie 2018-11-21  1775  
e6f633e5beab65 Tiwei Bie 2018-11-21  1776  static inline int virtqueue_add(struct virtqueue *_vq,
e6f633e5beab65 Tiwei Bie 2018-11-21  1777  				struct scatterlist *sgs[],
e6f633e5beab65 Tiwei Bie 2018-11-21  1778  				unsigned int total_sg,
e6f633e5beab65 Tiwei Bie 2018-11-21  1779  				unsigned int out_sgs,
e6f633e5beab65 Tiwei Bie 2018-11-21  1780  				unsigned int in_sgs,
e6f633e5beab65 Tiwei Bie 2018-11-21  1781  				void *data,
e6f633e5beab65 Tiwei Bie 2018-11-21  1782  				void *ctx,
e6f633e5beab65 Tiwei Bie 2018-11-21  1783  				gfp_t gfp)
e6f633e5beab65 Tiwei Bie 2018-11-21  1784  {
1ce9e6055fa0a9 Tiwei Bie 2018-11-21 @1785  	return vq->packed_ring ? virtqueue_add_packed(_vq, sgs, total_sg,
1ce9e6055fa0a9 Tiwei Bie 2018-11-21  1786  					out_sgs, in_sgs, data, ctx, gfp) :
1ce9e6055fa0a9 Tiwei Bie 2018-11-21  1787  				 virtqueue_add_split(_vq, sgs, total_sg,
e6f633e5beab65 Tiwei Bie 2018-11-21  1788  					out_sgs, in_sgs, data, ctx, gfp);
e6f633e5beab65 Tiwei Bie 2018-11-21  1789  }
e6f633e5beab65 Tiwei Bie 2018-11-21  1790  

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-05-20 14:12 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-20  7:07 [PATCH] virtio_ring: remove unused variable in virtqueue_add() Bo Liu
2022-05-20 14:12 ` kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).