Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3628aa06 authored by David S. Miller's avatar David S. Miller
Browse files

sparc64: Fix section mis-match errors.



Fix all of the problems spotted by CONFIG_DEBUG_SECTION_MISMATCH under
arch/sparc during a 64-bit defconfig build.

They fall into two categorites:

1) of_device_id is marked as __initdata, and we can never do this
   since these objects sit in the device core data structures way
   past boot.  So even if a driver will never be reloaded, we have
   to keep the device ID table around.

   Mark such cases const instead.

2) The bootmem alloc/free handling code in mdesc.c was not fully
   marked __init as it should be, thus generating a reference
   to free_bootmem_late() (which is __init) from non-__init code.

Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent c897dcf6
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -93,7 +93,7 @@ void auxio_set_lte(int on)
}
EXPORT_SYMBOL(auxio_set_lte);

static struct of_device_id __initdata auxio_match[] = {
static const struct of_device_id auxio_match[] = {
	{
		.name = "auxio",
	},
+2 −2
Original line number Diff line number Diff line
@@ -140,7 +140,7 @@ static int __devinit clock_board_probe(struct platform_device *op)
	goto out;
}

static struct of_device_id __initdata clock_board_match[] = {
static const struct of_device_id clock_board_match[] = {
	{
		.name = "clock-board",
	},
@@ -245,7 +245,7 @@ static int __devinit fhc_probe(struct platform_device *op)
	goto out;
}

static struct of_device_id __initdata fhc_match[] = {
static const struct of_device_id fhc_match[] = {
	{
		.name = "fhc",
	},
+1 −1
Original line number Diff line number Diff line
@@ -1218,7 +1218,7 @@ static int ds_remove(struct vio_dev *vdev)
	return 0;
}

static struct vio_device_id __initdata ds_match[] = {
static const struct vio_device_id ds_match[] = {
	{
		.type = "domain-services-port",
	},
+1 −1
Original line number Diff line number Diff line
@@ -107,7 +107,7 @@ static struct mdesc_handle * __init mdesc_memblock_alloc(unsigned int mdesc_size
	return hp;
}

static void mdesc_memblock_free(struct mdesc_handle *hp)
static void __init mdesc_memblock_free(struct mdesc_handle *hp)
{
	unsigned int alloc_size;
	unsigned long start;
+1 −1
Original line number Diff line number Diff line
@@ -496,7 +496,7 @@ static int __devinit fire_probe(struct platform_device *op)
	return err;
}

static struct of_device_id __initdata fire_match[] = {
static const struct of_device_id fire_match[] = {
	{
		.name = "pci",
		.compatible = "pciex108e,80f0",
Loading