From: Hans de Goede <hdegoede@redhat•com>
To: Stephen Rothwell <sfr@canb•auug.org.au>,
Chanwoo Choi <cw00.choi@samsung•com>,
Sebastian Reichel <sre@kernel•org>
Cc: Sebastian Reichel <sebastian.reichel@collabora•com>,
Linux Kernel Mailing List <linux-kernel@vger•kernel.org>,
Linux Next Mailing List <linux-next@vger•kernel.org>
Subject: Re: linux-next: build failure after merge of the extcon tree
Date: Wed, 4 Sep 2024 11:24:44 +0200 [thread overview]
Message-ID: <f31f8bea-95da-4d32-afe0-9c2abc69d833@redhat.com> (raw)
In-Reply-To: <20240904152421.4e0ad2b7@canb.auug.org.au>
Hi all,
On 9/4/24 7:24 AM, Stephen Rothwell wrote:
> Hi all,
>
> After merging the extcon tree, today's linux-next build (x86_64
> allmodconfig) failed like this:
>
> drivers/extcon/extcon-lc824206xa.c:413:22: error: initialization of 'unsigned int' from 'const enum power_supply_usb_type *' makes integer from pointer without a cast [-Wint-conversion]
> 413 | .usb_types = lc824206xa_psy_usb_types,
> | ^~~~~~~~~~~~~~~~~~~~~~~~
> drivers/extcon/extcon-lc824206xa.c:413:22: note: (near initialization for 'lc824206xa_psy_desc.usb_types')
> drivers/extcon/extcon-lc824206xa.c:413:22: error: initializer element is not computable at load time
> drivers/extcon/extcon-lc824206xa.c:413:22: note: (near initialization for 'lc824206xa_psy_desc.usb_types')
> drivers/extcon/extcon-lc824206xa.c:414:10: error: 'const struct power_supply_desc' has no member named 'num_usb_types'; did you mean 'usb_types'?
> 414 | .num_usb_types = ARRAY_SIZE(lc824206xa_psy_usb_types),
> | ^~~~~~~~~~~~~
> | usb_types
> In file included from include/linux/kernel.h:16,
> from include/linux/cpumask.h:11,
> from arch/x86/include/asm/paravirt.h:21,
> from arch/x86/include/asm/cpuid.h:62,
> from arch/x86/include/asm/processor.h:19,
> from include/linux/sched.h:13,
> from include/linux/delay.h:23,
> from drivers/extcon/extcon-lc824206xa.c:20:
> include/linux/array_size.h:11:25: error: initialization of 'const enum power_supply_property *' from 'long unsigned int' makes pointer from integer without a cast [-Wint-conversion]
> 11 | #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) + __must_be_array(arr))
> | ^
> drivers/extcon/extcon-lc824206xa.c:414:26: note: in expansion of macro 'ARRAY_SIZE'
> 414 | .num_usb_types = ARRAY_SIZE(lc824206xa_psy_usb_types),
> | ^~~~~~~~~~
> include/linux/array_size.h:11:25: note: (near initialization for 'lc824206xa_psy_desc.properties')
> 11 | #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) + __must_be_array(arr))
> | ^
> drivers/extcon/extcon-lc824206xa.c:414:26: note: in expansion of macro 'ARRAY_SIZE'
> 414 | .num_usb_types = ARRAY_SIZE(lc824206xa_psy_usb_types),
> | ^~~~~~~~~~
>
> Caused by commit
>
> e508f2606c0b ("extcon: Add LC824206XA microUSB switch driver")
>
> interatcing with commit
>
> 364ea7ccaef9 ("power: supply: Change usb_types from an array into a bitmask")
>
> from the battery tree.
Since I'm the author of both commits this is my bad, sorry.
Stephen, thank you for fixing this in -next.
Chanwoo, Sebastian send a pull-request for an immutable branch with
these changes:
https://lore.kernel.org/linux-pm/ez5ja55dl7w7ynq2wv4efsvvqtk4xyalf4k6agtsuhpgrtlpg3@d6ghlle4cu2q/
Can you please merge the ib-psy-usb-types-signed tag into
extcon.git/extcon-next and then apply Stephen's fix so that Linus
does not get hit by this build error when he merges the extcon
changes for 6.12 ?
Regards,
Hans
> I have applied the following merge fix patch.
>
> From: Stephen Rothwell <sfr@canb•auug.org.au>
> Date: Wed, 4 Sep 2024 15:19:19 +1000
> Subject: [PATCH] fix up for "extcon: Add LC824206XA microUSB switch driver"
>
> interacting with "power: supply: Change usb_types from an array into a
> bitmask" from het battery tree.
>
> Signed-off-by: Stephen Rothwell <sfr@canb•auug.org.au>
> ---
> drivers/extcon/extcon-lc824206xa.c | 15 +++++----------
> 1 file changed, 5 insertions(+), 10 deletions(-)
>
> diff --git a/drivers/extcon/extcon-lc824206xa.c b/drivers/extcon/extcon-lc824206xa.c
> index d58a2c369018..56938748aea8 100644
> --- a/drivers/extcon/extcon-lc824206xa.c
> +++ b/drivers/extcon/extcon-lc824206xa.c
> @@ -393,14 +393,6 @@ static int lc824206xa_psy_get_prop(struct power_supply *psy,
> return 0;
> }
>
> -static const enum power_supply_usb_type lc824206xa_psy_usb_types[] = {
> - POWER_SUPPLY_USB_TYPE_SDP,
> - POWER_SUPPLY_USB_TYPE_CDP,
> - POWER_SUPPLY_USB_TYPE_DCP,
> - POWER_SUPPLY_USB_TYPE_ACA,
> - POWER_SUPPLY_USB_TYPE_UNKNOWN,
> -};
> -
> static const enum power_supply_property lc824206xa_psy_props[] = {
> POWER_SUPPLY_PROP_ONLINE,
> POWER_SUPPLY_PROP_USB_TYPE,
> @@ -410,8 +402,11 @@ static const enum power_supply_property lc824206xa_psy_props[] = {
> static const struct power_supply_desc lc824206xa_psy_desc = {
> .name = "lc824206xa-charger-detect",
> .type = POWER_SUPPLY_TYPE_USB,
> - .usb_types = lc824206xa_psy_usb_types,
> - .num_usb_types = ARRAY_SIZE(lc824206xa_psy_usb_types),
> + .usb_types = BIT(POWER_SUPPLY_USB_TYPE_SDP) |
> + BIT(POWER_SUPPLY_USB_TYPE_CDP) |
> + BIT(POWER_SUPPLY_USB_TYPE_DCP) |
> + BIT(POWER_SUPPLY_USB_TYPE_ACA) |
> + BIT(POWER_SUPPLY_USB_TYPE_UNKNOWN),
> .properties = lc824206xa_psy_props,
> .num_properties = ARRAY_SIZE(lc824206xa_psy_props),
> .get_property = lc824206xa_psy_get_prop,
next prev parent reply other threads:[~2024-09-04 9:24 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-04 5:24 linux-next: build failure after merge of the extcon tree Stephen Rothwell
2024-09-04 9:24 ` Hans de Goede [this message]
2024-09-04 16:18 ` Chanwoo Choi
-- strict thread matches above, loose matches on Subject: below --
2025-05-06 6:22 Stephen Rothwell
2019-07-19 0:48 Stephen Rothwell
2015-05-25 11:05 Stephen Rothwell
2015-06-04 9:18 ` Stephen Rothwell
2015-06-05 10:53 ` Greg KH
2015-06-27 0:16 ` Stephen Rothwell
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=f31f8bea-95da-4d32-afe0-9c2abc69d833@redhat.com \
--to=hdegoede@redhat$(echo .)com \
--cc=cw00.choi@samsung$(echo .)com \
--cc=linux-kernel@vger$(echo .)kernel.org \
--cc=linux-next@vger$(echo .)kernel.org \
--cc=sebastian.reichel@collabora$(echo .)com \
--cc=sfr@canb$(echo .)auug.org.au \
--cc=sre@kernel$(echo .)org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox