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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2DE12C64EC4 for ; Fri, 3 Mar 2023 17:03:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231512AbjCCRDL convert rfc822-to-8bit (ORCPT ); Fri, 3 Mar 2023 12:03:11 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48790 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231496AbjCCRDI (ORCPT ); Fri, 3 Mar 2023 12:03:08 -0500 Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6B47AD533 for ; Fri, 3 Mar 2023 09:03:06 -0800 (PST) Received: from omf03.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id C8E791603C1; Fri, 3 Mar 2023 16:53:04 +0000 (UTC) Received: from [HIDDEN] (Authenticated sender: joe@perches.com) by omf03.hostedemail.com (Postfix) with ESMTPA id B1D5E6000C; Fri, 3 Mar 2023 16:53:02 +0000 (UTC) Message-ID: Subject: Re: Infinite loop in checkpatch.pl From: Joe Perches To: Alexander Potapenko , apw@canonical.com, dwaipayanray1@gmail.com, Lukas Bulwahn Cc: LKML In-Reply-To: References: Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8BIT Date: Fri, 03 Mar 2023 08:52:57 -0800 MIME-Version: 1.0 User-Agent: Evolution 3.44.4 (3.44.4-2.fc36) X-Rspamd-Server: rspamout08 X-Rspamd-Queue-Id: B1D5E6000C X-Stat-Signature: fyjdf78ycetdnxmkymxabogu9kj5fwxt X-Session-Marker: 6A6F6540706572636865732E636F6D X-Session-ID: U2FsdGVkX182hfoMHKx1a/qiRR/lIrsTQWRJ4lUHW7c= X-HE-Tag: 1677862382-426096 X-HE-Meta: U2FsdGVkX1/YP/POAhmPSmV40csoHua+ZwOVcqC/uKLkutucj8FYAJ8i4OAmFziLycIsQIZvk6pJPSMxzhowLg== Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 2023-03-03 at 15:28 +0100, Alexander Potapenko wrote: > Hi folks, > > I've noticed that checkpatch.pl chokes on the following file (also attached): > > ================================== > $ cat test-checkpatch.txt > diff --git a/mm/kmsan/kmsan_test.c b/mm/kmsan/kmsan_test.c > @@ -504,6 +504,25 @@ static void > test_memcpy_aligned_to_unaligned2(struct kunit *test) > + EXPECTATION_NO_REPORT(expect); \ > + volatile uint##size##_t uninit; \ checkpatch isn't a syntax complete c parser. Don't expect to be.