From: Tejun Heo <tj@kernel.org>
To: LABBE Corentin <clabbe.montjoie@gmail.com>
Cc: b.zolnierkie@samsung.com, linux-ide@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: [PATCH] pata_it821x: use "const char *" for string literals
Date: Thu, 15 Oct 2015 11:10:23 -0400 [thread overview]
Message-ID: <20151015151023.GA27717@mtj.duckdns.org> (raw)
In-Reply-To: <1444850312-18158-1-git-send-email-clabbe.montjoie@gmail.com>
Hello,
Applied with updates to title and description.
Thanks.
----- 8< -----
>From 3a53b3bcc7af2f7ddfb682cb8efb26e40fe50fb1 Mon Sep 17 00:00:00 2001
From: LABBE Corentin <clabbe.montjoie@gmail.com>
Date: Wed, 14 Oct 2015 21:18:31 +0200
Some string literals are pointed to by "char *". This patch fixes
that.
tj: Updated patch title and description.
Signed-off-by: LABBE Corentin <clabbe.montjoie@gmail.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
---
drivers/ata/pata_it821x.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/ata/pata_it821x.c b/drivers/ata/pata_it821x.c
index a5088ec..7a21edf 100644
--- a/drivers/ata/pata_it821x.c
+++ b/drivers/ata/pata_it821x.c
@@ -604,9 +604,9 @@ static void it821x_display_disk(int n, u8 *buf)
{
unsigned char id[41];
int mode = 0;
- char *mtype = "";
+ const char *mtype = "";
char mbuf[8];
- char *cbl = "(40 wire cable)";
+ const char *cbl = "(40 wire cable)";
static const char *types[5] = {
"RAID0", "RAID1", "RAID 0+1", "JBOD", "DISK"
@@ -903,7 +903,7 @@ static int it821x_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
};
const struct ata_port_info *ppi[] = { NULL, NULL };
- static char *mode[2] = { "pass through", "smart" };
+ static const char *mode[2] = { "pass through", "smart" };
int rc;
rc = pcim_enable_device(pdev);
--
2.4.3
prev parent reply other threads:[~2015-10-15 15:10 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-14 19:18 [PATCH] ata/pata_it821x: set array of const as const LABBE Corentin
2015-10-15 15:10 ` Tejun Heo [this message]
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=20151015151023.GA27717@mtj.duckdns.org \
--to=tj@kernel.org \
--cc=b.zolnierkie@samsung.com \
--cc=clabbe.montjoie@gmail.com \
--cc=linux-ide@vger.kernel.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®