Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp3519646pxv; Mon, 19 Jul 2021 02:08:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzFF1beuax/E53sHHyK9jFtjtKE2GqkUF7Nn6Q9IWdmCG5hNko0op7rM0Ihwutpc0KEem3K X-Received: by 2002:a05:6638:3887:: with SMTP id b7mr18794157jav.42.1626685708245; Mon, 19 Jul 2021 02:08:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626685708; cv=none; d=google.com; s=arc-20160816; b=sdOvJcprC8uvc7xmBWQQOKHrMlPWRQ7f/rDIeI+Qv/mQyojZlKgV0w2FH/bQxn31cP 4TUuxXTAdL2GlIfnvilySVzPshDKrEVytffw3//TQALRG8aMkV8OB9BsNDnAp0TTK6Od e0t/eXwYqQR/Q08Hn77FnzJMZA47bBxo3zFk3RWGBK4UroxKHIWkcFbBqdXg5IEJLlXL xw9uKvqgubHd3onxLGMCZtuwx57lJ3H/fncZ2ypg6LVwyeg26tIaJihWny6TxNsDo70Z qCc3ROZGbXpDqmmKW4LtI8jd/GE8KouWuam+T4Cd5O8cuKelOCT6jGrjWUewoLAclk5Y siDg== 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=IwusH84r9x2LzGFqnZYrdKKl2ZcND/PvCJYkrIcjE98=; b=xLzyziuwZXOHm5zqS9Uy4FQIbeRwaaKwPvsnvKX5OjyCCfDgIN36z50Za+YwiOYDJn QgUYaydXMq2y06j3eCXGGrHABg2yNESIQoPIbVqiNyWp6WEITc2jSNPrU7Bt/9I96Tgp sZcrjni3oKLTr/yQi5pwKVVHEFkkbdUC8R6Lkxye3mKG8FN1PGB6JJQ1D5gaVJ2NrFFs szh7xvR8lcqEjj6685PWLoANFT+jieQqls+CX9cx3xEGJMBk+FhqBHGKgwaRwyMF1Q7z 6ddIedeOXkcLFSFehacjlb5S7rQ4nfxWjeZzIM6a7ROR7ch/47a89YYy7B/tb3dtdvNZ cWaQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=XBPjXyB4; 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 l3si19441928ils.48.2021.07.19.02.08.16; Mon, 19 Jul 2021 02:08:28 -0700 (PDT) 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=XBPjXyB4; 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 S235235AbhGSI1I (ORCPT + 99 others); Mon, 19 Jul 2021 04:27:08 -0400 Received: from mail-ot1-f48.google.com ([209.85.210.48]:40513 "EHLO mail-ot1-f48.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235824AbhGSI1G (ORCPT ); Mon, 19 Jul 2021 04:27:06 -0400 Received: by mail-ot1-f48.google.com with SMTP id a17-20020a9d3e110000b02904ce97efee36so5769380otd.7 for ; Mon, 19 Jul 2021 02:07:45 -0700 (PDT) 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=IwusH84r9x2LzGFqnZYrdKKl2ZcND/PvCJYkrIcjE98=; b=XBPjXyB4aNXLeANEjJ14SHcEJi/z6KEwmweKhzlTJh+2MPbrr81+MFqP9nwEmuXQS4 2ksfYfK5/YammV87uiWL28u1uKHvCydxExYICVtsAwzv3wIphd/cYXQseGrsp6hHR7R5 H96lHE6z3K368IvUXgA4TtVcGomO8VcDkpghqpBVbI0I6ysUgW4xM3s1l22xbmOMDbH3 K4IXQXvaCoKOWu4YYJXdFQaI2X4rCFuxhWAVUTdkbP6A0u6xb8XGVnm8bh9dMKz7DP6S MSuP43fvCfkd1kISFuhg9d1IizxRjqyf0tIwgnSnBywOggfimd3GFDgVwBuUnPk0RsP/ EqBw== 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=IwusH84r9x2LzGFqnZYrdKKl2ZcND/PvCJYkrIcjE98=; b=rkQ5Az0SySEBJgLbxcuM/hIB04K5hni5pDd40wMU8qtTciqk+jnEy6hCH+0nV74jKT IDwEeLp5V5xiQICURroLiwEw7+MTzbX1iLCIQyiFmnUI95faT5w389Q1/hPCACsh4Gj/ kpZ95NhflT5rGr+3jn8hWBh63tJ9p+6DPbS3p6Vk8Yd/L4o5bUoEvQhya6GWO6ur5+GU 7csHRcrGxjbxvo6bJ80LsTHJ+TguD2E1BtaK8vhTWdq12TwZ8m7G7hnKi3e9smI4nSKt p7HaQ+GO65zLdF7uWa6x6fPEH0wj86CemSiWI5KwudqGZvqWaiA5YWZ0Jvw4jMwEyfPX l1RA== X-Gm-Message-State: AOAM532g+dzyT+ZRrRryY/Zd8FqDW/o6NVykJqrPKZaELC/LomX7Fhw2 Z2nRMX2s4vw5/uzJzaM1m7qyCAPIKHxEgB5qvmL09C+R X-Received: by 2002:a25:f30d:: with SMTP id c13mr29482344ybs.134.1626683980682; Mon, 19 Jul 2021 01:39:40 -0700 (PDT) MIME-Version: 1.0 References: <20210714063422.2164699-1-ani@anisinha.ca> <4e42f2580d8b473ac7e25642b039adf73b5efe06.camel@perches.com> In-Reply-To: From: Lukas Bulwahn Date: Mon, 19 Jul 2021 10:39:29 +0200 Message-ID: Subject: Re: [PATCH v3] checkpatch: add a rule to check general block comment style To: Ani Sinha Cc: Joe Perches , Linux Kernel Mailing List , anirban.sinha@nokia.com, mikelley@microsoft.com, Andy Whitcroft , Dwaipayan Ray Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jul 19, 2021 at 10:08 AM Ani Sinha wrote: > > > > On Mon, 19 Jul 2021, Joe Perches wrote: > > > On Mon, 2021-07-19 at 12:25 +0530, Ani Sinha wrote: > > > > > I do not see why we cannot add this rule to checkpatch. If the > > > reviewer likes the other style of commenting they can always ask for a > > > correction. Having checkpatch agree with Linus' preferred style of > > > commenting and the preferred documeted style of commenting (which seems to > > > be the same) does make everything uniform and agreeable. > > > > Too many novice developers take checkpatch output as dicta. > > > > It's not. > > > > Well those "novice" developers have perhaps worked in companies where > tooling like pre-commit sanity hooks have provided immense value in > ensuring certain basic rules and code quality is maintained across the > board, particulay when the company scales. Existing violations did not > deter them from adding stricter rules to make sure all future commits > follow certain patterns. Ofcourse at the end of the day, common sense > trumps any tooling, goes without saying. > > > It's just produces suggestions that should _always_ be taken > > not very seriously. Those suggestions should perhaps be > > considered, but good taste should always override a brainless > > script. > > At the very very least, checkpatch should lay this out in clear terms > every time this is run. Different communities have different rules and for > me, I always run all my patches through checkpatch to make sure that the > patch I sent out of review at least is checkpatch clean. This makes sure > that I am not violating any obvious code submission rules laid out by that > community. This is particularly true for kernel community where flaming > people for even small issues seems to be the culture! > You are assuming that there is THE one consistent style in the kernel repository and within the whole kernel community. But, IMHO, there is not; the repository is too large and the community is too diverse in its preferences. Do an evaluation of coding style in the whole repository and share which one rule is consistently followed in all directories (and how many are not). Further, checking as pre-commit hooks requires that a repository is rather clean wrt. to rule violations, but often in the kernel, it is not. So, you then need to clean up the existing code, which causes dangerous large syntactic refactorings and drowns maintainers. That has been tried, but has been not successful in the past. Hence, with the current state, the checkpatch tool needs to be handled much more with care and critical consideration of the state of the actual code base and the rationales of the rules that checkpatch points out. Surely, we need better documentation to point out how to use checkpatch, what the reasons for certain rules are, and why some simply need to be ignored on certain files. Evaluations and contributions are welcome. > > > > _Very_ few senior developers really care that much about any > > particular comment style. > > I disagree on this. > > > > > These are the same senior developers that would be burdened > > with unnecessary patches to review from those novice developers > > that believe checkpatch should always be followed. > > > > Well for those "novice" developers, the doc tells us to run checkpatch > and address the complaints : > > Are you sure your patch is free of silly mistakes? You should always > run patches through scripts/checkpatch.pl and address the complaints it > comes up with. > > > Anyways it seems this conversation is self serving for the kernel's sr > developers so that they can take any stance convenient to them. > There is no value.