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]
Message-ID: <3fc73725-2b17-4c89-0e61-1dd01f659bfa@quicinc.com>
Date:   Thu, 10 Aug 2023 06:36:41 -0700
From:   Jeff Johnson <quic_jjohnson@...cinc.com>
To:     Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>,
        Kalle Valo <kvalo@...nel.org>, <ath10k@...ts.infradead.org>,
        <linux-wireless@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
        <ath11k@...ts.infradead.org>
CC:     Andi Shyti <andi.shyti@...nel.org>
Subject: Re: [PATCH net-next 2/2] wifi: ath10k: fix Wvoid-pointer-to-enum-cast
 warning

On 8/10/2023 2:12 AM, Krzysztof Kozlowski wrote:
> 'hw_rev' is an enum, thus cast of pointer on 64-bit compile test with W=1
> causes:
> 
>    ath10k/ahb.c:736:11: error: cast to smaller integer type 'enum ath10k_hw_rev' from 'const void *' [-Werror,-Wvoid-pointer-to-enum-cast]
> 
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>

Acked-by: Jeff Johnson <quic_jjohnson@...cinc.com>

> ---
>   drivers/net/wireless/ath/ath10k/ahb.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/wireless/ath/ath10k/ahb.c b/drivers/net/wireless/ath/ath10k/ahb.c
> index 4a006fb4d424..95bcf54ddc3f 100644
> --- a/drivers/net/wireless/ath/ath10k/ahb.c
> +++ b/drivers/net/wireless/ath/ath10k/ahb.c
> @@ -733,7 +733,7 @@ static int ath10k_ahb_probe(struct platform_device *pdev)
>   	int ret;
>   	struct ath10k_bus_params bus_params = {};
>   
> -	hw_rev = (enum ath10k_hw_rev)of_device_get_match_data(&pdev->dev);
> +	hw_rev = (uintptr_t)of_device_get_match_data(&pdev->dev);
>   	if (!hw_rev) {
>   		dev_err(&pdev->dev, "OF data missing\n");
>   		return -EINVAL;

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ