linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff Johnson <quic_jjohnson@quicinc.com>
To: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>,
	Kalle Valo <kvalo@kernel.org>, <ath10k@lists.infradead.org>,
	<linux-wireless@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	<ath11k@lists.infradead.org>
Cc: Andi Shyti <andi.shyti@kernel.org>
Subject: Re: [PATCH net-next 1/2] wifi: ath11k: fix Wvoid-pointer-to-enum-cast warning
Date: Thu, 10 Aug 2023 06:36:17 -0700	[thread overview]
Message-ID: <81ff873f-20ea-84f3-d29d-dc5441f2654a@quicinc.com> (raw)
In-Reply-To: <20230810091224.70088-1-krzysztof.kozlowski@linaro.org>

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:
> 
>    h11k/ahb.c:1124:11: error: cast to smaller integer type 'enum ath11k_hw_rev' from 'const void *' [-Werror,-Wvoid-pointer-to-enum-cast]
> 
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

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

> ---
>   drivers/net/wireless/ath/ath11k/ahb.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/wireless/ath/ath11k/ahb.c b/drivers/net/wireless/ath/ath11k/ahb.c
> index 139da578831a..ada4d68c7421 100644
> --- a/drivers/net/wireless/ath/ath11k/ahb.c
> +++ b/drivers/net/wireless/ath/ath11k/ahb.c
> @@ -1121,7 +1121,7 @@ static int ath11k_ahb_probe(struct platform_device *pdev)
>   		return -EINVAL;
>   	}
>   
> -	hw_rev = (enum ath11k_hw_rev)of_id->data;
> +	hw_rev = (uintptr_t)of_id->data;
>   
>   	switch (hw_rev) {
>   	case ATH11K_HW_IPQ8074:


  parent reply	other threads:[~2023-08-10 13:36 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-10  9:12 [PATCH net-next 1/2] wifi: ath11k: fix Wvoid-pointer-to-enum-cast warning Krzysztof Kozlowski
2023-08-10  9:12 ` [PATCH net-next 2/2] wifi: ath10k: " Krzysztof Kozlowski
2023-08-10 13:36   ` Jeff Johnson
2023-08-10 13:36 ` Jeff Johnson [this message]
2023-08-22 12:58 ` [PATCH net-next 1/2] wifi: ath11k: " Kalle Valo
2023-08-23 14:10 ` Kalle Valo

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=81ff873f-20ea-84f3-d29d-dc5441f2654a@quicinc.com \
    --to=quic_jjohnson@quicinc.com \
    --cc=andi.shyti@kernel.org \
    --cc=ath10k@lists.infradead.org \
    --cc=ath11k@lists.infradead.org \
    --cc=krzysztof.kozlowski@linaro.org \
    --cc=kvalo@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).