From patchwork Fri Sep 22 11:30:29 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Howells X-Patchwork-Id: 13395600 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8AB0BCD4F5B for ; Fri, 22 Sep 2023 11:30:54 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 25F7D6B02A5; Fri, 22 Sep 2023 07:30:54 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 20FDF6B02A7; Fri, 22 Sep 2023 07:30:54 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 0D68E6B02A9; Fri, 22 Sep 2023 07:30:54 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id F2FA86B02A5 for ; Fri, 22 Sep 2023 07:30:53 -0400 (EDT) Received: from smtpin06.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay04.hostedemail.com (Postfix) with ESMTP id BF7341A09CD for ; Fri, 22 Sep 2023 11:30:53 +0000 (UTC) X-FDA: 81264016386.06.C55F118 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by imf03.hostedemail.com (Postfix) with ESMTP id 0003C20008 for ; Fri, 22 Sep 2023 11:30:51 +0000 (UTC) Authentication-Results: imf03.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=Zs3MRY+i; dmarc=pass (policy=none) header.from=redhat.com; spf=pass (imf03.hostedemail.com: domain of dhowells@redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=dhowells@redhat.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1695382252; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=71Btu3XYwWZK+FmqHCgDmjFCfU/69a0+IvtQoWaiN/g=; b=hB5AVSwW/+LdftfxJSj630jl9BzP9wr/wbgZiRNVeaY5F4umsOuB8qaIq357fwhzPt48za ImgyAmzgBxRveSZzx8LcTWcCfsGQw4JNQjdZuHUtzSaEunpMUuUJEdCHNM5/P0eMF859ix DlqqMwWKpfaIuriujsLvswBP2GIUPaE= ARC-Authentication-Results: i=1; imf03.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=Zs3MRY+i; dmarc=pass (policy=none) header.from=redhat.com; spf=pass (imf03.hostedemail.com: domain of dhowells@redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=dhowells@redhat.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1695382252; a=rsa-sha256; cv=none; b=bHUcyhftkAhhR4RWb7LPqSkHUYxROrhnRjQmSRXj/ytf2xLyfKZ09fQa0J1nZlbPQrzmXD YgRGhgs2UFcVTTP49vUsFv2NNADle+F+u2TP5qVoOVHCH+Jp9lvxLlYu+femHMSZyAWxtx Lzk7aOeC3rIY4AX1pm3ELaDR9Fq1f2U= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1695382251; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=71Btu3XYwWZK+FmqHCgDmjFCfU/69a0+IvtQoWaiN/g=; b=Zs3MRY+iMI7HXGTyjc0bwPZFkeqIthFUIJnuc2sBHxGHp8BLdanaxWXdInOnv6iDTatfth BEHbZZdDxfErDfANxWbclI/3e9v5pBavMv50/znkM6IjXXHIOI+8G2p5FzqPPcVJKiwGRA wDlQr05nTgghgh5ikJSfRWRz6ccg9Yk= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-653-KT0GdNRTOGGtecP5LMMYMg-1; Fri, 22 Sep 2023 07:30:47 -0400 X-MC-Unique: KT0GdNRTOGGtecP5LMMYMg-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 0347B801FA9; Fri, 22 Sep 2023 11:30:47 +0000 (UTC) Received: from warthog.procyon.org.com (unknown [10.42.28.216]) by smtp.corp.redhat.com (Postfix) with ESMTP id DCDCC40C6EBF; Fri, 22 Sep 2023 11:30:43 +0000 (UTC) From: David Howells To: Jens Axboe Cc: David Howells , Al Viro , Linus Torvalds , Christoph Hellwig , Christian Brauner , David Laight , Matthew Wilcox , Brendan Higgins , David Gow , linux-fsdevel@vger.kernel.org, linux-block@vger.kernel.org, linux-mm@kvack.org, netdev@vger.kernel.org, linux-kselftest@vger.kernel.org, kunit-dev@googlegroups.com, linux-kernel@vger.kernel.org, Johannes Thumshirn , Christian Brauner , David Hildenbrand , John Hubbard Subject: [PATCH v3 01/10] iov_iter: Fix some checkpatch complaints in kunit tests Date: Fri, 22 Sep 2023 12:30:29 +0100 Message-ID: <20230922113038.1135236-2-dhowells@redhat.com> In-Reply-To: <20230922113038.1135236-1-dhowells@redhat.com> References: <20230922113038.1135236-1-dhowells@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.2 X-Rspamd-Queue-Id: 0003C20008 X-Rspam-User: X-Rspamd-Server: rspam05 X-Stat-Signature: 3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DB05jFev4fSQ/QTtEfQNrfaodY1JFGzgskAyzGo6JInCXyNAEg4dixmGFFROpB1k0vTvykwj9sqBCr3znY0EyqFq6Lp5tlFe7qKel6IeeHuFGX/gePpxlnQVPj9eUy6+d9oYKt6FyG2IaQxd7sh4q+K4gEFkPN6MJA53ir0UffvuB2QUqxYdS1UhB6Zap7eBFNMX7MLubqtGKYBNj+4Wka2fif9nVU9iWQVWLqH9GFyK49Rq8vjkcM595vKZbdlr0MTOblEPlNpN07AWmyXrvBA9nySFKfymksA5V3tB+z8HOQ0bIMk/MwZmNjF4oFL6QXlU1mlSuJuWy/jTbsyC0yrnIPwNCTcztTHZP3XZJel/cRD5j4Nid+PUun3uOCT+bSN2/Pdc7RedhY5NwgrVN9w2ITybVsrieDFHjsmT2XOiw7+GGXsWIVSDmUiIevKCoE4qjPs7SJN54bqu5ZRevKnY18XG5LWVAe8WIRQFzVrdaKWsNOdv6tAFCIvceTuDgAxYFMXmclpw== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: Fix some checkpatch complaints in the new iov_iter kunit tests: (1) Some lines had eight spaces instead of a tab at the start. (2) Checkpatch doesn't like (void*)(unsigned long)0xnnnnnULL, so switch to using POISON_POINTER_DELTA plus an offset instead. Reported-by: Johannes Thumshirn Signed-off-by: David Howells cc: Christoph Hellwig cc: Christian Brauner cc: Jens Axboe cc: Al Viro cc: David Hildenbrand cc: John Hubbard cc: Brendan Higgins cc: David Gow cc: linux-kselftest@vger.kernel.org cc: kunit-dev@googlegroups.com cc: linux-mm@kvack.org cc: linux-fsdevel@vger.kernel.org --- lib/kunit_iov_iter.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/kunit_iov_iter.c b/lib/kunit_iov_iter.c index 859b67c4d697..4a6c0efd33f5 100644 --- a/lib/kunit_iov_iter.c +++ b/lib/kunit_iov_iter.c @@ -53,7 +53,7 @@ static void *__init iov_kunit_create_buffer(struct kunit *test, void *buffer; pages = kunit_kcalloc(test, npages, sizeof(struct page *), GFP_KERNEL); - KUNIT_ASSERT_NOT_ERR_OR_NULL(test, pages); + KUNIT_ASSERT_NOT_ERR_OR_NULL(test, pages); *ppages = pages; got = alloc_pages_bulk_array(GFP_KERNEL, npages, pages); @@ -63,7 +63,7 @@ static void *__init iov_kunit_create_buffer(struct kunit *test, } buffer = vmap(pages, npages, VM_MAP | VM_MAP_PUT_PAGES, PAGE_KERNEL); - KUNIT_ASSERT_NOT_ERR_OR_NULL(test, buffer); + KUNIT_ASSERT_NOT_ERR_OR_NULL(test, buffer); kunit_add_action_or_reset(test, iov_kunit_unmap, buffer); return buffer; @@ -548,7 +548,7 @@ static void __init iov_kunit_extract_pages_kvec(struct kunit *test) size_t offset0 = LONG_MAX; for (i = 0; i < ARRAY_SIZE(pagelist); i++) - pagelist[i] = (void *)(unsigned long)0xaa55aa55aa55aa55ULL; + pagelist[i] = (void *)POISON_POINTER_DELTA + 0x5a; len = iov_iter_extract_pages(&iter, &pages, 100 * 1024, ARRAY_SIZE(pagelist), 0, &offset0); @@ -626,7 +626,7 @@ static void __init iov_kunit_extract_pages_bvec(struct kunit *test) size_t offset0 = LONG_MAX; for (i = 0; i < ARRAY_SIZE(pagelist); i++) - pagelist[i] = (void *)(unsigned long)0xaa55aa55aa55aa55ULL; + pagelist[i] = (void *)POISON_POINTER_DELTA + 0x5a; len = iov_iter_extract_pages(&iter, &pages, 100 * 1024, ARRAY_SIZE(pagelist), 0, &offset0); @@ -709,7 +709,7 @@ static void __init iov_kunit_extract_pages_xarray(struct kunit *test) size_t offset0 = LONG_MAX; for (i = 0; i < ARRAY_SIZE(pagelist); i++) - pagelist[i] = (void *)(unsigned long)0xaa55aa55aa55aa55ULL; + pagelist[i] = (void *)POISON_POINTER_DELTA + 0x5a; len = iov_iter_extract_pages(&iter, &pages, 100 * 1024, ARRAY_SIZE(pagelist), 0, &offset0);