Received: by 2002:a05:6a10:eb17:0:0:0:0 with SMTP id hx23csp1157137pxb; Sat, 4 Sep 2021 01:45:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzVdpZtFWgvgqp6whEo7VUqfh+QtgsrCn8lA4TsGLfPfU2gL9+uinNAMLsEQ6ySvVw70HfN X-Received: by 2002:a05:6e02:f08:: with SMTP id x8mr2026186ilj.92.1630745152549; Sat, 04 Sep 2021 01:45:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1630745152; cv=none; d=google.com; s=arc-20160816; b=dhpvBHUVye3/aYmj/CiGcypXPh8IlyNMz/7vYh4AEy9dViPPnizmyBe2V+tdZACa1D 8mjXXIdRyLLSWQ8j2m7eKFPMPAeK3gYxVuafOtiy/bWLkPwNUr+wbwT724oYoTRDRW2t RfrpPjYS5CiCyQcv6f28JRdnqSVyGkEBkjvu38M49iVJgf36JNc4n60XGqQUdTbdYQyR 5PrVLZiRvdrnF6Tolkfg8FnYY45/RGEBOKPJB1afv+SHY+gThMZQObVNIS3op7hety5T 4TKc7GHPH+sN+iiMl6ZtNGB6ZF6ydZZwlI9m71nSd+awkIHBxEGLw2tdW6DdjVVNqkoM MbWg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=EdPM9OkvNtaA6JmcGv7qKKN0+VaFm3GfDoaj2YCcIDg=; b=iAefyuInnOyXDVdnPvSFPTpKx1Obfjcg3MHuv+XAea2uUGddFxI87C/8nxGvyuhlBh CXdJQiigy+qCGHSIORNAvif6ozKl+ad/k//RzdP0LGpP9f0wicwVchtZJi7Y2JKBHsNL uEyFoCt7HZ1fZZi5dqMEBkz7KssXsbPXM1zf6PDUrG7yKdcxYYZmqeqcPTNhk0LrLGij CJOnMZNFzD8mety1DW6ki6Jg09GgakOwOqgUSRCiIwhC2PKnN686RUyPgDGUSS3+8sHe aR1miAUZs3I2sxKcBkgBOCbNpUTLWPkiJFtTE2BUNWjwk8D68/q2OV2PcjzgLlEIsQeQ ki7A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=j5OTxawl; 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 b97si1862389jai.49.2021.09.04.01.45.28; Sat, 04 Sep 2021 01:45:52 -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=20210112 header.b=j5OTxawl; 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 S234550AbhIDIZB (ORCPT + 99 others); Sat, 4 Sep 2021 04:25:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53694 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233631AbhIDIY5 (ORCPT ); Sat, 4 Sep 2021 04:24:57 -0400 Received: from mail-pl1-x62a.google.com (mail-pl1-x62a.google.com [IPv6:2607:f8b0:4864:20::62a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A39A4C061575; Sat, 4 Sep 2021 01:23:56 -0700 (PDT) Received: by mail-pl1-x62a.google.com with SMTP id q3so911327plx.4; Sat, 04 Sep 2021 01:23:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=EdPM9OkvNtaA6JmcGv7qKKN0+VaFm3GfDoaj2YCcIDg=; b=j5OTxawlS1akez9Dq295CULgeV4Bul2jYcQB7efxgLDT1BKJ2cS/7dclXPqGer3Odz Uwk85+fxEGbLwRT7dj5ZCwTKEt5dFxRcmvK6lpjqlV6t1GLe8zW2bnrlojqPtMSdYbmN NL8R7uAyHozMmYyOebHPED20mG2WALvQP52w9/CIaymApbf9lMWJoM1z+WiJu6lTOVlC vzv4SYsqVubyOoftJiNuZMcbYFbTJM1RloYdnu+7j26eu3smcQ/fd7uEwdhDOTViVFfT 5A1bHDyKzcxdHMUIQgezxhbYqiKj89qFN+YFl5pR/knx+oD+sEOxNaV9mOinuv5OkFFE 4n6w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=EdPM9OkvNtaA6JmcGv7qKKN0+VaFm3GfDoaj2YCcIDg=; b=mzG97JGaHeNvRvmcBA9wN7qluTZMM9k4uAb2RXsGCYB9KfOnACBMcqfE5Sm3o8JWaV RXqYcFyaAVbVKiHdRzz3rVDqiuwUw7IYRm7Fy0B/x9nHGzKvvEt196h2kB0LcRjiLJzC Ul7Hzx7TBd0EFeYpe+hBlBPx1y65SFRi+/VofFBjFPumcYcsbmIcFL704lFICsUUqxRd Di4Y1LjEmc43/0+tAEXxYH1xSGy+/B71ck80vvFAQt4G2a0zxv8DHVk682pdHMHEVmuh uCkyoFkju/MWD//DaBqoEsh6NO9BriPMtetN8mfpwyeYYbBW5XbLstnQsqXRt89q/6/9 nSXg== X-Gm-Message-State: AOAM533YqKL2RWLco7NQb9jQoyEEl6uruDybc5JHuBw4fu26OKzSkcRk IVmZj70IShvhm409UF34Lspo81hbPJ2/XeYS X-Received: by 2002:a17:90b:188f:: with SMTP id mn15mr3143916pjb.154.1630743835956; Sat, 04 Sep 2021 01:23:55 -0700 (PDT) Received: from localhost.localdomain ([2405:201:6006:a148:82a8:3271:93dc:763c]) by smtp.googlemail.com with ESMTPSA id o1sm1522099pjk.1.2021.09.04.01.23.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 04 Sep 2021 01:23:55 -0700 (PDT) From: Utkarsh Verma To: Dwaipayan Ray Cc: Lukas Bulwahn , Joe Perches , Jonathan Corbet , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, Utkarsh Verma Subject: [PATCH v2] Documentation: checkpatch: Add SYMBOLIC_PERMS message Date: Sat, 4 Sep 2021 13:53:30 +0530 Message-Id: <20210904082330.14864-1-utkarshverma294@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add a new message type SYMBOLIC_PERMS under the 'Permissions' subsection. Octal permission bits are easier to read and understand instead of their symbolic macro names. Suggested-by: Lukas Bulwahn Signed-off-by: Utkarsh Verma Acked-by: Lukas Bulwahn Reviewed-by: Lukas Bulwahn --- Documentation/dev-tools/checkpatch.rst | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/Documentation/dev-tools/checkpatch.rst b/Documentation/dev-tools/checkpatch.rst index f0956e9ea2d8..41037594ec24 100644 --- a/Documentation/dev-tools/checkpatch.rst +++ b/Documentation/dev-tools/checkpatch.rst @@ -957,6 +957,17 @@ Permissions Permission bits should use 4 digit octal permissions (like 0700 or 0444). Avoid using any other base like decimal. + **SYMBOLIC_PERMS** + Permission bits in the octal form are more readable and easier to + understand than their symbolic counterparts because many command-line + tools use this notation only. Experienced kernel developers have been using + this traditional Unix permission bits for decades and so they find it + easier to understand the octal notation than the symbolic macros. + For example, it is harder to read S_IWUSR|S_IRUGO than 0644, which + obscures the developer's intent rather than clarifying it. + + See: https://lore.kernel.org/lkml/CA+55aFw5v23T-zvDZp-MmD_EYxF8WbafwwB59934FV7g21uMGQ@mail.gmail.com/ + Spacing and Brackets -------------------- -- 2.25.1