public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: Bart Van Assche <bart.vanassche@wdc.com>
To: "Martin K . Petersen" <martin.petersen@oracle.com>,
	"James E . J . Bottomley" <jejb@linux.vnet.ibm.com>
Cc: linux-scsi@vger.kernel.org,
	Bart Van Assche <bart.vanassche@wdc.com>,
	Christoph Hellwig <hch@lst.de>, Hannes Reinecke <hare@suse.com>,
	Johannes Thumshirn <jthumshirn@suse.de>
Subject: [PATCH 2/3] Constify scsi_dev_info_list_add_keyed() string arguments
Date: Tue, 14 Nov 2017 16:57:20 -0800	[thread overview]
Message-ID: <20171115005721.11023-3-bart.vanassche@wdc.com> (raw)
In-Reply-To: <20171115005721.11023-1-bart.vanassche@wdc.com>

This patch does not change any functionality.

Signed-off-by: Bart Van Assche <bart.vanassche@wdc.com>
Cc: Christoph Hellwig <hch@lst.de>
Cc: Hannes Reinecke <hare@suse.com>
Cc: Johannes Thumshirn <jthumshirn@suse.de>
---
 drivers/scsi/scsi_devinfo.c | 9 +++++----
 drivers/scsi/scsi_priv.h    | 4 ++--
 2 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/drivers/scsi/scsi_devinfo.c b/drivers/scsi/scsi_devinfo.c
index e63873537139..d195560a641c 100644
--- a/drivers/scsi/scsi_devinfo.c
+++ b/drivers/scsi/scsi_devinfo.c
@@ -292,8 +292,8 @@ static struct scsi_dev_info_list_table *scsi_devinfo_lookup_by_key(int key)
  * scsi_strcpy_devinfo: called from scsi_dev_info_list_add to copy into
  * devinfo vendor and model strings.
  */
-static void scsi_strcpy_devinfo(char *name, char *to, size_t to_length,
-				char *from, int compatible)
+static void scsi_strcpy_devinfo(const char *name, char *to, size_t to_length,
+				const char *from, int compatible)
 {
 	size_t from_length;
 
@@ -360,8 +360,9 @@ static int scsi_dev_info_list_add(int compatible, char *vendor, char *model,
  *
  * Returns: 0 OK, -error on failure.
  **/
-int scsi_dev_info_list_add_keyed(int compatible, char *vendor, char *model,
-				 char *strflags, int flags, int key)
+int scsi_dev_info_list_add_keyed(int compatible, const char *vendor,
+				 const char *model, const char *strflags,
+				 int flags, int key)
 {
 	struct scsi_dev_info_list *devinfo;
 	struct scsi_dev_info_list_table *devinfo_table =
diff --git a/drivers/scsi/scsi_priv.h b/drivers/scsi/scsi_priv.h
index d79759271fe3..b82238577b19 100644
--- a/drivers/scsi/scsi_priv.h
+++ b/drivers/scsi/scsi_priv.h
@@ -58,8 +58,8 @@ extern int scsi_get_device_flags_keyed(struct scsi_device *sdev,
 				       const unsigned char *vendor,
 				       const unsigned char *model, int key,
 				       unsigned int *flags);
-extern int scsi_dev_info_list_add_keyed(int compatible, char *vendor,
-					char *model, char *strflags,
+extern int scsi_dev_info_list_add_keyed(int compatible, const char *vendor,
+					const char *model, const char *strflags,
 					int flags, int key);
 extern int scsi_dev_info_list_del_keyed(char *vendor, char *model, int key);
 extern int scsi_dev_info_add_list(int key, const char *name);
-- 
2.15.0

  parent reply	other threads:[~2017-11-15  1:03 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-15  0:57 [PATCH 0/3] Improve device information handling Bart Van Assche
2017-11-15  0:57 ` [PATCH 1/3] device information: Do not interpret error codes as flags Bart Van Assche
2017-11-15  0:57 ` Bart Van Assche [this message]
2017-11-15  0:57 ` [PATCH 3/3] Introduce a type for device information flags, namely bflags_t Bart Van Assche
  -- strict thread matches above, loose matches on Subject: below --
2017-11-15  2:33 [PATCH 0/3] Improve device information handling Bart Van Assche
2017-11-15  2:33 ` [PATCH 2/3] Constify scsi_dev_info_list_add_keyed() string arguments Bart Van Assche

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=20171115005721.11023-3-bart.vanassche@wdc.com \
    --to=bart.vanassche@wdc.com \
    --cc=hare@suse.com \
    --cc=hch@lst.de \
    --cc=jejb@linux.vnet.ibm.com \
    --cc=jthumshirn@suse.de \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    /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