Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp5082378pxb; Mon, 15 Feb 2021 09:02:48 -0800 (PST) X-Google-Smtp-Source: ABdhPJwnBH4dW5KqmQVxJBlNzUi3d82byA/p6ZwIwsUGpCWFMh9BmaNp31DoMewOSt34IIpvpJZf X-Received: by 2002:a17:906:37c1:: with SMTP id o1mr16138688ejc.488.1613408568360; Mon, 15 Feb 2021 09:02:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1613408568; cv=none; d=google.com; s=arc-20160816; b=xWIM8wyfCiyIJQvZqNyv3vlRIJCKjM0kKecvTuWs3WhhKaIguCkKswU7vlnvg48uDV W705OnTn1IVflpnIwooOV2oWuuaYije+uqCXcvRds+cqHSdQ8EWDJs9qSeBsjB2oer4Y K9kEdj03x9PCVY7tXM02p2VkzPZDt1E/fQj+boKrFZQlGhKar3BRB//9Ksna+JvpijPf SL0CMNr63g7Wc2Ji7oldVDfRZuw/DIy9TWNSYHtiML6AZJnkrww5NV4Elx837sULGWyb rUevI/qJXbDjGXPCiUx3LChP5secfL92+NzrmBw9Hlpg6wJz0pNBhbsuKAPBow1B3A9T fF4g== 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=qYv02kkDzygIz/c9kOz4zAZRF/qlhW6TZOluFWpeXaY=; b=SLrH89RGgZIgtym1G+JMnGH8NHMJlr7RUw7UaZzqI8M+hBsXxJqjAbyNwNN+krlczR dIJDmfeBS0r8bJ04t7fXZLrdfkX2fVNVrIXdJXlkCYBnnHS20MF5EwX1a2dDBuAiAxEG R6wedtuYgInh7ZwXECdmx+whOOVhDoSgLP/y2QRT1+ysSCD1aQ2TXTXL4zS4SKj4FkWy P0PM1i6fhh1ZZK7cWU9LKk44DtR0KpqEkUoj6RlFRVfj830zG8hz3BvWElswOa5omiaI NcVNAITSZZzn8786WB7jbF/y+wskqDmojqKf11iG+ExwKI6Id1C7BkBR4oleNeHsXcbz IHyA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=JjLOlNL2; 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 bx17si11978633edb.578.2021.02.15.09.02.24; Mon, 15 Feb 2021 09:02:48 -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=JjLOlNL2; 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 S232203AbhBORAx (ORCPT + 99 others); Mon, 15 Feb 2021 12:00:53 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43012 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232081AbhBOPvU (ORCPT ); Mon, 15 Feb 2021 10:51:20 -0500 Received: from mail-wr1-x431.google.com (mail-wr1-x431.google.com [IPv6:2a00:1450:4864:20::431]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 01E14C061223 for ; Mon, 15 Feb 2021 07:50:37 -0800 (PST) Received: by mail-wr1-x431.google.com with SMTP id t15so9421449wrx.13 for ; Mon, 15 Feb 2021 07:50:36 -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=qYv02kkDzygIz/c9kOz4zAZRF/qlhW6TZOluFWpeXaY=; b=JjLOlNL2WTq0Ismr3EVMEOfEVjfKUSqtfkQ1In8tOV+sJlej3MswyDj39mBRI4+5Qf agiRbXymc9s6rAoWpgd8V6xCi5uZiCzYJ5cja9oyAtWQ+CX2lldDVyr57oxdv3uQ1MrX iAWm4fCJqzuqSRHziqxyinAsNBk6SiSI94ITSbYJgy+/SjZ0DJeR0u0ermFMjwyGUlP1 0s7HodiEOv4ZwI+n/AoVdqjxPy2Un4G9je3aJ3KX7Eh8BMWrviCoeAdfSjJQ44b9KJao TL1hUSjfTIoXBI7ClFcFDkUaCwAVFv9NA7F58wRH3euBOLy1h+tFHSNbDCEq/aKsuQPD bM8Q== 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=qYv02kkDzygIz/c9kOz4zAZRF/qlhW6TZOluFWpeXaY=; b=Y8j7AZaUt4T7+bpHxgkw5x7XoPsUnbkql7TyF7vwfRufHmooIjlLiv2P7+StQXrjCe NPp18r9UtTke9fBmRILhnZCZkSvCKGRQLH4++w566tx6OnhSTnVPZZJj0faCNLX3c0h6 BKqn/f8eCiaCOUjGbKkqp7RxL0ztUdheVLlhpvU5nh7+2T+d80F/r2yampMKyf+hg7Yx As/jl8SGVzG7B/FIopame0fk9YqqlH6V72VlriWdK9zFq+3+EPA7biVJ+xUO0zQMpg1o NHgpN7sbQ7kZcKTz8lPXxwqInyQDOanhHkfLf9AmAgKtmV589q0zpkCgLUWjaqXobwla 14iA== X-Gm-Message-State: AOAM533FunmM+jG4is4DPuimgpPyWtLjOrcRUgjBHoKIiMQM1PHMluXD CPPGGsq5pmLrqWacu+Us3nP1/hFyjB2J/i07Ns4WxSGAUVc= X-Received: by 2002:a5d:620d:: with SMTP id y13mr19338833wru.88.1613404235605; Mon, 15 Feb 2021 07:50:35 -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: Mon, 15 Feb 2021 21:20:35 +0530 Message-ID: Subject: Re: [PATCH RFC v3 2/3] docs: add documentation for checkpatch To: Joe Perches Cc: Lukas Bulwahn , 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. Thanks, I will do these. Also someone pointed out in the list that some lines in the patch contained > 80 columns. Checkpatch doesn't generate any warning for that. Is it something that could be added to checkpatch or was it decided against at some point? Thanks, Dwaipayan.