Re: [PATCH 09/11] power: supply: qcom_smbx: add smb5 support

From: Luca Weiss
Date: Fri Jun 20 2025 - 05:01:49 EST


On Thu Jun 19, 2025 at 4:55 PM CEST, Casey Connolly wrote:
> Introduce support for the SMB5 charger found on pm8150b and other more
> modern Qualcomm SoCs.
>
> SMB5 is largely similar to SMB2, with a few register differences. The
> main difference is the new Type-C hardware block which some registers
> are moved to.
>
> Signed-off-by: Casey Connolly <casey.connolly@xxxxxxxxxx>
> ---

<snip>

> +static int smb_get_prop_health(struct smb_chip *chip, int *val)
> +{
> + switch (chip->gen) {
> + case SMB2:
> + return smb2_get_prop_health(chip, val);
> + case SMB5:
> + return smb5_get_prop_health(chip, val);
> + }
> +}

This doesn't compile for me:

drivers/power/supply/qcom_smbx.c: In function 'smb_get_prop_health':
drivers/power/supply/qcom_smbx.c:588:1: error: control reaches end of non-void function [-Werror=return-type]
588 | }
| ^

Regards
Luca