mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] libata: finally use __initconst in ata_parse_force_one()
@ 2015-06-09 13:33 Rasmus Villemoes
  2015-06-10  4:47 ` Tejun Heo
  0 siblings, 1 reply; 2+ messages in thread
From: Rasmus Villemoes @ 2015-06-09 13:33 UTC (permalink / raw)
  To: Tejun Heo; +Cc: Rasmus Villemoes, linux-ide, linux-kernel

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>
---
 drivers/ata/libata-core.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
index 577849c6611a..9581e6f6cd0e 100644
--- a/drivers/ata/libata-core.c
+++ b/drivers/ata/libata-core.c
@@ -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 },
-- 
2.1.3


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] libata: finally use __initconst in ata_parse_force_one()
  2015-06-09 13:33 [PATCH] libata: finally use __initconst in ata_parse_force_one() Rasmus Villemoes
@ 2015-06-10  4:47 ` Tejun Heo
  0 siblings, 0 replies; 2+ messages in thread
From: Tejun Heo @ 2015-06-10  4:47 UTC (permalink / raw)
  To: Rasmus Villemoes; +Cc: linux-ide, linux-kernel

On Tue, Jun 09, 2015 at 03:33:19PM +0200, Rasmus Villemoes wrote:
> 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.

Heh, seriously.

Applied to libata/for-4.2.

Thanks!

-- 
tejun

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-06-10  4:47 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-09 13:33 [PATCH] libata: finally use __initconst in ata_parse_force_one() Rasmus Villemoes
2015-06-10  4:47 ` Tejun Heo

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®