lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 02 Jan 2018 09:55:22 +0900
From:   Chanwoo Choi <cw00.choi@...sung.com>
To:     Hans de Goede <hdegoede@...hat.com>,
        MyungJoo Ham <myungjoo.ham@...sung.com>
Cc:     linux-kernel@...r.kernel.org
Subject: Re: [PATCH 4/4] extcon: axp288: Handle reserved charger-type values
 better

Hi Hans,

On 2017년 12월 22일 21:36, Hans de Goede wrote:
> According to the data sheets all the values not handled in the
> switch-case are "reserved". Update the dev_warn message to reflect
> this and set the cable-type to EXTCON_CHG_USB_SDP (so max 500mA
> current draw) as safe default.
> 
> Signed-off-by: Hans de Goede <hdegoede@...hat.com>
> ---
>  drivers/extcon/extcon-axp288.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/extcon/extcon-axp288.c b/drivers/extcon/extcon-axp288.c
> index cc7c35c7ff02..d60c615f709f 100644
> --- a/drivers/extcon/extcon-axp288.c
> +++ b/drivers/extcon/extcon-axp288.c
> @@ -205,8 +205,8 @@ static int axp288_handle_chrg_det_event(struct axp288_extcon_info *info)
>  		cable = EXTCON_CHG_USB_DCP;
>  		break;
>  	default:
> -		dev_warn(info->dev,
> -			"disconnect or unknown or ID event\n");
> +		dev_warn(info->dev, "unknown (reserved) bc detect result\n");
> +		cable = EXTCON_CHG_USB_SDP;
>  	}
>  
>  no_vbus:
> 

Looks good to me.
Reviewed-by: Chanwoo Choi <cw00.choi@...sung.com>

-- 
Best Regards,
Chanwoo Choi
Samsung Electronics

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ