From: Akinobu Mita <akinobu.mita@gmail.com>
To: linux-kernel@vger.kernel.org, akpm@linux-foundation.org
Cc: Akinobu Mita <akinobu.mita@gmail.com>, linux-mm@kvack.org
Subject: [PATCH -v3 06/23] mm/: rename random32() to prandom_u32()
Date: Mon, 4 Mar 2013 21:58:14 +0900 [thread overview]
Message-ID: <1362401911-14074-7-git-send-email-akinobu.mita@gmail.com> (raw)
In-Reply-To: <1362401911-14074-1-git-send-email-akinobu.mita@gmail.com>
Use more preferable function name which implies using a pseudo-random
number generator.
Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Cc: linux-mm@kvack.org
---
No change from v2
mm/swapfile.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mm/swapfile.c b/mm/swapfile.c
index a1f7772..d417efd 100644
--- a/mm/swapfile.c
+++ b/mm/swapfile.c
@@ -2120,7 +2120,7 @@ SYSCALL_DEFINE2(swapon, const char __user *, specialfile, int, swap_flags)
if (p->bdev) {
if (blk_queue_nonrot(bdev_get_queue(p->bdev))) {
p->flags |= SWP_SOLIDSTATE;
- p->cluster_next = 1 + (random32() % p->highest_bit);
+ p->cluster_next = 1 + (prandom_u32() % p->highest_bit);
}
if ((swap_flags & SWAP_FLAG_DISCARD) && discard_swap(p) == 0)
p->flags |= SWP_DISCARDABLE;
--
1.8.1.2
next prev parent reply other threads:[~2013-03-04 12:59 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-04 12:58 [PATCH -v3 00/23] rename random32 to prandom Akinobu Mita
2013-03-04 12:58 ` [PATCH -v3 01/23] raid6test: use prandom_bytes() Akinobu Mita
2013-03-04 12:58 ` [PATCH -v3 02/23] uuid: " Akinobu Mita
2013-03-04 12:58 ` [PATCH -v3 03/23] x86: pageattr-test: remove srandom32 call Akinobu Mita
2013-03-04 12:58 ` [PATCH -v3 04/23] x86: rename random32() to prandom_u32() Akinobu Mita
2013-03-04 12:58 ` [PATCH -v3 05/23] lib/: " Akinobu Mita
2013-03-04 12:58 ` Akinobu Mita [this message]
2013-03-04 12:58 ` [PATCH -v3 07/23] kernel/: " Akinobu Mita
2013-03-04 12:58 ` [PATCH -v3 08/23] drbd: " Akinobu Mita
2013-03-04 12:58 ` [PATCH -v3 09/23] infiniband: " Akinobu Mita
2013-03-04 15:41 ` Steve Wise
2013-03-04 12:58 ` [PATCH -v3 10/23] mmc: " Akinobu Mita
2013-03-04 12:58 ` [PATCH -v3 11/23] video/uvesafb: " Akinobu Mita
2013-03-04 12:58 ` [PATCH -v3 12/23] xfs: " Akinobu Mita
2013-03-07 18:48 ` Ben Myers
2013-03-04 12:58 ` [PATCH -v3 13/23] uwb: " Akinobu Mita
2013-03-04 12:58 ` [PATCH -v3 14/23] lguest: " Akinobu Mita
2013-03-04 12:58 ` [PATCH -v3 15/23] scsi: " Akinobu Mita
2013-03-04 12:58 ` [PATCH -v3 16/23] drivers/net: " Akinobu Mita
2013-03-04 13:37 ` Arend van Spriel
2013-03-04 21:53 ` Akinobu Mita
2013-03-04 12:58 ` [PATCH -v3 17/23] net/sunrpc: " Akinobu Mita
2013-03-04 22:44 ` Myklebust, Trond
2013-03-04 12:58 ` [PATCH -v3 18/23] net/sched: " Akinobu Mita
2013-03-04 12:58 ` [PATCH -v3 19/23] net/netfilter: " Akinobu Mita
2013-03-04 12:58 ` [PATCH -v3 20/23] net/core: " Akinobu Mita
2013-03-04 12:58 ` [PATCH -v3 21/23] net/core: remove duplicate statements by do-while loop Akinobu Mita
2013-03-04 12:58 ` [PATCH -v3 22/23] net: rename random32 to prandom Akinobu Mita
2013-03-04 12:58 ` [PATCH -v3 23/23] remove unused random32() and srandom32() Akinobu Mita
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=1362401911-14074-7-git-send-email-akinobu.mita@gmail.com \
--to=akinobu.mita@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.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