Skip to content

Commit

Permalink
ide: icside: remove incorrect initconst annotation
Browse files Browse the repository at this point in the history
The icside_probe function can be called for hotplugged devices, so
its reference to the __initconst icside_v6_port_info variable
may be invalid, as Kbuild points out:

WARNING: drivers/ide/icside.o(.text+0x338): Section mismatch in reference from the function icside_probe()
 to the (unknown reference) .init.rodata:(unknown)

Interestingly, this problem only shows up with clang but not
with gcc, which optimizes out the __initconst variable.

This removes the incorrect annotation.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Arnd Bergmann authored and David S. Miller committed Mar 20, 2016
1 parent 142b9e6 commit eccf432
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/ide/icside.c
Original file line number Diff line number Diff line change
Expand Up @@ -451,7 +451,7 @@ static int icside_register_v5(struct icside_state *state,
return ret;
}

static const struct ide_port_info icside_v6_port_info __initconst = {
static const struct ide_port_info icside_v6_port_info = {
.init_dma = icside_dma_off_init,
.port_ops = &icside_v6_no_dma_port_ops,
.host_flags = IDE_HFLAG_SERIALIZE | IDE_HFLAG_MMIO,
Expand Down

0 comments on commit eccf432

Please sign in to comment.