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:   Thu, 4 Apr 2019 17:17:56 +0530
From:   Mukesh Ojha <mojha@...eaurora.org>
To:     Yue Haibing <yuehaibing@...wei.com>, myungjoo.ham@...sung.com,
        cw00.choi@...sung.com, wens@...e.org, hdegoede@...hat.com
Cc:     linux-kernel@...r.kernel.org
Subject: Re: [PATCH] extcon: axp288: Fix build err without CONFIG_ACPI


On 4/4/2019 4:12 PM, Yue Haibing wrote:
> From: YueHaibing <yuehaibing@...wei.com>
>
> When building CONFIG_ACPI is not set
> gcc warn this:
>
> drivers/extcon/extcon-axp288.c: In function 'axp288_extcon_probe':
> drivers/extcon/extcon-axp288.c:363:20: error: dereferencing pointer to incomplete type
>      put_device(&adev->dev);
>
> Reported-by: Hulk Robot <hulkci@...wei.com>
> Fixes: 0cf064db948a ("extcon: axp288: Convert to use acpi_dev_get_first_match_dev()")
> Signed-off-by: YueHaibing <yuehaibing@...wei.com>


Looks fine to me.
Reviewed-by: Mukesh Ojha <mojha@...eaurora.org>

Cheers,
-Mukesh

> ---
>   drivers/extcon/extcon-axp288.c | 8 +++++---
>   1 file changed, 5 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/extcon/extcon-axp288.c b/drivers/extcon/extcon-axp288.c
> index 50f9402..ed8ac3f 100644
> --- a/drivers/extcon/extcon-axp288.c
> +++ b/drivers/extcon/extcon-axp288.c
> @@ -333,7 +333,6 @@ static int axp288_extcon_probe(struct platform_device *pdev)
>   	struct axp288_extcon_info *info;
>   	struct axp20x_dev *axp20x = dev_get_drvdata(pdev->dev.parent);
>   	struct device *dev = &pdev->dev;
> -	struct acpi_device *adev;
>   	int ret, i, pirq;
>   
>   	info = devm_kzalloc(&pdev->dev, sizeof(*info), GFP_KERNEL);
> @@ -357,6 +356,8 @@ static int axp288_extcon_probe(struct platform_device *pdev)
>   		if (ret)
>   			return ret;
>   
> +#ifdef CONFIG_ACPI
> +		struct acpi_device *adev;
>   		adev = acpi_dev_get_first_match_dev("INT3496", NULL, -1);
>   		if (adev) {
>   			info->id_extcon = extcon_get_extcon_dev(acpi_dev_name(adev));
> @@ -365,9 +366,10 @@ static int axp288_extcon_probe(struct platform_device *pdev)
>   				return -EPROBE_DEFER;
>   
>   			dev_info(dev, "controlling USB role\n");
> -		} else {
> -			dev_info(dev, "controlling USB role based on Vbus presence\n");
>   		}
> +#else
> +		dev_info(dev, "controlling USB role based on Vbus presence\n");
> +#endif
>   	}
>   
>   	info->vbus_attach = axp288_get_vbus_attach(info);

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ