All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stanislaw Gruszka <stf_xl@wp.pl>
To: Johannes Berg <johannes@sipsolutions.net>
Cc: linux-wireless@vger.kernel.org, Johannes Berg <johannes.berg@intel.com>
Subject: Re: [PATCH 3/5] wifi: rt2x00: silence sparse warnings
Date: Sat, 2 Mar 2024 09:01:18 +0100	[thread overview]
Message-ID: <20240302080118.GA198451@wp.pl> (raw)
In-Reply-To: <20240223114023.ce0c714124e9.I2b5710b761f63522574fbe7654d37151c31e0b77@changeid>

On Fri, Feb 23, 2024 at 11:40:25AM +0100, Johannes Berg wrote:
> From: Johannes Berg <johannes.berg@intel.com>
> 
> Clearly writing __le32 was intended here, so just put the
> right casts into the code to silence sparse about it.
> 
> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Acked-by: Stanislaw Gruszka <stf_xl@wp.pl>

> ---
>  drivers/net/wireless/ralink/rt2x00/rt2800lib.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/net/wireless/ralink/rt2x00/rt2800lib.c b/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
> index aaf31857ae1e..3bb81bcff0ac 100644
> --- a/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
> +++ b/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
> @@ -10946,13 +10946,13 @@ static void rt2800_efuse_read(struct rt2x00_dev *rt2x00dev, unsigned int i)
>  	/* Apparently the data is read from end to start */
>  	reg = rt2800_register_read_lock(rt2x00dev, efuse_data3_reg);
>  	/* The returned value is in CPU order, but eeprom is le */
> -	*(u32 *)&rt2x00dev->eeprom[i] = cpu_to_le32(reg);
> +	*(__le32 *)&rt2x00dev->eeprom[i] = cpu_to_le32(reg);
>  	reg = rt2800_register_read_lock(rt2x00dev, efuse_data2_reg);
> -	*(u32 *)&rt2x00dev->eeprom[i + 2] = cpu_to_le32(reg);
> +	*(__le32 *)&rt2x00dev->eeprom[i + 2] = cpu_to_le32(reg);
>  	reg = rt2800_register_read_lock(rt2x00dev, efuse_data1_reg);
> -	*(u32 *)&rt2x00dev->eeprom[i + 4] = cpu_to_le32(reg);
> +	*(__le32 *)&rt2x00dev->eeprom[i + 4] = cpu_to_le32(reg);
>  	reg = rt2800_register_read_lock(rt2x00dev, efuse_data0_reg);
> -	*(u32 *)&rt2x00dev->eeprom[i + 6] = cpu_to_le32(reg);
> +	*(__le32 *)&rt2x00dev->eeprom[i + 6] = cpu_to_le32(reg);
>  
>  	mutex_unlock(&rt2x00dev->csr_mutex);
>  }

  reply	other threads:[~2024-03-02  8:28 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-23 10:40 [PATCH 1/5] wifi: b43: silence sparse warnings Johannes Berg
2024-02-23 10:40 ` [PATCH 2/5] wifi: brcmsmac: " Johannes Berg
2024-02-23 10:40 ` [PATCH 3/5] wifi: rt2x00: " Johannes Berg
2024-03-02  8:01   ` Stanislaw Gruszka [this message]
2024-02-23 10:40 ` [PATCH 4/5] wifi: cw1200: " Johannes Berg
2024-02-23 10:40 ` [PATCH 5/5] wifi: zd1211rw: " Johannes Berg
2024-02-23 15:58 ` [PATCH 1/5] wifi: b43: " Larry Finger
2024-02-28 11:37 ` 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=20240302080118.GA198451@wp.pl \
    --to=stf_xl@wp.pl \
    --cc=johannes.berg@intel.com \
    --cc=johannes@sipsolutions.net \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.