libata: finally use __initconst in ata_parse_force_one()
authorRasmus Villemoes <linux@rasmusvillemoes.dk>
Tue, 9 Jun 2015 13:33:19 +0000 (15:33 +0200)
committerTejun Heo <tj@kernel.org>
Wed, 10 Jun 2015 04:45:27 +0000 (13:45 +0900)
Just six days after this FIXME was added seven years ago, Sam Ravnborg
added the missing feature (37c514e3dfc8 "Add missing init section
definitions"), though it ended up being called __initconst.

Let's use it; better late than never.

Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Signed-off-by: Tejun Heo <tj@kernel.org>
drivers/ata/libata-core.c

index 52c640d..86052e8 100644 (file)
@@ -6456,12 +6456,7 @@ static int __init ata_parse_force_one(char **cur,
                                      struct ata_force_ent *force_ent,
                                      const char **reason)
 {
-       /* FIXME: Currently, there's no way to tag init const data and
-        * using __initdata causes build failure on some versions of
-        * gcc.  Once __initdataconst is implemented, add const to the
-        * following structure.
-        */
-       static struct ata_force_param force_tbl[] __initdata = {
+       static const struct ata_force_param force_tbl[] __initconst = {
                { "40c",        .cbl            = ATA_CBL_PATA40 },
                { "80c",        .cbl            = ATA_CBL_PATA80 },
                { "short40c",   .cbl            = ATA_CBL_PATA40_SHORT },