mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Bo Liu <liubo03@inspur.com>
To: <mst@redhat.com>, <jasowang@redhat.com>
Cc: <virtualization@lists.linux-foundation.org>,
	<linux-kernel@vger.kernel.org>, Bo Liu <liubo03@inspur.com>
Subject: [PATCH] virtio: Remove unnecessary variable assignments
Date: Fri, 17 Jun 2022 01:59:52 -0400	[thread overview]
Message-ID: <20220617055952.5364-1-liubo03@inspur.com> (raw)

In function vp_modern_probe(), "mdev->pci_dev" is assigned to
variable "pci_dev", variable "pci_dev" and "mdev->pci_dev" have
the same value. There is no need to assign variable "pci_dev" to
"mdev->pci_dev". So remove it.

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

diff --git a/drivers/virtio/virtio_pci_modern_dev.c b/drivers/virtio/virtio_pci_modern_dev.c
index b790f30b2b56..fa2a9445bb18 100644
--- a/drivers/virtio/virtio_pci_modern_dev.c
+++ b/drivers/virtio/virtio_pci_modern_dev.c
@@ -220,8 +220,6 @@ int vp_modern_probe(struct virtio_pci_modern_device *mdev)
 
 	check_offsets();
 
-	mdev->pci_dev = pci_dev;
-
 	/* We only own devices >= 0x1000 and <= 0x107f: leave the rest. */
 	if (pci_dev->device < 0x1000 || pci_dev->device > 0x107f)
 		return -ENODEV;
-- 
2.27.0


             reply	other threads:[~2022-06-17  7:07 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-17  5:59 Bo Liu [this message]
2022-06-20  8:49 ` Stefano Garzarella
2022-06-20  9:32 Bo Liu (刘波)-浪潮信息
2022-06-20  9:37 ` Stefano Garzarella
2022-06-20 10:37 Bo Liu (刘波)-浪潮信息

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220617055952.5364-1-liubo03@inspur.com \
    --to=liubo03@inspur.com \
    --cc=jasowang@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mst@redhat.com \
    --cc=virtualization@lists.linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®