include/linux/pci.h: Make struct pci_driver.name const char *
PATCH 1/1 include/linux/pci.h: Make struct pci_driver.name const char *
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 <[email protected]>
---
include/linux/pci.h +1 -1
@@ -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) */
Quoted 5 lines · On Thu, 09 Sep 2010 00:38:04 -0700 Joe Perches <[email protected]> wrote:
As far as I can tell, name is never modified.
This would allow names to be assigned
from variables in non-writable sections.
Quoted 8 lines
static const foo[] = "bar";
struct pci_driver baz = { .name = foo; };Signed-off-by Joe Perches <[email protected]>---
I already sent same patch to Jesse
Quoted 4 lines · Stephen Hemminger
Quoted 1 line · On Thu, 09 Sep 2010 00:38:04 -0700 Joe Perches <[email protected]> wrote:
As far as I can tell, name is never modified.
I already sent same patch to Jesse
Great.
I found it now on linux-pci.
https://patchwork.kernel.org/project/linux-pci/list/
I think it's better to cc lkml with patches to enable easier searches of the patchwork queue in a single place.
https://patchwork.kernel.org/project/LKML/list/
cheers, Joe