mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Rikard Falkeborn <rikard.falkeborn@gmail.com>
To: linux-fsi@lists.ozlabs.org
Cc: linux-kernel@vger.kernel.org, jk@ozlabs.org, joel@jms.id.au,
	alistair@popple.id.au, eajames@linux.ibm.com,
	Rikard Falkeborn <rikard.falkeborn@gmail.com>
Subject: [PATCH 1/3] fsi: master: Constify hub_master_ids
Date: Thu,  6 Aug 2020 01:26:22 +0200	[thread overview]
Message-ID: <20200805232624.6938-2-rikard.falkeborn@gmail.com> (raw)
In-Reply-To: <20200805232624.6938-1-rikard.falkeborn@gmail.com>

The only usage of hub_master_ids is to assign its address to the
id_table field in the fsi_driver struct, which is a const pointer, 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/fsi/fsi-master-hub.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/fsi/fsi-master-hub.c b/drivers/fsi/fsi-master-hub.c
index 3caa2da7838c..01f0a796111e 100644
--- a/drivers/fsi/fsi-master-hub.c
+++ b/drivers/fsi/fsi-master-hub.c
@@ -276,7 +276,7 @@ static int hub_master_remove(struct device *dev)
 	return 0;
 }
 
-static struct fsi_device_id hub_master_ids[] = {
+static const struct fsi_device_id hub_master_ids[] = {
 	{
 		.engine_type = FSI_ENGID_HUB_MASTER,
 		.version = FSI_VERSION_ANY,
-- 
2.28.0


  reply	other threads:[~2020-08-05 23:27 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-05 23:26 [PATCH 0/3] fsi: Constify fsi_device_ids Rikard Falkeborn
2020-08-05 23:26 ` Rikard Falkeborn [this message]
2020-08-05 23:26 ` [PATCH 2/3] fsi: sbefifo: Constify sbefifo_ids Rikard Falkeborn
2020-08-05 23:26 ` [PATCH 3/3] fsi: scom: Constify scom_ids Rikard Falkeborn
2020-08-05 23:56 ` [PATCH 0/3] fsi: Constify fsi_device_ids Joel Stanley

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=20200805232624.6938-2-rikard.falkeborn@gmail.com \
    --to=rikard.falkeborn@gmail.com \
    --cc=alistair@popple.id.au \
    --cc=eajames@linux.ibm.com \
    --cc=jk@ozlabs.org \
    --cc=joel@jms.id.au \
    --cc=linux-fsi@lists.ozlabs.org \
    --cc=linux-kernel@vger.kernel.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®