linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH -next] virtio: vdpa: remove unused variables 'ifcvf' and 'ifcvf_lm'
@ 2020-03-31  8:02 YueHaibing
  2020-03-31  8:11 ` Jason Wang
  2020-04-02  2:46 ` [PATCH v2 -next] " YueHaibing
  0 siblings, 2 replies; 3+ messages in thread
From: YueHaibing @ 2020-03-31  8:02 UTC (permalink / raw)
  To: mst, jasowang, tiwei.bie, lingshan.zhu, yuehaibing, xiao.w.wang
  Cc: virtualization, linux-kernel

drivers/virtio/vdpa/ifcvf/ifcvf_main.c:34:24:
 warning: variable ‘ifcvf’ set but not used [-Wunused-but-set-variable]
drivers/virtio/vdpa/ifcvf/ifcvf_base.c:304:31:
 warning: variable ‘ifcvf_lm’ set but not used [-Wunused-but-set-variable]

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
 drivers/virtio/vdpa/ifcvf/ifcvf_base.c | 2 --
 drivers/virtio/vdpa/ifcvf/ifcvf_main.c | 2 --
 2 files changed, 4 deletions(-)

diff --git a/drivers/virtio/vdpa/ifcvf/ifcvf_base.c b/drivers/virtio/vdpa/ifcvf/ifcvf_base.c
index b61b06ea26d3..e24371d644b5 100644
--- a/drivers/virtio/vdpa/ifcvf/ifcvf_base.c
+++ b/drivers/virtio/vdpa/ifcvf/ifcvf_base.c
@@ -301,12 +301,10 @@ int ifcvf_set_vq_state(struct ifcvf_hw *hw, u16 qid, u64 num)
 
 static int ifcvf_hw_enable(struct ifcvf_hw *hw)
 {
-	struct ifcvf_lm_cfg __iomem *ifcvf_lm;
 	struct virtio_pci_common_cfg __iomem *cfg;
 	struct ifcvf_adapter *ifcvf;
 	u32 i;
 
-	ifcvf_lm = (struct ifcvf_lm_cfg __iomem *)hw->lm_cfg;
 	ifcvf = vf_to_adapter(hw);
 	cfg = hw->common_cfg;
 	ifc_iowrite16(IFCVF_MSI_CONFIG_OFF, &cfg->msix_config);
diff --git a/drivers/virtio/vdpa/ifcvf/ifcvf_main.c b/drivers/virtio/vdpa/ifcvf/ifcvf_main.c
index 8d54dc5b08d2..28d9e5de5675 100644
--- a/drivers/virtio/vdpa/ifcvf/ifcvf_main.c
+++ b/drivers/virtio/vdpa/ifcvf/ifcvf_main.c
@@ -31,11 +31,9 @@ static irqreturn_t ifcvf_intr_handler(int irq, void *arg)
 static int ifcvf_start_datapath(void *private)
 {
 	struct ifcvf_hw *vf = ifcvf_private_to_vf(private);
-	struct ifcvf_adapter *ifcvf;
 	u8 status;
 	int ret;
 
-	ifcvf = vf_to_adapter(vf);
 	vf->nr_vring = IFCVF_MAX_QUEUE_PAIRS * 2;
 	ret = ifcvf_start_hw(vf);
 	if (ret < 0) {
-- 
2.17.1



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

* Re: [PATCH -next] virtio: vdpa: remove unused variables 'ifcvf' and 'ifcvf_lm'
  2020-03-31  8:02 [PATCH -next] virtio: vdpa: remove unused variables 'ifcvf' and 'ifcvf_lm' YueHaibing
@ 2020-03-31  8:11 ` Jason Wang
  2020-04-02  2:46 ` [PATCH v2 -next] " YueHaibing
  1 sibling, 0 replies; 3+ messages in thread
From: Jason Wang @ 2020-03-31  8:11 UTC (permalink / raw)
  To: YueHaibing, mst, tiwei.bie, lingshan.zhu, xiao.w.wang
  Cc: virtualization, linux-kernel


On 2020/3/31 下午4:02, YueHaibing wrote:
> drivers/virtio/vdpa/ifcvf/ifcvf_main.c:34:24:
>   warning: variable ‘ifcvf’ set but not used [-Wunused-but-set-variable]
> drivers/virtio/vdpa/ifcvf/ifcvf_base.c:304:31:
>   warning: variable ‘ifcvf_lm’ set but not used [-Wunused-but-set-variable]
>
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>


Acked-by: Jason Wang <jasowang@redhat.com>

Thanks


> ---
>   drivers/virtio/vdpa/ifcvf/ifcvf_base.c | 2 --
>   drivers/virtio/vdpa/ifcvf/ifcvf_main.c | 2 --
>   2 files changed, 4 deletions(-)
>
> diff --git a/drivers/virtio/vdpa/ifcvf/ifcvf_base.c b/drivers/virtio/vdpa/ifcvf/ifcvf_base.c
> index b61b06ea26d3..e24371d644b5 100644
> --- a/drivers/virtio/vdpa/ifcvf/ifcvf_base.c
> +++ b/drivers/virtio/vdpa/ifcvf/ifcvf_base.c
> @@ -301,12 +301,10 @@ int ifcvf_set_vq_state(struct ifcvf_hw *hw, u16 qid, u64 num)
>   
>   static int ifcvf_hw_enable(struct ifcvf_hw *hw)
>   {
> -	struct ifcvf_lm_cfg __iomem *ifcvf_lm;
>   	struct virtio_pci_common_cfg __iomem *cfg;
>   	struct ifcvf_adapter *ifcvf;
>   	u32 i;
>   
> -	ifcvf_lm = (struct ifcvf_lm_cfg __iomem *)hw->lm_cfg;
>   	ifcvf = vf_to_adapter(hw);
>   	cfg = hw->common_cfg;
>   	ifc_iowrite16(IFCVF_MSI_CONFIG_OFF, &cfg->msix_config);
> diff --git a/drivers/virtio/vdpa/ifcvf/ifcvf_main.c b/drivers/virtio/vdpa/ifcvf/ifcvf_main.c
> index 8d54dc5b08d2..28d9e5de5675 100644
> --- a/drivers/virtio/vdpa/ifcvf/ifcvf_main.c
> +++ b/drivers/virtio/vdpa/ifcvf/ifcvf_main.c
> @@ -31,11 +31,9 @@ static irqreturn_t ifcvf_intr_handler(int irq, void *arg)
>   static int ifcvf_start_datapath(void *private)
>   {
>   	struct ifcvf_hw *vf = ifcvf_private_to_vf(private);
> -	struct ifcvf_adapter *ifcvf;
>   	u8 status;
>   	int ret;
>   
> -	ifcvf = vf_to_adapter(vf);
>   	vf->nr_vring = IFCVF_MAX_QUEUE_PAIRS * 2;
>   	ret = ifcvf_start_hw(vf);
>   	if (ret < 0) {


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

* [PATCH v2 -next] vdpa: remove unused variables 'ifcvf' and 'ifcvf_lm'
  2020-03-31  8:02 [PATCH -next] virtio: vdpa: remove unused variables 'ifcvf' and 'ifcvf_lm' YueHaibing
  2020-03-31  8:11 ` Jason Wang
@ 2020-04-02  2:46 ` YueHaibing
  1 sibling, 0 replies; 3+ messages in thread
From: YueHaibing @ 2020-04-02  2:46 UTC (permalink / raw)
  To: mst, jasowang, lingshan.zhu, xiao.w.wang, tiwei.bie, yuehaibing
  Cc: virtualization, linux-kernel

drivers/vdpa/ifcvf/ifcvf_main.c:34:24:
 warning: variable ‘ifcvf’ set but not used [-Wunused-but-set-variable]
drivers/vdpa/ifcvf/ifcvf_base.c:304:31:
 warning: variable ‘ifcvf_lm’ set but not used [-Wunused-but-set-variable]

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Acked-by: Jason Wang <jasowang@redhat.com>
---
v2: rework based on commit a4be40cbcedb ("vdpa: move to drivers/vdpa")
---
 drivers/vdpa/ifcvf/ifcvf_base.c | 2 --
 drivers/vdpa/ifcvf/ifcvf_main.c | 2 --
 2 files changed, 4 deletions(-)

diff --git a/drivers/vdpa/ifcvf/ifcvf_base.c b/drivers/vdpa/ifcvf/ifcvf_base.c
index b61b06ea26d3..e24371d644b5 100644
--- a/drivers/vdpa/ifcvf/ifcvf_base.c
+++ b/drivers/vdpa/ifcvf/ifcvf_base.c
@@ -301,12 +301,10 @@ int ifcvf_set_vq_state(struct ifcvf_hw *hw, u16 qid, u64 num)
 
 static int ifcvf_hw_enable(struct ifcvf_hw *hw)
 {
-	struct ifcvf_lm_cfg __iomem *ifcvf_lm;
 	struct virtio_pci_common_cfg __iomem *cfg;
 	struct ifcvf_adapter *ifcvf;
 	u32 i;
 
-	ifcvf_lm = (struct ifcvf_lm_cfg __iomem *)hw->lm_cfg;
 	ifcvf = vf_to_adapter(hw);
 	cfg = hw->common_cfg;
 	ifc_iowrite16(IFCVF_MSI_CONFIG_OFF, &cfg->msix_config);
diff --git a/drivers/vdpa/ifcvf/ifcvf_main.c b/drivers/vdpa/ifcvf/ifcvf_main.c
index 8d54dc5b08d2..28d9e5de5675 100644
--- a/drivers/vdpa/ifcvf/ifcvf_main.c
+++ b/drivers/vdpa/ifcvf/ifcvf_main.c
@@ -31,11 +31,9 @@ static irqreturn_t ifcvf_intr_handler(int irq, void *arg)
 static int ifcvf_start_datapath(void *private)
 {
 	struct ifcvf_hw *vf = ifcvf_private_to_vf(private);
-	struct ifcvf_adapter *ifcvf;
 	u8 status;
 	int ret;
 
-	ifcvf = vf_to_adapter(vf);
 	vf->nr_vring = IFCVF_MAX_QUEUE_PAIRS * 2;
 	ret = ifcvf_start_hw(vf);
 	if (ret < 0) {
-- 
2.17.1



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

end of thread, other threads:[~2020-04-02  2:46 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-31  8:02 [PATCH -next] virtio: vdpa: remove unused variables 'ifcvf' and 'ifcvf_lm' YueHaibing
2020-03-31  8:11 ` Jason Wang
2020-04-02  2:46 ` [PATCH v2 -next] " YueHaibing

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).