summaryrefslogtreecommitdiff
path: root/lib/test_vmalloc.c
diff options
context:
space:
mode:
authorMaxime Ripard <maxime@cerno.tech>2021-11-16 10:51:39 +0300
committerMaxime Ripard <maxime@cerno.tech>2021-11-16 10:51:39 +0300
commit467dd91e2f783d34b2205751bdf88bcdcac55984 (patch)
tree50712cab9037a8566756ba831a2a60ef5f062d23 /lib/test_vmalloc.c
parentbb162bb2b4394108c8f055d1b115735331205e28 (diff)
parentfa55b7dcdc43c1aa1ba12bca9d2dd4318c2a0dbf (diff)
downloadlinux-467dd91e2f783d34b2205751bdf88bcdcac55984.tar.xz
Merge drm/drm-fixes into drm-misc-fixes
We need -rc1 to address a breakage in drm/scheduler affecting panfrost. Signed-off-by: Maxime Ripard <maxime@cerno.tech>
Diffstat (limited to 'lib/test_vmalloc.c')
-rw-r--r--lib/test_vmalloc.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/test_vmalloc.c b/lib/test_vmalloc.c
index e14993bc84d2..cf41fd6df42a 100644
--- a/lib/test_vmalloc.c
+++ b/lib/test_vmalloc.c
@@ -393,7 +393,7 @@ static struct test_driver {
static void shuffle_array(int *arr, int n)
{
unsigned int rnd;
- int i, j, x;
+ int i, j;
for (i = n - 1; i > 0; i--) {
get_random_bytes(&rnd, sizeof(rnd));
@@ -402,9 +402,7 @@ static void shuffle_array(int *arr, int n)
j = rnd % i;
/* Swap indexes. */
- x = arr[i];
- arr[i] = arr[j];
- arr[j] = x;
+ swap(arr[i], arr[j]);
}
}