From: Paul Gortmaker <paul.gortmaker@windriver.com>
To: <linux-kernel@vger.kernel.org>
Cc: Paul Gortmaker <paul.gortmaker@windriver.com>,
Jon Hunter <jonathanh@nvidia.com>,
Kevin Hilman <khilman@baylibre.com>,
Marc Zyngier <marc.zyngier@arm.com>,
John Crispin <john@phrozen.org>,
Ralf Baechle <ralf@linux-mips.org>,
Thomas Gleixner <tglx@linutronix.de>, <linux-mips@linux-mips.org>
Subject: [PATCH] mips: lantiq: fix irq_chip name to not land in new parent field
Date: Tue, 2 Aug 2016 14:54:47 -0400 [thread overview]
Message-ID: <20160802185447.3831-1-paul.gortmaker@windriver.com> (raw)
As of commit be45beb2df69 ("genirq: Add runtime power management
support for IRQ chips") the irq_chip struct got a struct *device
parent_device field added to it. However, it was added at the
beginning of the struct, which previously was the "name" entry.
The driver here was using a mix of ordered struct init entries and
named init entries. It was supplying the name assuming it was the 1st
in the order, and hence when that became a struct *device we get:
arch/mips/lantiq/irq.c:209:2: warning: initialization from incompatible pointer type [enabled by default]
arch/mips/lantiq/irq.c:209:2: warning: (near initialization for 'ltq_irq_type.parent_device') [enabled by default]
arch/mips/lantiq/irq.c:219:2: warning: initialization from incompatible pointer type [enabled by default]
arch/mips/lantiq/irq.c:219:2: warning: (near initialization for 'ltq_eiu_type.parent_device') [enabled by default]
While not runtime tested, I can't imagine trying to dereference a
a struct device field from a char string will end well.
Here we've used named element init entries for the name string as well
to fix it.
Fixes: be45beb2df69 ("genirq: Add runtime power management support for IRQ chips")
Cc: Jon Hunter <jonathanh@nvidia.com>
Cc: Kevin Hilman <khilman@baylibre.com>
Cc: Marc Zyngier <marc.zyngier@arm.com>
Cc: John Crispin <john@phrozen.org>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-mips@linux-mips.org
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
---
[
in mainline via: commit a5c8a01968fc9dc94f182172cee7ab40bc496ea4
Merge: ff5b706f5189 3faf24ea894a
Author: Thomas Gleixner <tglx@linutronix.de>
Date: Mon Jun 13 16:33:48 2016 +0200
Merge tag 'irqchip-for-4.8' of git://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms into irq/core
]
arch/mips/lantiq/irq.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/mips/lantiq/irq.c b/arch/mips/lantiq/irq.c
index ff17669e30a3..02c0252b49a3 100644
--- a/arch/mips/lantiq/irq.c
+++ b/arch/mips/lantiq/irq.c
@@ -206,7 +206,7 @@ static void ltq_shutdown_eiu_irq(struct irq_data *d)
}
static struct irq_chip ltq_irq_type = {
- "icu",
+ .name = "icu",
.irq_enable = ltq_enable_irq,
.irq_disable = ltq_disable_irq,
.irq_unmask = ltq_enable_irq,
@@ -216,7 +216,7 @@ static struct irq_chip ltq_irq_type = {
};
static struct irq_chip ltq_eiu_type = {
- "eiu",
+ .name = "eiu",
.irq_startup = ltq_startup_eiu_irq,
.irq_shutdown = ltq_shutdown_eiu_irq,
.irq_enable = ltq_enable_irq,
--
2.8.4
WARNING: multiple messages have this Message-ID (diff)
From: Paul Gortmaker <paul.gortmaker@windriver.com>
To: linux-kernel@vger.kernel.org
Cc: Paul Gortmaker <paul.gortmaker@windriver.com>,
Jon Hunter <jonathanh@nvidia.com>,
Kevin Hilman <khilman@baylibre.com>,
Marc Zyngier <marc.zyngier@arm.com>,
John Crispin <john@phrozen.org>,
Ralf Baechle <ralf@linux-mips.org>,
Thomas Gleixner <tglx@linutronix.de>,
linux-mips@linux-mips.org
Subject: [PATCH] mips: lantiq: fix irq_chip name to not land in new parent field
Date: Tue, 2 Aug 2016 14:54:47 -0400 [thread overview]
Message-ID: <20160802185447.3831-1-paul.gortmaker@windriver.com> (raw)
Message-ID: <20160802185447.uFFtpui2VQBN2VX4aJ9Auu6Xfcmqo604h0KhFa8zWWI@z> (raw)
As of commit be45beb2df69 ("genirq: Add runtime power management
support for IRQ chips") the irq_chip struct got a struct *device
parent_device field added to it. However, it was added at the
beginning of the struct, which previously was the "name" entry.
The driver here was using a mix of ordered struct init entries and
named init entries. It was supplying the name assuming it was the 1st
in the order, and hence when that became a struct *device we get:
arch/mips/lantiq/irq.c:209:2: warning: initialization from incompatible pointer type [enabled by default]
arch/mips/lantiq/irq.c:209:2: warning: (near initialization for 'ltq_irq_type.parent_device') [enabled by default]
arch/mips/lantiq/irq.c:219:2: warning: initialization from incompatible pointer type [enabled by default]
arch/mips/lantiq/irq.c:219:2: warning: (near initialization for 'ltq_eiu_type.parent_device') [enabled by default]
While not runtime tested, I can't imagine trying to dereference a
a struct device field from a char string will end well.
Here we've used named element init entries for the name string as well
to fix it.
Fixes: be45beb2df69 ("genirq: Add runtime power management support for IRQ chips")
Cc: Jon Hunter <jonathanh@nvidia.com>
Cc: Kevin Hilman <khilman@baylibre.com>
Cc: Marc Zyngier <marc.zyngier@arm.com>
Cc: John Crispin <john@phrozen.org>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-mips@linux-mips.org
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
---
[
in mainline via: commit a5c8a01968fc9dc94f182172cee7ab40bc496ea4
Merge: ff5b706f5189 3faf24ea894a
Author: Thomas Gleixner <tglx@linutronix.de>
Date: Mon Jun 13 16:33:48 2016 +0200
Merge tag 'irqchip-for-4.8' of git://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms into irq/core
]
arch/mips/lantiq/irq.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/mips/lantiq/irq.c b/arch/mips/lantiq/irq.c
index ff17669e30a3..02c0252b49a3 100644
--- a/arch/mips/lantiq/irq.c
+++ b/arch/mips/lantiq/irq.c
@@ -206,7 +206,7 @@ static void ltq_shutdown_eiu_irq(struct irq_data *d)
}
static struct irq_chip ltq_irq_type = {
- "icu",
+ .name = "icu",
.irq_enable = ltq_enable_irq,
.irq_disable = ltq_disable_irq,
.irq_unmask = ltq_enable_irq,
@@ -216,7 +216,7 @@ static struct irq_chip ltq_irq_type = {
};
static struct irq_chip ltq_eiu_type = {
- "eiu",
+ .name = "eiu",
.irq_startup = ltq_startup_eiu_irq,
.irq_shutdown = ltq_shutdown_eiu_irq,
.irq_enable = ltq_enable_irq,
--
2.8.4
next reply other threads:[~2016-08-02 18:55 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-02 18:54 Paul Gortmaker [this message]
2016-08-02 18:54 ` [PATCH] mips: lantiq: fix irq_chip name to not land in new parent field Paul Gortmaker
2016-08-03 5:56 ` Ralf Baechle
2016-08-03 13:31 ` Paul Gortmaker
2016-08-03 13:31 ` Paul Gortmaker
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=20160802185447.3831-1-paul.gortmaker@windriver.com \
--to=paul.gortmaker@windriver.com \
--cc=john@phrozen.org \
--cc=jonathanh@nvidia.com \
--cc=khilman@baylibre.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mips@linux-mips.org \
--cc=marc.zyngier@arm.com \
--cc=ralf@linux-mips.org \
--cc=tglx@linutronix.de \
/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.