From: Thomas Gleixner <tglx@linutronix.de>
To: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
Cc: linux-kernel@vger.kernel.org, mingo@kernel.org
Subject: Re: [PATCH 2/2] irq: Add function pointer table for generic-chip
Date: Mon, 17 Oct 2011 11:00:12 +0200 (CEST) [thread overview]
Message-ID: <alpine.LFD.2.02.1110171055570.3240@ionos> (raw)
In-Reply-To: <1318817327-4589-2-git-send-email-nobuhiro.iwamatsu.yj@renesas.com>
On Mon, 17 Oct 2011, Nobuhiro Iwamatsu wrote:
> This adds the function table to access it with function pointer
> by some functions providedd in generic-chip.
> The driver who uses the function offered in generic-chip can use
> this via this function table.
>
> -/* Generic chip callback functions */
> -void irq_gc_noop(struct irq_data *d);
> -void irq_gc_mask_disable_reg(struct irq_data *d);
> -void irq_gc_mask_set_bit(struct irq_data *d);
> -void irq_gc_mask_clr_bit(struct irq_data *d);
> -void irq_gc_unmask_enable_reg(struct irq_data *d);
> -void irq_gc_ack_set_bit(struct irq_data *d);
> -void irq_gc_ack_clr_bit(struct irq_data *d);
> -void irq_gc_mask_disable_reg_and_ack(struct irq_data *d);
> -void irq_gc_eoi(struct irq_data *d);
> -int irq_gc_set_wake(struct irq_data *d, unsigned int on);
This breaks the world and some more. We have code which references
those functions directly.
> + gc->functions.gc_noop = irq_gc_noop;
> + gc->functions.gc_mask_disable_reg = irq_gc_mask_disable_reg;
> + gc->functions.gc_mask_set_bit = irq_gc_mask_set_bit;
> + gc->functions.gc_mask_clr_bit = irq_gc_mask_clr_bit;
> + gc->functions.gc_unmask_enable_reg = irq_gc_unmask_enable_reg;
> + gc->functions.gc_ack_set_bit = irq_gc_ack_set_bit;
> + gc->functions.gc_ack_clr_bit = irq_gc_ack_clr_bit;
> + gc->functions.gc_mask_disable_reg_and_ack = irq_gc_mask_disable_reg_and_ack;
> + gc->functions.gc_eoi = irq_gc_eoi;
> + gc->functions.gc_set_wake = irq_gc_set_wake;
Why do you want to add that to every instance of generic irq chip?
What I asked for is:
struct bla {
.noop = irq_gc_noop,
...
};
EXPORT_SYMBOL_GPL(bla);
Now when we have this, we can run a coccinelle script over the tree
and convert all current users to use bla.fun instead of the direct
functions and then make those static.
Thanks,
tglx
next prev parent reply other threads:[~2011-10-17 9:00 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-17 2:08 [PATCH v2 1/2] irq: Add EXPORT_SYMBOL_GPL to function of irq generic-chip Nobuhiro Iwamatsu
2011-10-17 2:08 ` [PATCH 2/2] irq: Add function pointer table for generic-chip Nobuhiro Iwamatsu
2011-10-17 9:00 ` Thomas Gleixner [this message]
2011-10-20 3:44 ` Nobuhiro Iwamatsu
2011-10-24 13:23 ` [PATCH v2 1/2] irq: Add EXPORT_SYMBOL_GPL to function of irq generic-chip Grant Likely
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=alpine.LFD.2.02.1110171055570.3240@ionos \
--to=tglx@linutronix.de \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=nobuhiro.iwamatsu.yj@renesas.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.