2008-11-22 17:36:46

by Al Viro

[permalink] [raw]
Subject: [PATCH 11/32] of_platform_driver noise on sparce


switch to __init for those; unlike powerpc sparc has no hotplug support
for that stuff and their ->probe() tends to call __init functions while
being declared __devinit.

Signed-off-by: Al Viro <[email protected]>
---
arch/sparc64/kernel/pci_fire.c | 2 +-
arch/sparc64/kernel/pci_psycho.c | 4 ++--
arch/sparc64/kernel/pci_sun4v.c | 2 +-
drivers/sbus/char/bbc_i2c.c | 6 +++---
sound/sparc/cs4231.c | 10 +++++-----
5 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/arch/sparc64/kernel/pci_fire.c b/arch/sparc64/kernel/pci_fire.c
--- a/arch/sparc64/kernel/pci_fire.c
+++ b/arch/sparc64/kernel/pci_fire.c
@@ -455,7 +455,7 @@ static int __init pci_fire_pbm_init(struct pci_pbm_info *pbm,
return 0;
}

-static int __devinit fire_probe(struct of_device *op,
+static int __init fire_probe(struct of_device *op,
const struct of_device_id *match)
{
struct device_node *dp = op->node;
diff --git a/arch/sparc64/kernel/pci_psycho.c b/arch/sparc64/kernel/pci_psycho.c
--- a/arch/sparc64/kernel/pci_psycho.c
+++ b/arch/sparc64/kernel/pci_psycho.c
@@ -493,7 +493,7 @@ static void __init psycho_pbm_init(struct pci_pbm_info *pbm,
psycho_scan_bus(pbm, &op->dev);
}

-static struct pci_pbm_info * __devinit psycho_find_sibling(u32 upa_portid)
+static struct pci_pbm_info * __init psycho_find_sibling(u32 upa_portid)
{
struct pci_pbm_info *pbm;

@@ -506,7 +506,7 @@ static struct pci_pbm_info * __devinit psycho_find_sibling(u32 upa_portid)

#define PSYCHO_CONFIGSPACE 0x001000000UL

-static int __devinit psycho_probe(struct of_device *op,
+static int __init psycho_probe(struct of_device *op,
const struct of_device_id *match)
{
const struct linux_prom64_registers *pr_regs;
diff --git a/arch/sparc64/kernel/pci_sun4v.c b/arch/sparc64/kernel/pci_sun4v.c
--- a/arch/sparc64/kernel/pci_sun4v.c
+++ b/arch/sparc64/kernel/pci_sun4v.c
@@ -929,7 +929,7 @@ static int __init pci_sun4v_pbm_init(struct pci_pbm_info *pbm,
return 0;
}

-static int __devinit pci_sun4v_probe(struct of_device *op,
+static int __init pci_sun4v_probe(struct of_device *op,
const struct of_device_id *match)
{
const struct linux_prom64_registers *regs;
diff --git a/drivers/sbus/char/bbc_i2c.c b/drivers/sbus/char/bbc_i2c.c
--- a/drivers/sbus/char/bbc_i2c.c
+++ b/drivers/sbus/char/bbc_i2c.c
@@ -361,7 +361,7 @@ fail:
extern int bbc_envctrl_init(struct bbc_i2c_bus *bp);
extern void bbc_envctrl_cleanup(struct bbc_i2c_bus *bp);

-static int __devinit bbc_i2c_probe(struct of_device *op,
+static int __init bbc_i2c_probe(struct of_device *op,
const struct of_device_id *match)
{
struct bbc_i2c_bus *bp;
@@ -386,7 +386,7 @@ static int __devinit bbc_i2c_probe(struct of_device *op,
return err;
}

-static int __devexit bbc_i2c_remove(struct of_device *op)
+static int __exit bbc_i2c_remove(struct of_device *op)
{
struct bbc_i2c_bus *bp = dev_get_drvdata(&op->dev);

@@ -417,7 +417,7 @@ static struct of_platform_driver bbc_i2c_driver = {
.name = "bbc_i2c",
.match_table = bbc_i2c_match,
.probe = bbc_i2c_probe,
- .remove = __devexit_p(bbc_i2c_remove),
+ .remove = __exit_p(bbc_i2c_remove),
};

static int __init bbc_i2c_init(void)
diff --git a/sound/sparc/cs4231.c b/sound/sparc/cs4231.c
--- a/sound/sparc/cs4231.c
+++ b/sound/sparc/cs4231.c
@@ -1856,7 +1856,7 @@ static int __init snd_cs4231_sbus_create(struct snd_card *card,
return 0;
}

-static int __devinit cs4231_sbus_probe(struct of_device *op, const struct of_device_id *match)
+static int __init cs4231_sbus_probe(struct of_device *op, const struct of_device_id *match)
{
struct resource *rp = &op->resource[0];
struct snd_card *card;
@@ -2048,7 +2048,7 @@ static int __init snd_cs4231_ebus_create(struct snd_card *card,
return 0;
}

-static int __devinit cs4231_ebus_probe(struct of_device *op, const struct of_device_id *match)
+static int __init cs4231_ebus_probe(struct of_device *op, const struct of_device_id *match)
{
struct snd_card *card;
int err;
@@ -2072,7 +2072,7 @@ static int __devinit cs4231_ebus_probe(struct of_device *op, const struct of_dev
}
#endif

-static int __devinit cs4231_probe(struct of_device *op, const struct of_device_id *match)
+static int __init cs4231_probe(struct of_device *op, const struct of_device_id *match)
{
#ifdef EBUS_SUPPORT
if (!strcmp(op->node->parent->name, "ebus"))
@@ -2086,7 +2086,7 @@ static int __devinit cs4231_probe(struct of_device *op, const struct of_device_i
return -ENODEV;
}

-static int __devexit cs4231_remove(struct of_device *op)
+static int __exit cs4231_remove(struct of_device *op)
{
struct snd_cs4231 *chip = dev_get_drvdata(&op->dev);

@@ -2112,7 +2112,7 @@ static struct of_platform_driver cs4231_driver = {
.name = "audio",
.match_table = cs4231_match,
.probe = cs4231_probe,
- .remove = __devexit_p(cs4231_remove),
+ .remove = __exit_p(cs4231_remove),
};

static int __init cs4231_init(void)


2008-11-26 09:05:55

by David Miller

[permalink] [raw]
Subject: Re: [PATCH 11/32] of_platform_driver noise on sparce

From: Al Viro <[email protected]>
Date: Sat, 22 Nov 2008 17:35:04 +0000

>
> switch to __init for those; unlike powerpc sparc has no hotplug support
> for that stuff and their ->probe() tends to call __init functions while
> being declared __devinit.
>
> Signed-off-by: Al Viro <[email protected]>
> ---
> arch/sparc64/kernel/pci_fire.c | 2 +-
> arch/sparc64/kernel/pci_psycho.c | 4 ++--
> arch/sparc64/kernel/pci_sun4v.c | 2 +-
> drivers/sbus/char/bbc_i2c.c | 6 +++---
> sound/sparc/cs4231.c | 10 +++++-----
> 5 files changed, 12 insertions(+), 12 deletions(-)

There's tons of sparc specific drivers not handled here.
For example, drivers/scsi/sun_esp.c, drivers/scsi/qlogicpti.c,
and on and on and on.

In fact there are more sparc specific drivers using
of_platform_driver under drivers/ thans powerpc :)

I don't think I want to do this for now, sorry Al.

2008-11-30 21:23:41

by Al Viro

[permalink] [raw]
Subject: [please, revert] Re: [PATCH 11/32] of_platform_driver noise on sparce

On Wed, Nov 26, 2008 at 01:05:41AM -0800, David Miller wrote:
> There's tons of sparc specific drivers not handled here.
> For example, drivers/scsi/sun_esp.c, drivers/scsi/qlogicpti.c,
> and on and on and on.
>
> In fact there are more sparc specific drivers using
> of_platform_driver under drivers/ thans powerpc :)
>
> I don't think I want to do this for now, sorry Al.

Argh... Looks like that got picked despite the NAK ;-/

Linus, could you revert commit e669dae6141ff97d3c7566207f5de3b487dcf837?
NAKed by maintainer, so...

2008-12-01 06:56:53

by David Miller

[permalink] [raw]
Subject: Re: [PATCH 11/32] of_platform_driver noise on sparce

From: David Miller <[email protected]>
Date: Wed, 26 Nov 2008 01:05:41 -0800 (PST)

Linus, just a note.

I don't know what the point of my reviewing and replying to Al's
patches is, if you're going to apply them anyways.

I also applied all of his other sparc64 patches (the ones I did think
were OK), but I did so to my sparc-next-2.6 tree, as none of this
stuff really needs to go into 2.6.28 at this point.

I've already broken sparc32 by mistake with some section annotation
"fixes" I thought were obvious. So it's just not worth the risk in
my opinion.

And I gave suitable "applied" responses to those postings as well.

Yet you applied those to your tree directly too.

Sure, if the changes are OK, you applying them directly is fine.
But I did NAK this one specifically.

Again, just FYI...

> From: Al Viro <[email protected]>
> Date: Sat, 22 Nov 2008 17:35:04 +0000
>
> >
> > switch to __init for those; unlike powerpc sparc has no hotplug support
> > for that stuff and their ->probe() tends to call __init functions while
> > being declared __devinit.
> >
> > Signed-off-by: Al Viro <[email protected]>
> > ---
> > arch/sparc64/kernel/pci_fire.c | 2 +-
> > arch/sparc64/kernel/pci_psycho.c | 4 ++--
> > arch/sparc64/kernel/pci_sun4v.c | 2 +-
> > drivers/sbus/char/bbc_i2c.c | 6 +++---
> > sound/sparc/cs4231.c | 10 +++++-----
> > 5 files changed, 12 insertions(+), 12 deletions(-)
>
> There's tons of sparc specific drivers not handled here.
> For example, drivers/scsi/sun_esp.c, drivers/scsi/qlogicpti.c,
> and on and on and on.
>
> In fact there are more sparc specific drivers using
> of_platform_driver under drivers/ thans powerpc :)
>
> I don't think I want to do this for now, sorry Al.

2008-12-01 07:14:08

by David Miller

[permalink] [raw]
Subject: Re: [please, revert] Re: [PATCH 11/32] of_platform_driver noise on sparce

From: Al Viro <[email protected]>
Date: Sun, 30 Nov 2008 21:23:29 +0000

> On Wed, Nov 26, 2008 at 01:05:41AM -0800, David Miller wrote:
> > There's tons of sparc specific drivers not handled here.
> > For example, drivers/scsi/sun_esp.c, drivers/scsi/qlogicpti.c,
> > and on and on and on.
> >
> > In fact there are more sparc specific drivers using
> > of_platform_driver under drivers/ thans powerpc :)
> >
> > I don't think I want to do this for now, sorry Al.
>
> Argh... Looks like that got picked despite the NAK ;-/

It looks like all of your patches got applied regardless of
what followups they received.

I'll chalk this up to a simple oversight given that Linus just
got back from a week of vacation :)

> Linus, could you revert commit e669dae6141ff97d3c7566207f5de3b487dcf837?
> NAKed by maintainer, so...

I'd really like the other sparc changes to get kicked out as well,
which as I just indicated in another reply I put into my
sparc-next-2.6 tree instead. The risk is just not worth it as I've
broken sparc already with similar "obvious" section fixups.

This is really a big hassle for another reason, because Sam is in the
process of unifying sparc32 and sparc64 in the sparc-next-2.6 tree.

Now that these changes went into upstream it's possible that I'm going
to have a lot of fun sorting out the merge conflicts. Although some
initial test merges indicate that we might be able get away with this
one with only minor pain.

2008-12-01 16:36:50

by Linus Torvalds

[permalink] [raw]
Subject: Re: [please, revert] Re: [PATCH 11/32] of_platform_driver noise on sparce



On Sun, 30 Nov 2008, David Miller wrote:
>
> It looks like all of your patches got applied regardless of
> what followups they received.
>
> I'll chalk this up to a simple oversight given that Linus just
> got back from a week of vacation :)

Yes. But also to me simply being pretty much conditioned to applying Al's
patches regardless (they often cross maintainer boundaries, and they are
almost always correct). So even in the absense of vacation, it probably
would have happened.

But it's reverted now.

Linus