From: Joe Perches <joe@perches.com>
To: Jesse Barnes <jbarnes@virtuousgeek.org>
Cc: linux-pci <linux-pci@vger.kernel.org>,
LKML <linux-kernel@vger.kernel.org>,
Stephen Hemminger <shemminger@vyatta.com>
Subject: [PATCH] include/linux/pci.h: Make struct pci_driver.name const char *
Date: Thu, 09 Sep 2010 00:38:04 -0700 [thread overview]
Message-ID: <1284017884.24986.93.camel@Joe-Laptop> (raw)
As far as I can tell, name is never modified.
This would allow names to be assigned
from variables in non-writable sections.
static const foo[] = "bar";
struct pci_driver baz = {
.name = foo;
};
Signed-off-by: Joe Perches <joe@perches.com>
---
diff --git a/include/linux/pci.h b/include/linux/pci.h
index b1d1795..acdd032 100644
--- a/include/linux/pci.h
+++ b/include/linux/pci.h
@@ -541,7 +541,7 @@ struct pci_error_handlers {
struct module;
struct pci_driver {
struct list_head node;
- char *name;
+ const char *name;
const struct pci_device_id *id_table; /* must be non-NULL for probe to be called */
int (*probe) (struct pci_dev *dev, const struct pci_device_id *id); /* New device inserted */
void (*remove) (struct pci_dev *dev); /* Device removed (NULL if not a hot-plug capable driver) */
next reply other threads:[~2010-09-09 7:38 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-09 7:38 Joe Perches [this message]
2010-09-09 14:54 ` Stephen Hemminger
2010-09-09 15:23 ` Joe Perches
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=1284017884.24986.93.camel@Joe-Laptop \
--to=joe@perches.com \
--cc=jbarnes@virtuousgeek.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=shemminger@vyatta.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
all inboxes | Powered by JetHome®