From: Rolf Eike Beer <eike-kernel@sf-tec.de>
To: linux-kernel@vger.kernel.org, patches@lists.linux.dev,
"Jason A. Donenfeld" <Jason@zx2c4.com>,
Andrew Morton <akpm@linux-foundation.org>,
"David S . Miller" <davem@davemloft.net>,
kernel-janitors@vger.kernel.org, linux-wireless@vger.kernel.org,
netdev@vger.kernel.org
Subject: Re: [PATCH v6 5/7] treewide: use get_random_u32() when possible
Date: Tue, 11 Oct 2022 11:14:44 +0200 [thread overview]
Message-ID: <2659449.sfTDpz5f83@eto.sf-tec.de> (raw)
In-Reply-To: <20221010230613.1076905-6-Jason@zx2c4.com>
[-- Attachment #1: Type: text/plain, Size: 1258 bytes --]
Am Dienstag, 11. Oktober 2022, 01:06:11 CEST schrieb Jason A. Donenfeld:
> The prandom_u32() function has been a deprecated inline wrapper around
> get_random_u32() for several releases now, and compiles down to the
> exact same code. Replace the deprecated wrapper with a direct call to
> the real function. The same also applies to get_random_int(), which is
> just a wrapper around get_random_u32(). This was done as a basic find
> and replace.
> diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pno.c
> b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pno.c index
> d0a7465be586..3a7aded30e8e 100644
> --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pno.c
> +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pno.c
> @@ -177,7 +177,7 @@ static int brcmf_pno_set_random(struct brcmf_if *ifp,
> struct brcmf_pno_info *pi) memcpy(pfn_mac.mac, mac_addr, ETH_ALEN);
> for (i = 0; i < ETH_ALEN; i++) {
> pfn_mac.mac[i] &= mac_mask[i];
> - pfn_mac.mac[i] |= get_random_int() & ~(mac_mask[i]);
> + pfn_mac.mac[i] |= get_random_u32() & ~(mac_mask[i]);
> }
> /* Clear multi bit */
> pfn_mac.mac[0] &= 0xFE;
mac is defined as u8 mac[ETH_ALEN]; in fwil_types.h.
Eike
P.S.: CC list trimmed because of an unrelated mailer bug
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 195 bytes --]
next prev parent reply other threads:[~2022-10-11 9:15 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-10 23:06 [PATCH v6 0/7] treewide cleanup of random integer usage Jason A. Donenfeld
2022-10-10 23:06 ` [PATCH v6 1/7] treewide: use prandom_u32_max() when possible, part 1 Jason A. Donenfeld
2022-10-11 9:58 ` Heiko Carstens
2022-10-10 23:06 ` [PATCH v6 2/7] treewide: use prandom_u32_max() when possible, part 2 Jason A. Donenfeld
2022-10-10 23:06 ` [PATCH v6 3/7] treewide: use get_random_{u8,u16}() when possible, part 1 Jason A. Donenfeld
2022-10-11 1:18 ` Elliott, Robert (Servers)
2022-10-11 3:00 ` Jason A. Donenfeld
2022-10-10 23:06 ` [PATCH v6 4/7] treewide: use get_random_{u8,u16}() when possible, part 2 Jason A. Donenfeld
2022-10-11 9:59 ` Heiko Carstens
2022-10-10 23:06 ` [PATCH v6 5/7] treewide: use get_random_u32() when possible Jason A. Donenfeld
2022-10-11 9:14 ` Rolf Eike Beer [this message]
2022-10-11 19:20 ` Jason A. Donenfeld
2022-10-11 10:00 ` Heiko Carstens
2022-10-13 9:25 ` Rolf Eike Beer
2022-10-13 10:16 ` Florian Westphal
2022-10-13 11:40 ` Rolf Eike Beer
2022-10-13 16:21 ` Jason A. Donenfeld
2022-10-10 23:06 ` [PATCH v6 6/7] treewide: use get_random_bytes() " Jason A. Donenfeld
2022-10-10 23:06 ` [PATCH v6 7/7] prandom: remove unused functions Jason A. Donenfeld
2022-10-11 23:01 ` [PATCH v6 0/7] treewide cleanup of random integer usage Jakub Kicinski
2022-10-17 11:59 ` liulongfang
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=2659449.sfTDpz5f83@eto.sf-tec.de \
--to=eike-kernel@sf-tec.de \
--cc=Jason@zx2c4.com \
--cc=akpm@linux-foundation.org \
--cc=davem@davemloft.net \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=patches@lists.linux.dev \
/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).