Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp4569423rwi; Sat, 22 Oct 2022 12:15:13 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6mkSJrlC3KapiKpgbQ1sgVJK5uCWKH5ZQOzgTKpmXutR7jbtbzU8YEovsB08zkbWaFL9H/ X-Received: by 2002:a05:6402:3509:b0:45d:c25b:b80e with SMTP id b9-20020a056402350900b0045dc25bb80emr23457004edd.250.1666466112737; Sat, 22 Oct 2022 12:15:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666466112; cv=none; d=google.com; s=arc-20160816; b=cApSlRvvXXbY8yVUKqHIpzYwpedD2IHb+4T/Aa24rYiO/+0YyzN7BIOC4L4zb3+utA WO88vekzQ4mr9+0NcuLuDBJJNyXQnQbgXSQglqQs/Fiw+RAiekEznrOvE5pJVVNTF51E Gpa67UV7iMptw5sRWyWH0TW27a6r3+acx37ctTuN2cMoPTDPzf7wXd2pFAFz8yLtatL4 pRy3oq1zdpUQaa3UJWZfIe0Pwb65/QeB3fhZI/tZ6XGUywQwrCxp3t22CLjTgc6x/wsA GJ0rl2DNft1mCobNAujQiu+v8imSG2UsM9G7O53OMHz4zZgIDdPLtBWtMWoUKjAYGI5x t2tw== 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=vVoS3S/7CUh5pjxopjidPBDyCAeTY2XtCZTShr1zcl8=; b=fSwr5xbQfeldK19+mj/NzqEX/g8OtkguxZV/aeh+DaaxSGvjHN9n8UA4/0mp4h6944 qKMvvyBDmSCcKnVM3ADhfJuHL9/26IzKmPdjM7aCfXGXhaeysTOL8EaW79M9n+ActKnS uKJc3YRUOXX1pDf9j7n80bhL9YTTUpWAaEmUOsNmR9cOvTwLs+uZrjsxWFb7e5U+CK8F CfZRy2l5RYA1iWCgk4IqRUQb8gtIV3rPYQDCgEux6iw32Ij39GvXVeKDW1XsbdL+unbV Bz3BlnjinLmTT1U+FLN59Yipb/iOCzlV3g7zKwL0kK5UWOSZdkF6ioSmbZKxVS+KD58e BLfw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b="Q+HGY7/e"; 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 r3-20020a50c003000000b0045d4f99616dsi3025537edb.456.2022.10.22.12.14.47; Sat, 22 Oct 2022 12:15:12 -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; dkim=pass header.i=@linux-foundation.org header.s=google header.b="Q+HGY7/e"; 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 S229765AbiJVSdb (ORCPT + 99 others); Sat, 22 Oct 2022 14:33:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55846 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229583AbiJVSda (ORCPT ); Sat, 22 Oct 2022 14:33:30 -0400 Received: from mail-qt1-x82d.google.com (mail-qt1-x82d.google.com [IPv6:2607:f8b0:4864:20::82d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0E04572EEA for ; Sat, 22 Oct 2022 11:33:29 -0700 (PDT) Received: by mail-qt1-x82d.google.com with SMTP id a24so3542371qto.10 for ; Sat, 22 Oct 2022 11:33:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=vVoS3S/7CUh5pjxopjidPBDyCAeTY2XtCZTShr1zcl8=; b=Q+HGY7/ezyEpQk+uUr6pprYSEijGjmxmFdifdlg+jNeH8hkQeWUZPPogS3g7Y6jZRA SHgU3XT19a0UpRVoH1XqvERrJ5cEGEwi0L+K6HBqT7ILX3bS+xrH6CdTrYglRZUI3pNH QCYY0aofz8FBbAbyLI7KhuSW9VVrVDY82+hOw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=vVoS3S/7CUh5pjxopjidPBDyCAeTY2XtCZTShr1zcl8=; b=erXxBs1Sy4sbppv1GS3NrW7mTZy5ZJ02b78hwGc4fPVTMlsOF8PkyWe9FxlEKwLDQH mNxles0LSDpOtStjgp7hSdba7y+kLO5j+aHWpR4So/1uIt8JQyOZxbt6ZygBP9aigq7S qBaD7wvggifL3EjuBeL8CMp1k6BJlVWAKpmpNTTI89KQAPnvUy+RWGYtaZ/HwhakIUvE rRTM8smVzosRbQtR9kPyfmIrJqGTEElnsXICPZay60bSRgqZBdy2WODfusNeDDSg68u0 64XYT6GFBTVLQp1LhX/QZ2PzXQ+477TiApJPpKA/qttNLt2j2pfal7KlqR3/OcVuNV0L O7bg== X-Gm-Message-State: ACrzQf1DqAS2fBD2xyj4ZK91of93a1+utZcH6BkNddxqsW4UIL5oWfg/ y1+9aN9pxTjNvaiopN+21MkO+FXpjba/GA== X-Received: by 2002:ac8:7f16:0:b0:39d:a58:5484 with SMTP id f22-20020ac87f16000000b0039d0a585484mr13540648qtk.381.1666463607521; Sat, 22 Oct 2022 11:33:27 -0700 (PDT) Received: from mail-yb1-f172.google.com (mail-yb1-f172.google.com. [209.85.219.172]) by smtp.gmail.com with ESMTPSA id q21-20020a37f715000000b006cebda00630sm11756755qkj.60.2022.10.22.11.33.26 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 22 Oct 2022 11:33:27 -0700 (PDT) Received: by mail-yb1-f172.google.com with SMTP id r3so6865575yba.5 for ; Sat, 22 Oct 2022 11:33:26 -0700 (PDT) X-Received: by 2002:a05:6902:124f:b0:66e:e3da:487e with SMTP id t15-20020a056902124f00b0066ee3da487emr23440145ybu.310.1666463606564; Sat, 22 Oct 2022 11:33:26 -0700 (PDT) MIME-Version: 1.0 References: <20221021191507.9026-1-antonio.borneo@foss.st.com> In-Reply-To: From: Linus Torvalds Date: Sat, 22 Oct 2022 11:33:10 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] checkpatch: handle utf8 while computing length of commit msg lines To: Joe Perches Cc: Antonio Borneo , Andy Whitcroft , Dwaipayan Ray , Lukas Bulwahn , linux-kernel@vger.kernel.org, Andrew Morton Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 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 Fri, Oct 21, 2022 at 10:48 PM Joe Perches wrote: > > On Fri, 2022-10-21 at 21:15 +0200, Antonio Borneo wrote: > > > > Actually it's not fully clear to me if utf8 characters in the > > commit msg are acceptable/tolerated or to be avoided. utf8 is not just acceptable, but actively encouraged in commit messages. Not *grtatuitous* use (please - no emojis) but there is absolutely nothing wrong when using utf8 when appropriate. And getting people's names right is not just appropriate, but actually important. And depending on where in the world you are from, utf8 is absolutely required, and no, we don't do Latin1 for that subset of the world (any more - we have a dark history of Latin1 in some corners). That said, I'm not convinced the whole line length check really matters, or is even appropriate. A lot of commit messages absolutely should have long lines, regardless of any UTF8 issues. Just as a recent example, see commit 71e2d666ef85 ("mm/huge_memory: do not clobber swp_entry_t during THP split"), which has a 200+ character line, and that's *exactly* what it should have. Splitting that line would be actively wrong. The same often goes for things like quoted compiler warnings etc. I personally can't think of a case where we've actually had issues wrt "line length in bytes vs line length in characters". And I'm not convinced the length check is appropriate in the first place. The only line that really shouldn't be overly long is the _first_ line of the commit message, because that tends to be a "somebody write a whole paragraph in line-wrapped mode". And the first line of the commit message really is special, and should not just be of a reasonable length (although75 chars may be too restrictive), but should have an empty line after it. I didn't look into what the checkpatch.pl script does around that code, maybe that's what it already does. Linus