From: Rikard Falkeborn <rikard.falkeborn@gmail.com>
To: virtualization@lists.linux-foundation.org
Cc: linux-kernel@vger.kernel.org,
"Michael S. Tsirkin" <mst@redhat.com>,
David Hildenbrand <david@redhat.com>,
Jason Wang <jasowang@redhat.com>,
Gerd Hoffmann <kraxel@redhat.com>,
Rikard Falkeborn <rikard.falkeborn@gmail.com>
Subject: [PATCH 3/3] virtio-mem: Constify mem_id_table
Date: Fri, 11 Sep 2020 22:35:09 +0200 [thread overview]
Message-ID: <20200911203509.26505-4-rikard.falkeborn@gmail.com> (raw)
In-Reply-To: <20200911203509.26505-1-rikard.falkeborn@gmail.com>
mem_id_table is not modified, so make it const to allow the compiler to
put it in read-only memory.
Signed-off-by: Rikard Falkeborn <rikard.falkeborn@gmail.com>
---
drivers/virtio/virtio_mem.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/virtio/virtio_mem.c b/drivers/virtio/virtio_mem.c
index 834b7c13ef3d..1d0f3ab2b509 100644
--- a/drivers/virtio/virtio_mem.c
+++ b/drivers/virtio/virtio_mem.c
@@ -1926,7 +1926,7 @@ static unsigned int virtio_mem_features[] = {
#endif
};
-static struct virtio_device_id virtio_mem_id_table[] = {
+static const struct virtio_device_id virtio_mem_id_table[] = {
{ VIRTIO_ID_MEM, VIRTIO_DEV_ANY_ID },
{ 0 },
};
--
2.28.0
next prev parent reply other threads:[~2020-09-11 20:35 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-11 20:35 [PATCH 0/3] drivers/virtio: Constify static struct virtio_device_id Rikard Falkeborn
2020-09-11 20:35 ` [PATCH 1/3] virtio-balloon: Constify id_table Rikard Falkeborn
2020-09-14 7:46 ` David Hildenbrand
2020-09-11 20:35 ` [PATCH 2/3] virtio_input: " Rikard Falkeborn
2020-09-14 7:46 ` David Hildenbrand
2020-09-11 20:35 ` Rikard Falkeborn [this message]
2020-09-14 7:46 ` [PATCH 3/3] virtio-mem: Constify mem_id_table David Hildenbrand
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=20200911203509.26505-4-rikard.falkeborn@gmail.com \
--to=rikard.falkeborn@gmail.com \
--cc=david@redhat.com \
--cc=jasowang@redhat.com \
--cc=kraxel@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®