From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; dkim=none Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C5BF3192; Wed, 15 Nov 2023 20:00:10 -0800 (PST) Received: from omf03.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id 1BF32160B3E; Thu, 16 Nov 2023 04:00:08 +0000 (UTC) Received: from [HIDDEN] (Authenticated sender: joe@perches.com) by omf03.hostedemail.com (Postfix) with ESMTPA id 028B46000A; Thu, 16 Nov 2023 04:00:00 +0000 (UTC) Message-ID: <2d5db599144596bdc12533a366d5d2d8f375014e.camel@perches.com> Subject: Re: [PATCH v3 01/10] iov_iter: Fix some checkpatch complaints in kunit tests From: Joe Perches To: David Howells , Christian Brauner Cc: Jens Axboe , Al Viro , Linus Torvalds , Christoph Hellwig , 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 Date: Wed, 15 Nov 2023 20:00:00 -0800 In-Reply-To: <20231115154946.3933808-2-dhowells@redhat.com> References: <20231115154946.3933808-1-dhowells@redhat.com> <20231115154946.3933808-2-dhowells@redhat.com> Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.48.4 (3.48.4-1.fc38) Precedence: bulk X-Mailing-List: linux-kselftest@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Stat-Signature: 351xofsuni5kanig7iiz4sjma1jzxkft X-Rspamd-Server: rspamout05 X-Rspamd-Queue-Id: 028B46000A X-Session-Marker: 6A6F6540706572636865732E636F6D X-Session-ID: U2FsdGVkX18a7JS4BL8h7HLIdDXMm2YCe3xiJn/hEoo= X-HE-Tag: 1700107200-315216 X-HE-Meta: U2FsdGVkX18LEi6bPNImGq+TG8DpnNDiieNtyzLyawftOGFa1xnL3e2LfgJJyTLmLwogrMHbv17rz+M/8vJb8yVNQ1eCzPPOqKmiLWnXkWH0Z4A9nMD1IG6Np+PP3yRiu6HzLDt5vFNdyg6DurWOPJlIDfPWoBPm7Ey6IGQrJB9nzzek/4SHhy/NFXArWdJKtMpL5kSDR4003ihhuhR+s+TvBzrKMZcNgv7yMLgzT5KBcOkBLwkUfhN4pz6HD8ADTd57MGw8Q0+siSvVmwP7pkzt/Zvq1GRUig7ERppizdBVNRIz92TiEZDE+AHJ9Ti8 On Wed, 2023-11-15 at 15:49 +0000, David Howells wrote: > Fix some checkpatch complaints in the new iov_iter kunit tests: >=20 > (1) Some lines had eight spaces instead of a tab at the start. >=20 > (2) Checkpatch doesn't like (void*)(unsigned long)0xnnnnnULL, so switch = to > using POISON_POINTER_DELTA plus an offset instead. That's because checkpatch is fundamentally stupid and that's a false positive. > diff --git a/lib/kunit_iov_iter.c b/lib/kunit_iov_iter.c [] > @@ -548,7 +548,7 @@ static void __init iov_kunit_extract_pages_kvec(struc= t kunit *test) > size_t offset0 =3D LONG_MAX; > =20 > for (i =3D 0; i < ARRAY_SIZE(pagelist); i++) > - pagelist[i] =3D (void *)(unsigned long)0xaa55aa55aa55aa55ULL; > + pagelist[i] =3D (void *)POISON_POINTER_DELTA + 0x5a; I think the original is easier to understand or would best be replaced by a single #define without the addition. > @@ -626,7 +626,7 @@ static void __init iov_kunit_extract_pages_bvec(struc= t kunit *test) > size_t offset0 =3D LONG_MAX; > =20 > for (i =3D 0; i < ARRAY_SIZE(pagelist); i++) > - pagelist[i] =3D (void *)(unsigned long)0xaa55aa55aa55aa55ULL; > + pagelist[i] =3D (void *)POISON_POINTER_DELTA + 0x5a; etc...