From patchwork Wed Sep 20 13:03:52 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Howells X-Patchwork-Id: 13392742 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 46700CE79CF for ; Wed, 20 Sep 2023 13:04:43 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id CF9556B00B7; Wed, 20 Sep 2023 09:04:42 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id C80FC6B00EA; Wed, 20 Sep 2023 09:04:42 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id B05C66B0102; Wed, 20 Sep 2023 09:04:42 -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 966B96B00B7 for ; Wed, 20 Sep 2023 09:04:42 -0400 (EDT) Received: from smtpin17.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id 3531F1CA09E for ; Wed, 20 Sep 2023 13:04:42 +0000 (UTC) X-FDA: 81256995204.17.C5CFF3A Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by imf25.hostedemail.com (Postfix) with ESMTP id 758DFA003C for ; Wed, 20 Sep 2023 13:04:19 +0000 (UTC) Authentication-Results: imf25.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=dJUDZ8Bm; spf=pass (imf25.hostedemail.com: domain of dhowells@redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=dhowells@redhat.com; dmarc=pass (policy=none) header.from=redhat.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1695215059; 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=VKWSpuQkETVb/v5SDgwp6hG2IhcxLE4ixy/3eQRoUO5UOtaaWvoesrcRdljTUuaja058oH Y819vtMeuawsyiQjieQDRsS3xtiT4fpL6Hs0vWJUGARHH8ZaWG59MUEg5VOhfDZOUhIE+e 8ZQhbeOXqalX6VHuhT9Eka+M5NZ9XOo= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1695215059; a=rsa-sha256; cv=none; b=ZHLl+/d2YheZrjR9siBaQcQiuLbLfjVeMXH1s9kS/Gs+eS6Cr0LW0EpqruyukCfKVEgZJS Ds4aG2cUGIR/beQaaU7qxMdca7dmAm+jsv1+dX6mj8vG6QagTnIJwdAxi0Fc5yAWXrofoT 2608CIvGB+YxL8J373LahY2auo7yVI0= ARC-Authentication-Results: i=1; imf25.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=dJUDZ8Bm; spf=pass (imf25.hostedemail.com: domain of dhowells@redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=dhowells@redhat.com; dmarc=pass (policy=none) header.from=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1695215058; 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=dJUDZ8Bmqjg9ekJ26q89fEJXOIH+2HuI2q6sUpamaTfVPHXw1CujtZT88qc/r/NwpoHQTa xcmvE+Gug9EWJQYy2ikB6EQDo6oSDlngldP6ceJV/bl1ulGfcYXl42LZ+6dMWpFFKGBVEu I9gL8bxcMN840MkvWJFchMtkrInSyGY= 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-499-gqjx5typNpO8hKhRJZWB-g-1; Wed, 20 Sep 2023 09:04:15 -0400 X-MC-Unique: gqjx5typNpO8hKhRJZWB-g-1 Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) (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 540B189C6A3; Wed, 20 Sep 2023 13:04:14 +0000 (UTC) Received: from warthog.procyon.org.com (unknown [10.42.28.216]) by smtp.corp.redhat.com (Postfix) with ESMTP id 09F2E492B05; Wed, 20 Sep 2023 13:04:08 +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: [RFC PATCH v2 1/9] iov_iter: Fix some checkpatch complaints in kunit tests Date: Wed, 20 Sep 2023 14:03:52 +0100 Message-ID: <20230920130400.203330-2-dhowells@redhat.com> In-Reply-To: <20230920130400.203330-1-dhowells@redhat.com> References: <20230920130400.203330-1-dhowells@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.10 X-Stat-Signature: dm9pasjj16nbb5fsg4pw3hkptpqdux67 X-Rspamd-Server: rspam10 X-Rspamd-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Xk6SU75MkImFqCntJqLA2R3/ZhPI3pacunya+Q2hVE0BQZK7SVeNPmASqv3W6Z+iVGW7ZP3QT+OtRWft+id4cfl6qhr9qN2Fvwl47UY61gUUvAVrGhd5I5PHzhofbKA6LT55EddnZTAu3wBLci6TmeG+A3WCMzeU9OINNAJTmjAsQBDlCVBo9q7T5A6wDI/lPfRP7hOPHMhl/9WR1+d/n3iXOx5qMEWhAXHMNfaOyVRR+hOpBWUl20ZRyJVZ0D7P7OWNwLGbU31cum3owmYb9gmirB8fY5eLe2E13iavSLYMjRhny4R+den0ejkVz5Bw4IVPkB9xc6Y3qjgfpe6WNmn9Na92X8uIe8gIJC1crTolGrVv5Xo7YrrMGcX3t21uGUYmEea0XfdZIc5+Do0ruxyW1zwaUA9bxURYtdtDC4+JfMUtYAlaok6WMMLkOB6sPLIeFZ356rWiah9p+Lh+n5GAYb3aAMSjh7kRnjrHKakSZ8jM47zCduRMPTlZDX1jZWwdkzTtpdS8ZxawKmowtF3KJcI+NC3g== 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);