The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Stephen Rothwell <sfr@canb.auug.org.au>
To: chanwoo@kernel.org
Cc: linux-kernel@vger.kernel.org, cw00.choi@samsung.com,
	myungjoo.ham@samsung.com, hdegoede@redhat.com
Subject: Re: [PATCH v2] extcon: lc824206xa: Fix build error of POWER_SUPPLY_PROP_USB_TYPE
Date: Thu, 5 Sep 2024 09:31:54 +1000	[thread overview]
Message-ID: <20240905093154.6626f47a@canb.auug.org.au> (raw)
In-Reply-To: <20240904164325.48386-1-chanwoo@kernel.org>

[-- Attachment #1: Type: text/plain, Size: 2326 bytes --]

Hi,

On Thu,  5 Sep 2024 01:43:25 +0900 chanwoo@kernel.org wrote:
>
> From: Stephen Rothwell <sfr@canb.auug.org.au>
> 
> commit 364ea7ccaef9("power: supply: Change usb_types from an array into a
> bitmask") changes usb_types from an array into a bitmask. Fix the build error of
> usb_types variables.
> 
> Link: https://lore.kernel.org/lkml/20240831142039.28830-7-hdegoede@redhat.com/
> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
> Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
> ---
> Changes from v1
> - Update patch description with correct commit
> 
>  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,
> -- 
> 2.25.1
> 

To preserve bisectablility, this fix up should have been applied to the
actual merge commit where you merged Hans immutable branch.

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

      parent reply	other threads:[~2024-09-04 23:32 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-04 16:43 [PATCH v2] extcon: lc824206xa: Fix build error of POWER_SUPPLY_PROP_USB_TYPE chanwoo
2024-09-04 16:50 ` Hans de Goede
2024-09-04 23:31 ` Stephen Rothwell [this message]

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=20240905093154.6626f47a@canb.auug.org.au \
    --to=sfr@canb.auug.org.au \
    --cc=chanwoo@kernel.org \
    --cc=cw00.choi@samsung.com \
    --cc=hdegoede@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=myungjoo.ham@samsung.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox