]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
iov_iter: Remove unused variable in kunit_iov_iter.c
authorDavid Howells <dhowells@redhat.com>
Thu, 25 Jun 2026 14:06:26 +0000 (15:06 +0100)
committerChristian Brauner <brauner@kernel.org>
Wed, 1 Jul 2026 13:26:29 +0000 (15:26 +0200)
Remove the no longer used variable 'b' from iov_kunit_copy_to_bvec().  The
variable is initialised and incremented, but nothing now makes use of the
value.

Signed-off-by: David Howells <dhowells@redhat.com>
Link: https://patch.msgid.link/20260625140640.3116900-9-dhowells@redhat.com
Reviewed-by: Christoph Hellwig <hch@lst.de>
cc: Ming Lei <ming.lei@redhat.com>
cc: Paulo Alcantara <pc@manguebit.org>
cc: Matthew Wilcox <willy@infradead.org>
cc: Christoph Hellwig <hch@infradead.org>
cc: Jens Axboe <axboe@kernel.dk>
cc: netfs@lists.linux.dev
cc: linux-fsdevel@vger.kernel.org
Signed-off-by: Christian Brauner (Amutable) <brauner@kernel.org>
lib/tests/kunit_iov_iter.c

index 1e6fce9cb255ffd07ef0fdbaf5b08402f9ba333d..d9690ba1db887cb0b9adb289dc9933409b85b6a2 100644 (file)
@@ -283,7 +283,7 @@ static void __init iov_kunit_copy_to_bvec(struct kunit *test)
        struct page **spages, **bpages;
        u8 *scratch, *buffer;
        size_t bufsize, npages, size, copied;
-       int i, b, patt;
+       int i, patt;
 
        bufsize = 0x100000;
        npages = bufsize / PAGE_SIZE;
@@ -306,10 +306,9 @@ static void __init iov_kunit_copy_to_bvec(struct kunit *test)
        KUNIT_EXPECT_EQ(test, iter.nr_segs, 0);
 
        /* Build the expected image in the scratch buffer. */
-       b = 0;
        patt = 0;
        memset(scratch, 0, bufsize);
-       for (pr = bvec_test_ranges; pr->from >= 0; pr++, b++) {
+       for (pr = bvec_test_ranges; pr->from >= 0; pr++) {
                u8 *p = scratch + pr->page * PAGE_SIZE;
 
                for (i = pr->from; i < pr->to; i++)