From: Arend van Spriel <arend@broadcom.com>
To: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: Kalle Valo <kvalo@codeaurora.org>,
linux-next@vger.kernel.org, linux-kernel@vger.kernel.org, "Fu,
Zhonghui" <zhonghui.fu@linux.intel.com>
Subject: Re: linux-next: build failure after merge of the wireless-drivers-next tree
Date: Wed, 27 May 2015 11:08:35 +0200 [thread overview]
Message-ID: <55658993.8060709@broadcom.com> (raw)
In-Reply-To: <20150527120358.47b88a4b@canb.auug.org.au>
[-- Attachment #1: Type: text/plain, Size: 730 bytes --]
On 05/27/15 04:03, Stephen Rothwell wrote:
> Hi Kalle,
>
> After merging the wireless-drivers-next tree, today's linux-next build
> (arm multi_v7_defconfig) failed like this:
>
> drivers/net/wireless/brcm80211/brcmfmac/bcmsdh.c: In function 'brcmf_ops_sdio_probe':
> drivers/net/wireless/brcm80211/brcmfmac/bcmsdh.c:1139:7: error: dereferencing pointer to incomplete type
> adev->flags.power_manageable = 0;
> ^
>
> Caused by commit f0992ace680c ("brcmfmac: prohibit ACPI power
> management for brcmfmac driver").
>
> I have used the wireless-drivers-next from next-20150526 for today.
Crap. struct acpi_device details are only known when CONFIG_ACPI is set.
The attached patch should fix the issue.
Regards,
Arend
[-- Attachment #2: 0001-brcmfmac-fix-invalid-access-to-struct-acpi_device-fi.patch --]
[-- Type: text/plain, Size: 2353 bytes --]
>From fd56b4446c613ceec15c11758ed817d13efb9bba Mon Sep 17 00:00:00 2001
From: Arend van Spriel <arend@broadcom.com>
Date: Wed, 27 May 2015 10:48:46 +0200
Subject: [PATCH] brcmfmac: fix invalid access to struct acpi_device fields
The fields of struct acpi_device are only known when CONFIG_ACPI is
defined. Fix this by using a helper function. This will resolve the
issue found in linux-next:
../brcmfmac/bcmsdh.c: In function 'brcmf_ops_sdio_probe':
../brcmfmac/bcmsdh.c:1139:7: error: dereferencing pointer to incomplete type
adev->flags.power_manageable = 0;
^
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
---
drivers/net/wireless/brcm80211/brcmfmac/bcmsdh.c | 19 ++++++++++++++-----
1 file changed, 14 insertions(+), 5 deletions(-)
diff --git a/drivers/net/wireless/brcm80211/brcmfmac/bcmsdh.c b/drivers/net/wireless/brcm80211/brcmfmac/bcmsdh.c
index b0d0ff5..71779b9 100644
--- a/drivers/net/wireless/brcm80211/brcmfmac/bcmsdh.c
+++ b/drivers/net/wireless/brcm80211/brcmfmac/bcmsdh.c
@@ -1117,6 +1117,18 @@ MODULE_DEVICE_TABLE(sdio, brcmf_sdmmc_ids);
static struct brcmfmac_sdio_platform_data *brcmfmac_sdio_pdata;
+static void brcmf_sdiod_acpi_set_power_manageable(struct device *dev,
+ int val)
+{
+#if IS_ENABLED(CONFIG_ACPI)
+ struct acpi_device *adev;
+
+ adev = ACPI_COMPANION(dev);
+ if (adev)
+ adev->flags.power_manageable = 0;
+#endif
+}
+
static int brcmf_ops_sdio_probe(struct sdio_func *func,
const struct sdio_device_id *id)
{
@@ -1124,7 +1136,6 @@ static int brcmf_ops_sdio_probe(struct sdio_func *func,
struct brcmf_sdio_dev *sdiodev;
struct brcmf_bus *bus_if;
struct device *dev;
- struct acpi_device *adev;
brcmf_dbg(SDIO, "Enter\n");
brcmf_dbg(SDIO, "Class=%x\n", func->class);
@@ -1132,11 +1143,9 @@ static int brcmf_ops_sdio_probe(struct sdio_func *func,
brcmf_dbg(SDIO, "sdio device ID: 0x%04x\n", func->device);
brcmf_dbg(SDIO, "Function#: %d\n", func->num);
- /* prohibit ACPI power management for this device */
dev = &func->dev;
- adev = ACPI_COMPANION(dev);
- if (adev)
- adev->flags.power_manageable = 0;
+ /* prohibit ACPI power management for this device */
+ brcmf_sdiod_acpi_set_power_manageable(dev, 0);
/* Consume func num 1 but dont do anything with it. */
if (func->num == 1)
--
1.9.1
WARNING: multiple messages have this Message-ID (diff)
From: Arend van Spriel <arend@broadcom.com>
To: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: Kalle Valo <kvalo@codeaurora.org>, <linux-next@vger.kernel.org>,
<linux-kernel@vger.kernel.org>,
"Fu, Zhonghui" <zhonghui.fu@linux.intel.com>
Subject: Re: linux-next: build failure after merge of the wireless-drivers-next tree
Date: Wed, 27 May 2015 11:08:35 +0200 [thread overview]
Message-ID: <55658993.8060709@broadcom.com> (raw)
In-Reply-To: <20150527120358.47b88a4b@canb.auug.org.au>
[-- Attachment #1: Type: text/plain, Size: 730 bytes --]
On 05/27/15 04:03, Stephen Rothwell wrote:
> Hi Kalle,
>
> After merging the wireless-drivers-next tree, today's linux-next build
> (arm multi_v7_defconfig) failed like this:
>
> drivers/net/wireless/brcm80211/brcmfmac/bcmsdh.c: In function 'brcmf_ops_sdio_probe':
> drivers/net/wireless/brcm80211/brcmfmac/bcmsdh.c:1139:7: error: dereferencing pointer to incomplete type
> adev->flags.power_manageable = 0;
> ^
>
> Caused by commit f0992ace680c ("brcmfmac: prohibit ACPI power
> management for brcmfmac driver").
>
> I have used the wireless-drivers-next from next-20150526 for today.
Crap. struct acpi_device details are only known when CONFIG_ACPI is set.
The attached patch should fix the issue.
Regards,
Arend
[-- Attachment #2: 0001-brcmfmac-fix-invalid-access-to-struct-acpi_device-fi.patch --]
[-- Type: text/plain, Size: 2353 bytes --]
>From fd56b4446c613ceec15c11758ed817d13efb9bba Mon Sep 17 00:00:00 2001
From: Arend van Spriel <arend@broadcom.com>
Date: Wed, 27 May 2015 10:48:46 +0200
Subject: [PATCH] brcmfmac: fix invalid access to struct acpi_device fields
The fields of struct acpi_device are only known when CONFIG_ACPI is
defined. Fix this by using a helper function. This will resolve the
issue found in linux-next:
../brcmfmac/bcmsdh.c: In function 'brcmf_ops_sdio_probe':
../brcmfmac/bcmsdh.c:1139:7: error: dereferencing pointer to incomplete type
adev->flags.power_manageable = 0;
^
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
---
drivers/net/wireless/brcm80211/brcmfmac/bcmsdh.c | 19 ++++++++++++++-----
1 file changed, 14 insertions(+), 5 deletions(-)
diff --git a/drivers/net/wireless/brcm80211/brcmfmac/bcmsdh.c b/drivers/net/wireless/brcm80211/brcmfmac/bcmsdh.c
index b0d0ff5..71779b9 100644
--- a/drivers/net/wireless/brcm80211/brcmfmac/bcmsdh.c
+++ b/drivers/net/wireless/brcm80211/brcmfmac/bcmsdh.c
@@ -1117,6 +1117,18 @@ MODULE_DEVICE_TABLE(sdio, brcmf_sdmmc_ids);
static struct brcmfmac_sdio_platform_data *brcmfmac_sdio_pdata;
+static void brcmf_sdiod_acpi_set_power_manageable(struct device *dev,
+ int val)
+{
+#if IS_ENABLED(CONFIG_ACPI)
+ struct acpi_device *adev;
+
+ adev = ACPI_COMPANION(dev);
+ if (adev)
+ adev->flags.power_manageable = 0;
+#endif
+}
+
static int brcmf_ops_sdio_probe(struct sdio_func *func,
const struct sdio_device_id *id)
{
@@ -1124,7 +1136,6 @@ static int brcmf_ops_sdio_probe(struct sdio_func *func,
struct brcmf_sdio_dev *sdiodev;
struct brcmf_bus *bus_if;
struct device *dev;
- struct acpi_device *adev;
brcmf_dbg(SDIO, "Enter\n");
brcmf_dbg(SDIO, "Class=%x\n", func->class);
@@ -1132,11 +1143,9 @@ static int brcmf_ops_sdio_probe(struct sdio_func *func,
brcmf_dbg(SDIO, "sdio device ID: 0x%04x\n", func->device);
brcmf_dbg(SDIO, "Function#: %d\n", func->num);
- /* prohibit ACPI power management for this device */
dev = &func->dev;
- adev = ACPI_COMPANION(dev);
- if (adev)
- adev->flags.power_manageable = 0;
+ /* prohibit ACPI power management for this device */
+ brcmf_sdiod_acpi_set_power_manageable(dev, 0);
/* Consume func num 1 but dont do anything with it. */
if (func->num == 1)
--
1.9.1
next prev parent reply other threads:[~2015-05-27 9:08 UTC|newest]
Thread overview: 42+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-27 2:03 linux-next: build failure after merge of the wireless-drivers-next tree Stephen Rothwell
2015-05-27 9:08 ` Arend van Spriel [this message]
2015-05-27 9:08 ` Arend van Spriel
2015-05-28 1:38 ` Stephen Rothwell
2015-05-28 1:38 ` Stephen Rothwell
-- strict thread matches above, loose matches on Subject: below --
2020-12-08 8:49 Stephen Rothwell
2020-12-08 8:54 ` Kalle Valo
2018-08-03 8:29 Stephen Rothwell
2018-08-03 9:09 ` Kalle Valo
2018-08-03 9:11 ` Stanislaw Gruszka
2018-08-03 9:21 ` Stanislaw Gruszka
2017-06-08 2:27 Stephen Rothwell
2017-06-08 2:43 ` Igor Mitsyanko
2017-06-08 2:57 ` Stephen Rothwell
2017-06-08 12:07 ` Kalle Valo
2017-06-08 12:47 ` Stephen Rothwell
2017-06-13 2:00 ` Stephen Rothwell
2017-06-15 16:08 ` David Miller
2017-06-15 18:25 ` Stephen Rothwell
2016-07-19 6:08 Stephen Rothwell
2016-07-19 6:08 ` Stephen Rothwell
2016-07-19 6:30 ` Kalle Valo
2016-07-19 6:51 ` Rafał Miłecki
2016-07-19 7:09 ` Kalle Valo
2016-07-19 7:09 ` Kalle Valo
[not found] ` <871t2qw1cz.fsf-HodKDYzPHsUD5k0oWYwrnHL1okKdlPRT@public.gmane.org>
2016-07-19 7:11 ` Rafał Miłecki
2016-07-19 7:11 ` Rafał Miłecki
2016-07-19 14:08 ` Kalle Valo
2016-07-19 14:08 ` Kalle Valo
2016-07-19 18:39 ` Brian Norris
2016-07-19 23:36 ` Stephen Rothwell
2016-07-20 18:31 ` Kalle Valo
2016-02-18 23:10 Stephen Rothwell
2016-02-19 8:08 ` Kalle Valo
2015-08-07 3:16 Stephen Rothwell
2015-08-09 8:41 ` Kalle Valo
2015-07-22 0:32 Stephen Rothwell
2015-07-22 6:07 ` Kalle Valo
2015-07-27 5:41 ` Kalle Valo
2015-07-27 6:04 ` Stephen Rothwell
2015-01-27 8:03 Stephen Rothwell
2015-01-27 8:13 ` Kalle Valo
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=55658993.8060709@broadcom.com \
--to=arend@broadcom.com \
--cc=kvalo@codeaurora.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-next@vger.kernel.org \
--cc=sfr@canb.auug.org.au \
--cc=zhonghui.fu@linux.intel.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.