Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp961942rwe; Thu, 1 Sep 2022 10:09:31 -0700 (PDT) X-Google-Smtp-Source: AA6agR6XP58xQbxrnGvW5+Yayz7gTOiHTvcQoyDpkChu7kfETrEg+cw1sY6Wr9KbooWNYSC8bn4d X-Received: by 2002:a05:6402:50d1:b0:448:982a:12d0 with SMTP id h17-20020a05640250d100b00448982a12d0mr15049538edb.344.1662052171233; Thu, 01 Sep 2022 10:09:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662052171; cv=none; d=google.com; s=arc-20160816; b=pNnvkMw4w9ZyXJg91sIl+j6lA67y9bUrfVBeqS1K1wnpTZlBUnbQAAia4LCVVHnWHJ uMOF8T104Z8gbzt5VlX+PO+LkN4di25X38BITK40E0F7zFm0CpsKOUM2tiicQi5/Iqvs v7wIrfRJ7DBj017ePQVMMMrxJpZ3OfNoHbk+1Cxv1yYz7VXSTIhMlNKuuoYpfjbu6wRm gjcgRcdYCphhfzQqXOzUAbTqXo0XCdOffrzAGTt0YyctCseN1b3JoRogP+zZLXtMmuBa 8r0eqN0lkHlBw6LEeiWjFJvWrOIm9x1iPyYZfTgZMxaAAyRHJKuiyTyVWBwNPwp2GlcD 6uAQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent :content-transfer-encoding:references:in-reply-to:date:cc:to:from :subject:message-id; bh=5S1Um/cBebiuVsLSIONrfTVmPZbHJQ37gaI/ZPYlzeM=; b=XMIWd8PZfDFMpaV/tdXL1JhAh1VKQMverCfGnGWEbgQhY5riVArPJe3pCSen150GJg MlDhorllGjqihnCm3yvzBF1e1234t9F+fOD3y5yCYuqcFFKr4ZoHjtgi+rGimzp+MKYQ gNjDC74eZpOoCa7FQmwJRlDae8ZLxVaSCAtBI/9YcxiEPbySF4+dJ4jtHBmTbOfuL+dl hC7slRb1EOz/EXPOzRZ3G0v89j+aN0a1CHhBdN+Ea4wM+cFq/FAkXEceM21XEnPiL2MH GbGYXaLOyuqncyZgW6kb0PuF3Arg+70ehW5dW6u9wC8NUP9syvNrfVnLlLJ0+w/1pK17 vw4Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q20-20020a170906b29400b006fe95bb93b3si6620195ejz.861.2022.09.01.10.09.04; Thu, 01 Sep 2022 10:09:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234630AbiIAP5s convert rfc822-to-8bit (ORCPT + 99 others); Thu, 1 Sep 2022 11:57:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41114 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229720AbiIAP5r (ORCPT ); Thu, 1 Sep 2022 11:57:47 -0400 X-Greylist: delayed 498 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Thu, 01 Sep 2022 08:57:46 PDT Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6C6138286D; Thu, 1 Sep 2022 08:57:46 -0700 (PDT) Received: from omf02.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id C355D120B54; Thu, 1 Sep 2022 15:49:26 +0000 (UTC) Received: from [HIDDEN] (Authenticated sender: joe@perches.com) by omf02.hostedemail.com (Postfix) with ESMTPA id 4F6CC80014; Thu, 1 Sep 2022 15:49:25 +0000 (UTC) Message-ID: <4f958a0c7c0aa2fce613371348477c002aa58e90.camel@perches.com> Subject: Re: [RFC PATCH v1] checkpatch: Handle FILE pointer type From: Joe Perches To: =?ISO-8859-1?Q?Micka=EBl_Sala=FCn?= , Andy Whitcroft Cc: Dwaipayan Ray , Lukas Bulwahn , Shuah Khan , linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org Date: Thu, 01 Sep 2022 11:49:24 -0400 In-Reply-To: <20220901145948.1456353-1-mic@digikod.net> References: <20220901145948.1456353-1-mic@digikod.net> Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8BIT User-Agent: Evolution 3.44.4 (3.44.4-1.fc36) MIME-Version: 1.0 X-Rspamd-Queue-Id: 4F6CC80014 X-Spam-Status: No, score=-0.9 required=5.0 tests=BAYES_00,FORGED_SPF_HELO, RCVD_IN_DNSWL_NONE,SPF_HELO_PASS,SPF_NONE,T_SCC_BODY_TEXT_LINE, UNPARSEABLE_RELAY autolearn=no autolearn_force=no version=3.4.6 X-Stat-Signature: osrgtkai3soscuwdadz7yu5j6usgcu3p X-Rspamd-Server: rspamout01 X-Session-Marker: 6A6F6540706572636865732E636F6D X-Session-ID: U2FsdGVkX186WoNAtkhyX/vzDIDQ/MOm09E6x6e6lZU= X-HE-Tag: 1662047365-236167 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 2022-09-01 at 16:59 +0200, Micka?l Sala?n wrote: > When using a "FILE *" type, checkpatch considers this an error. Fix > this by explicitly defining "FILE" as a common type. [] > Another error may be throw when we use FIXTURE_{DATA,VARIANT}() structs, > as defined in kselftest_harness.h . [] > diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl [] > @@ -576,10 +576,17 @@ our $typeKernelTypedefs = qr{(?x: > (?:__)?(?:u|s|be|le)(?:8|16|32|64)| > atomic_t > )}; > +our $typeStdioTypedefs = qr{(?x: > + FILE > +)}; I'm fine with this. > +# our $typeKselftestHarnessTypedefs = qr{(?x: > +# FIXTURE_(?:DATA|VARIANT)\($Ident\) > +# )}; But not this. Random userspace typedefs should likely be kept in some local version of checkpatch. Or maybe add a command line option like --additional_typedefs=. > our $typeTypedefs = qr{(?x: > $typeC99Typedefs\b| > $typeOtherOSTypedefs\b| > - $typeKernelTypedefs\b > + $typeKernelTypedefs\b| > + $typeStdioTypedefs\b > )};