diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2012-11-05 19:16:27 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2012-11-05 19:16:27 +0000 |
commit | 29658c96ce9914fdf4ff4e3519fbec696ef32118 (patch) | |
tree | 94ae3a33b6da3a7eb7e7354e30b147e8e406b496 /sys/sparc64 | |
parent | 5b6478b07785cbc4771d7f164985bbd0a547091d (diff) | |
download | src-29658c96ce9914fdf4ff4e3519fbec696ef32118.tar.gz src-29658c96ce9914fdf4ff4e3519fbec696ef32118.zip |
Remove duplicate const specifiers in many drivers (I hope I got all of
them, please let me know if not). Most of these are of the form:
static const struct bzzt_type {
[...list of members...]
} const bzzt_devs[] = {
[...list of initializers...]
};
The second const is unnecessary, as arrays cannot be modified anyway,
and if the elements are const, the whole thing is const automatically
(e.g. it is placed in .rodata).
I have verified this does not change the binary output of a full kernel
build (except for build timestamps embedded in the object files).
Reviewed by: yongari, marius
MFC after: 1 week
Notes
Notes:
svn path=/head/; revision=242625
Diffstat (limited to 'sys/sparc64')
-rw-r--r-- | sys/sparc64/pci/fire.c | 2 | ||||
-rw-r--r-- | sys/sparc64/pci/psycho.c | 4 | ||||
-rw-r--r-- | sys/sparc64/pci/schizo.c | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/sys/sparc64/pci/fire.c b/sys/sparc64/pci/fire.c index 324400a19c2e..080d57c5f08a 100644 --- a/sys/sparc64/pci/fire.c +++ b/sys/sparc64/pci/fire.c @@ -249,7 +249,7 @@ struct fire_desc { const char *fd_name; }; -static const struct fire_desc const fire_compats[] = { +static const struct fire_desc fire_compats[] = { { "pciex108e,80f0", FIRE_MODE_FIRE, "Fire" }, #if 0 { "pciex108e,80f8", FIRE_MODE_OBERON, "Oberon" }, diff --git a/sys/sparc64/pci/psycho.c b/sys/sparc64/pci/psycho.c index 0ebbb408352d..a44af7ca8bfa 100644 --- a/sys/sparc64/pci/psycho.c +++ b/sys/sparc64/pci/psycho.c @@ -222,14 +222,14 @@ struct psycho_desc { const char *pd_name; }; -static const struct psycho_desc const psycho_compats[] = { +static const struct psycho_desc psycho_compats[] = { { "pci108e,8000", PSYCHO_MODE_PSYCHO, "Psycho compatible" }, { "pci108e,a000", PSYCHO_MODE_SABRE, "Sabre compatible" }, { "pci108e,a001", PSYCHO_MODE_SABRE, "Hummingbird compatible" }, { NULL, 0, NULL } }; -static const struct psycho_desc const psycho_models[] = { +static const struct psycho_desc psycho_models[] = { { "SUNW,psycho", PSYCHO_MODE_PSYCHO, "Psycho" }, { "SUNW,sabre", PSYCHO_MODE_SABRE, "Sabre" }, { NULL, 0, NULL } diff --git a/sys/sparc64/pci/schizo.c b/sys/sparc64/pci/schizo.c index 44eadcb5c846..f92aa78de262 100644 --- a/sys/sparc64/pci/schizo.c +++ b/sys/sparc64/pci/schizo.c @@ -229,7 +229,7 @@ struct schizo_desc { const char *sd_name; }; -static const struct schizo_desc const schizo_compats[] = { +static const struct schizo_desc schizo_compats[] = { { "pci108e,8001", SCHIZO_MODE_SCZ, "Schizo" }, #if 0 { "pci108e,8002", SCHIZO_MODE_XMS, "XMITS" }, |