diff mbox

[15/16] irqchip: vic: mark vic_of_init() as static

Message ID 1353448867-15008-16-git-send-email-thomas.petazzoni@free-electrons.com (mailing list archive)
State New, archived
Headers show

Commit Message

Thomas Petazzoni Nov. 20, 2012, 10:01 p.m. UTC
With all vic_of_init() users converted to the irqchip infrastructure,
there is no longer a reason for this function to be
exported. Therefore, mark it as static.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 drivers/irqchip/irq-vic.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Linus Walleij Nov. 21, 2012, 12:40 p.m. UTC | #1
On Tue, Nov 20, 2012 at 11:01 PM, Thomas Petazzoni
<thomas.petazzoni@free-electrons.com> wrote:

> With all vic_of_init() users converted to the irqchip infrastructure,
> there is no longer a reason for this function to be
> exported. Therefore, mark it as static.
>
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>

It may be that I have missed some patches, but are really all VIC
users converted in this patch series?

In arch/arm/mach-u300/core.c I have this:
        vic_init((void __iomem *) U300_INTCON0_VBASE, IRQ_U300_INTCON0_START,
                 mask[0], mask[0]);
        vic_init((void __iomem *) U300_INTCON1_VBASE, IRQ_U300_INTCON1_START,
                 mask[1], mask[1]);

arch/arm/mach-nomadik/cpu-8815.c:

        /* This modified VIC cell has two register blocks, at 0 and 0x20 */
        vic_init(io_p2v(NOMADIK_IC_BASE + 0x00), IRQ_VIC_START +  0, ~0, 0);
        vic_init(io_p2v(NOMADIK_IC_BASE + 0x20), IRQ_VIC_START + 32, ~0, 0);

And there are more still I think? I didn't see those converted so
I guess I must have missed some patches or something?

PS please make sure u300_defconfig and nhk8815_defconfig builds, or
I will be a sad puppy ...

Yours,
Linus Walleij
Thomas Petazzoni Nov. 21, 2012, 12:53 p.m. UTC | #2
Dear Linus Walleij,

On Wed, 21 Nov 2012 13:40:57 +0100, Linus Walleij wrote:
> On Tue, Nov 20, 2012 at 11:01 PM, Thomas Petazzoni
> <thomas.petazzoni@free-electrons.com> wrote:
> 
> > With all vic_of_init() users converted to the irqchip infrastructure,
> > there is no longer a reason for this function to be
> > exported. Therefore, mark it as static.
> >
> > Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> 
> It may be that I have missed some patches, but are really all VIC
> users converted in this patch series?
> 
> In arch/arm/mach-u300/core.c I have this:
>         vic_init((void __iomem *) U300_INTCON0_VBASE, IRQ_U300_INTCON0_START,
>                  mask[0], mask[0]);
>         vic_init((void __iomem *) U300_INTCON1_VBASE, IRQ_U300_INTCON1_START,
>                  mask[1], mask[1]);
> 
> arch/arm/mach-nomadik/cpu-8815.c:
> 
>         /* This modified VIC cell has two register blocks, at 0 and 0x20 */
>         vic_init(io_p2v(NOMADIK_IC_BASE + 0x00), IRQ_VIC_START +  0, ~0, 0);
>         vic_init(io_p2v(NOMADIK_IC_BASE + 0x20), IRQ_VIC_START + 32, ~0, 0);
> 
> And there are more still I think? I didn't see those converted so
> I guess I must have missed some patches or something?

In this patch series, I'm making vic_of_init() static. vic_init() used
by non-DT platforms is kept as is, with no change, so I'm not sure why
you're worried about vic_init() being a problem.

> PS please make sure u300_defconfig and nhk8815_defconfig builds, or
> I will be a sad puppy ...

Indeed. The whole thing needs more testing, for sure. I guess I should
have labeled it as RFC, because it's really what it is.

Best regards,

Thomas
Linus Walleij Nov. 21, 2012, 2:40 p.m. UTC | #3
On Wed, Nov 21, 2012 at 1:53 PM, Thomas Petazzoni
<thomas.petazzoni@free-electrons.com> wrote:
> On Wed, 21 Nov 2012 13:40:57 +0100, Linus Walleij wrote:

>> It may be that I have missed some patches, but are really all VIC
>> users converted in this patch series?
>
> In this patch series, I'm making vic_of_init() static. vic_init() used
> by non-DT platforms is kept as is, with no change, so I'm not sure why
> you're worried about vic_init() being a problem.

Probably because I didn't parse the _of_ part :-/

Sorry about the fuzz!

But the idea is to use the same convenient mechanism for
the non-DT platforms later, so we get rid of all the incldue
headers I guess?

Yours,
Linus Walleij
Thomas Petazzoni Nov. 21, 2012, 2:46 p.m. UTC | #4
Linus,

On Wed, 21 Nov 2012 15:40:02 +0100, Linus Walleij wrote:
> On Wed, Nov 21, 2012 at 1:53 PM, Thomas Petazzoni
> <thomas.petazzoni@free-electrons.com> wrote:
> > On Wed, 21 Nov 2012 13:40:57 +0100, Linus Walleij wrote:
> 
> >> It may be that I have missed some patches, but are really all VIC
> >> users converted in this patch series?
> >
> > In this patch series, I'm making vic_of_init() static. vic_init() used
> > by non-DT platforms is kept as is, with no change, so I'm not sure why
> > you're worried about vic_init() being a problem.
> 
> Probably because I didn't parse the _of_ part :-/
> 
> Sorry about the fuzz!

No problem :)

> But the idea is to use the same convenient mechanism for
> the non-DT platforms later, so we get rid of all the incldue
> headers I guess?

Yes. I personally haven't yet thought of this part of the problem, but
I think Rob has a plan, and if not, we can certainly think of one
without too much problems.

Best regards,

Thomas
Rob Herring Nov. 21, 2012, 3:07 p.m. UTC | #5
On 11/21/2012 08:46 AM, Thomas Petazzoni wrote:
> Linus,
> 
> On Wed, 21 Nov 2012 15:40:02 +0100, Linus Walleij wrote:
>> On Wed, Nov 21, 2012 at 1:53 PM, Thomas Petazzoni
>> <thomas.petazzoni@free-electrons.com> wrote:
>>> On Wed, 21 Nov 2012 13:40:57 +0100, Linus Walleij wrote:
>>
>>>> It may be that I have missed some patches, but are really all VIC
>>>> users converted in this patch series?
>>>
>>> In this patch series, I'm making vic_of_init() static. vic_init() used
>>> by non-DT platforms is kept as is, with no change, so I'm not sure why
>>> you're worried about vic_init() being a problem.
>>
>> Probably because I didn't parse the _of_ part :-/
>>
>> Sorry about the fuzz!
> 
> No problem :)
> 
>> But the idea is to use the same convenient mechanism for
>> the non-DT platforms later, so we get rid of all the incldue
>> headers I guess?
> 
> Yes. I personally haven't yet thought of this part of the problem, but
> I think Rob has a plan, and if not, we can certainly think of one
> without too much problems.

While we can trim down the headers, I don't think we will get rid of
them in all cases. My only plan was everything gets converted to DT.
Then we can remove gic_init, gic_cascade_irq, and vic_init.

Rob
Thomas Petazzoni Nov. 21, 2012, 3:20 p.m. UTC | #6
Rob,

On Wed, 21 Nov 2012 09:07:59 -0600, Rob Herring wrote:

> > Yes. I personally haven't yet thought of this part of the problem, but
> > I think Rob has a plan, and if not, we can certainly think of one
> > without too much problems.
> 
> While we can trim down the headers, I don't think we will get rid of
> them in all cases. My only plan was everything gets converted to DT.
> Then we can remove gic_init, gic_cascade_irq, and vic_init.

Sounds like a good plan :-)

Thomas
diff mbox

Patch

diff --git a/drivers/irqchip/irq-vic.c b/drivers/irqchip/irq-vic.c
index 98a0708..c8c8cab 100644
--- a/drivers/irqchip/irq-vic.c
+++ b/drivers/irqchip/irq-vic.c
@@ -440,7 +440,8 @@  void __init vic_init(void __iomem *base, unsigned int irq_start,
 }
 
 #ifdef CONFIG_OF
-int __init vic_of_init(struct device_node *node, struct device_node *parent)
+static int __init vic_of_init(struct device_node *node,
+			      struct device_node *parent)
 {
 	void __iomem *regs;
 	int irq_base;