Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp5732840pxb; Tue, 16 Feb 2021 06:23:02 -0800 (PST) X-Google-Smtp-Source: ABdhPJzbnZh7sN65TjanuWFwyV0HEXuAQ1I3pwQoVHHfary364PHLunGbVgaE8Ox8zlKClDmjgj7 X-Received: by 2002:a17:906:da1e:: with SMTP id fi30mr20297950ejb.151.1613485382532; Tue, 16 Feb 2021 06:23:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1613485382; cv=none; d=google.com; s=arc-20160816; b=T8+2DguxWodqgtN4lRFRG2QuggNJ6BB/qRipzLZh83cscN1Eb6gNWvXoAG16zLRYSA 35Oz7PJ/AM/P8/Q/DIXdOj6b1k+rNjUngftOJebizqc9FrC5AnDHqE8kKLf75bAD1t2A zK04ylIYijXp7BjBZKaNtVkhz9cl1KN+SkwnVQkbJSRpbnAtGSYyZqWNrlRx9u6At2eD TrcZQI/Ef8K7a2BnsA88U/eZDjpcqTLJZv+bahFCoPBlP2Ugw0TRZbLdzDm4DYnra+kK 7PMKNzKLbhZMFVN4vt717XYMS+TZ3Y13Sauu9617HPhJ0qofy0UWIMRz0wMnpt4ezIKW bw7g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=ydSVplyCbekENrKjGYCbN31ZHi4GQiUsavtSWIdE7WQ=; b=zNb/rSGeSGR3XMoL4/hMraramRqUK1R4MIHKv2ic7g86wfLQzpFzv3AnGXqZHHKX6y ZBcOEOpHyguEzkYPyuB37m1S8G9e7OYdRY/1976hXGbPG9yFpIJWZnUyYCknzP7wz3PU +4PrWYGF0NFtaiiV6hvgcGXpPnXVGLybVDtJhGerwCXyN2z6HUWsnDKr7DmniXDqkVak SU4jUtAQY8wAKDENTn0KsABRqJzfhIx+V4YGXkW8FrCM9ghsaLl3C69LsfwZEckq1o9i UkH+tUrbrox75ArGa5lBLMIeU4w+STCuTnivOEh+Fux53QS7h8VySn5PQELNYWVSQRD7 IAXg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=XIBlbgPs; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id cf14si14376058edb.354.2021.02.16.06.22.38; Tue, 16 Feb 2021 06:23:02 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=XIBlbgPs; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230188AbhBPOUX (ORCPT + 99 others); Tue, 16 Feb 2021 09:20:23 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49610 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229970AbhBPOTm (ORCPT ); Tue, 16 Feb 2021 09:19:42 -0500 Received: from mail-wr1-x430.google.com (mail-wr1-x430.google.com [IPv6:2a00:1450:4864:20::430]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B7938C06178A for ; Tue, 16 Feb 2021 06:18:52 -0800 (PST) Received: by mail-wr1-x430.google.com with SMTP id b3so13233206wrj.5 for ; Tue, 16 Feb 2021 06:18:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=ydSVplyCbekENrKjGYCbN31ZHi4GQiUsavtSWIdE7WQ=; b=XIBlbgPsJ1B7Xxrwtu/pEkpdbjZWJE+D38NMZJDf59kPikUY8w7fYbO5jLdTBRm4C/ tYXfcDWipNI0QNLIw5EpR6Vr8NvJ1luoMm5RKZdZpJIBKSxu8QNDcJtdBwu03VYwofXr i8FeLuCTUttFXtN4yQuzfDTLw6yxHslE/JtLWEe1bJ0ZehzpAy6kzRLHY7EAya+d5f1w 6oPCJH81yB/r4RZdbFD7Y3p1Pj61vFfZRK7d7RSDlcp9UXSXJkHJxThWgS4Ewkv/0lGc aVBg0W44fq9+R4j4iVxTkekZbUwczPFdcktOWVEop3YRpdBUYSLnqSCdTzLTchmC6JAI 7/Ew== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=ydSVplyCbekENrKjGYCbN31ZHi4GQiUsavtSWIdE7WQ=; b=RdiiI5sRb/C3ZnM3WCN51jFUCrld7RwIAb8npqf24XFbhibHj2L3S/vb48fe9tACFi qXE0y3rE4MnaSVzWss3GUzXxlw4+V4JH8uirWpj7HC5q4Ic0L6c5s8J8dg3+XSwuwQSA aZ0ZwuEBjANHEvqBKL9FyNSnwtS1xn01usZfWtsB7eLfPr1+woEi1VCzzR/GYdvHuBeQ 1+uP0l6MT2JbU0C+19fdIUki9KXI8mainAU4zZdIDvLqsl5SoAmQWcvNGRrSM6zYWwLf bwBfngaYZeY4Cda+awIf8mEJKvTqrsSLKHdD1bVKtutr4a2aIZSqliao8FyueA6TGRNG M7zw== X-Gm-Message-State: AOAM5303JUyJ1I6gjje+F/PQhUWP49j0ruLWiSx+du6UoZ4lcfeloaC/ 03a3J88J2laLMXjAXDL02BS1Y1zM/9jDyNuDTJE8lZPI1aRQ1obL X-Received: by 2002:a5d:45ca:: with SMTP id b10mr24528912wrs.9.1613485131379; Tue, 16 Feb 2021 06:18:51 -0800 (PST) MIME-Version: 1.0 References: <20210213131513.51386-1-dwaipayanray1@gmail.com> <20210213131513.51386-3-dwaipayanray1@gmail.com> In-Reply-To: From: Dwaipayan Ray Date: Tue, 16 Feb 2021 19:48:52 +0530 Message-ID: Subject: Re: [PATCH RFC v3 2/3] docs: add documentation for checkpatch To: Joe Perches , Lukas Bulwahn Cc: linux-kernel-mentees@lists.linuxfoundation.org, linux-kernel Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Feb 14, 2021 at 10:27 PM Joe Perches wrote: > > On Sat, 2021-02-13 at 18:45 +0530, Dwaipayan Ray wrote: > > Add documentation for kernel script checkpatch.pl. > > This documentation is also parsed by checkpatch to > > enable a verbose mode. > > > > The message types in checkpatch are documented with rst > > field lists. A total of 33 checkpatch type descriptions > > are added. > > Alphabetic ordering isn't that great for these entries. > Please group them by use: > > whitespace/code layout style: > SPACING, TRAILING_WHITESPACE, LINE_SPACING > > commit message defects: > BAD_SIGN_OFF, BAD_STABLE_ADDRESS_STYLE, COMMIT_COMMENT_SYMBOL, COMMIT_MESSAGE > > Allocation style: > group: ALLOC_ARRAY_ARGS, ALLOC_SIZEOF_STRUCT, ALLOC_WITH_MULTIPLY > > > diff --git a/Documentation/dev-tools/checkpatch.rst b/Documentation/dev-tools/checkpatch.rst > [] > > +4 Type Descriptions > > +------------------- > > + > > +This section contains a description of all the message types in checkpatch. > > + > > +.. Types in this section are also parsed by checkpatch. > > +.. Please keep the types sorted alphabetically. > > + > > +:ALLOC_ARRAY_ARGS: > > + The first argument for kcalloc or kmalloc_array should be the > > + number of elements. sizeof() as the first argument is generally > > + wrong. > > If you look at the generated .html file, the output format is poor. > > It would probably be better to use > **** > for each of these blocks instead of > :: > > and update the script appropriately. > Hi, Could I get some comment on this grouping for types: Allocation Style: ALLOC_ARRAY_ARGS, ALLOC_SIZEOF_STRUCT, ALLOC_WITH_MULTIPLY API Usage: ARCH_DEFINES, ARCH_INCLUDE_LINUX, ARRAY_SIZE, AVOID_BUG, AVOID_EXTERNS, AVOID_L_PREFIX, BIT_MACRO, CONSIDER_KSTRTO Comment Style: BLOCK_COMMENT_STYLE, C99_COMMENTS Commit Message: BAD_SIGN_OFF, BAD_STABLE_ADDRESS_STYLE, COMMIT_COMMENT_SYMBOL, COMMIT_MESSAGE, MISSING_SIGN_OFF, NO_AUTHOR_SIGN_OFF Comparison Style: ASSIGN_IN_IF, BOOL_COMPARISON, COMPARISON_TO_NULL, CONSTANT_COMPARISON Spacing & Brackets: ASSIGNMENT_CONTINUATIONS, BRACES, BRACKET_SPACE, CODE_INDENT, CONCATENATED_STRING, LINE_SPACING, TRAILING_WHITESPACE Others: CAMELCASE, CONFIG_DESCRIPTION This is what I have done till now. Any suggestions would be nice and if it looks okay I would like to send the v4 in. Thanks & Regards, Dwaipayan.