Received: by 2002:a05:7412:361b:b0:f9:2edb:3e4d with SMTP id ie27csp81873rdb; Sun, 17 Dec 2023 15:46:27 -0800 (PST) X-Google-Smtp-Source: AGHT+IF/HUDUBC4UmE8tGS2+YTYdk+FyqFOJE5K2BICV/Ix/JhvfZsw/u8YHcPOTIgyDUjy1RYbG X-Received: by 2002:a17:906:65d8:b0:a19:a19b:4251 with SMTP id z24-20020a17090665d800b00a19a19b4251mr4178649ejn.188.1702856787215; Sun, 17 Dec 2023 15:46:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702856787; cv=none; d=google.com; s=arc-20160816; b=bR7L7sAmPjiB+pN0CM5W8e+/qubShdra12BfibyskGq+nLPWgZrgiKh0qctlowX40M hnnRXgktk/N5Pb4FZdwmgNpDI9Ppl8IYlpRg2P1fzcrmRDADLGBQQ8fkAAwfRpZ5ZLxO EwhCmxnA+xXJHgnIMi2pq+9lJSYtCVDF2BQOdhbxEsYyZ+3LEGOD0RQ8fEiB/Km+KI0L kuUMNk7/psQL+kjnS1Sl48vcqrbLKI/vbxY6xP4EG0Busr85uwiKUB7V1Em9+tmcNmCn M8wcLmSgZbod8liaYmzYdWMtHZ+gjU/is1JzNcmcm+fvacwqDeh1zs1pTtG826nPWuFH bA8Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=message-id:subject:cc:to:from:date:content-transfer-encoding :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :dkim-signature; bh=xCZv+lWfpeR7KaI40CPi86/E7ZQvysvexSS0IzUN2CE=; fh=Px1atfQ1Wk9JlSg8ai5DcxFcVCrMbOnyzcF1Q9IHULg=; b=ia49z8OL71QlZjSKKtY5hJfa1Vra/snlWjIIjvdJEnSURT2EQT5LDuS3Ipqu4hgyOP OSb35PZFMKa0fbUhex9JABvM8QHqAQ1LuoAawzNgHsLcKUsMWiy3a2wEg9wO9gSQVAnR iaSo6qvBN3xQZFutJmZ0427tQ06gEqmNXHPoUFKsu8rawnUz8+8hKiK4NLtV9URk891M D/C7PpDD0Zc5UJwfeL8mxtubsymEOp+xJ15+uzSQ05xbPhDFonv9nGIcs0Uk1J8Ki/FO /tIzGo75nVV7LEGI4Bgy+lLC9BWbdAVL8OXVRBnys4CROgLpJoUT8Z8hy8UuRsEDJQ3c S1HA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@posteo.net header.s=2017 header.b=ZyGWsNXM; spf=pass (google.com: domain of linux-kernel+bounces-2869-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-2869-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=posteo.net Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id l26-20020a170906231a00b00a2357ba57c2si437955eja.102.2023.12.17.15.46.27 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 17 Dec 2023 15:46:27 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-2869-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@posteo.net header.s=2017 header.b=ZyGWsNXM; spf=pass (google.com: domain of linux-kernel+bounces-2869-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-2869-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=posteo.net Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id EE3031F21841 for ; Sun, 17 Dec 2023 23:46:26 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 95F344B130; Sun, 17 Dec 2023 23:46:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=posteo.net header.i=@posteo.net header.b="ZyGWsNXM" X-Original-To: linux-kernel@vger.kernel.org Received: from mout02.posteo.de (mout02.posteo.de [185.67.36.66]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 293BF4B123 for ; Sun, 17 Dec 2023 23:46:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=posteo.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=posteo.net Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id CDA75240101 for ; Mon, 18 Dec 2023 00:46:07 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1702856767; bh=B7Ta4BYxySDCYAL3BF4XbGL4luNo1llUkloFHtXOoVs=; h=MIME-Version:Content-Transfer-Encoding:Date:From:To:Cc:Subject: Message-ID:From; b=ZyGWsNXMb73ZimzRWC8KpTrQ+30HjjWda/KoDSvKsOQEGCrzdKlLy5m7hW7/8Tm7f MBtzND3hwMPUo+WkceoPHGyQoN1hiI3OM8rjKoOLaCPVQDQhfM55aMqfX42CcXzKeF OgpEDPsx9A4u1qlBgBvvCT/vGvvni3yZg1GNH7kq3J6n+pPYlMaQan3c9+xa4uqryP Kpszl1xMWdPbLmrYfINnc22GmYGpAAQLI7BSFZbR9rzue0vEgQ9oYw4olBYKT9zZpC KCyZI4jh+FTKNsT509UY0WmVCeR0NtpyCpRv74lZVXv2nFIKIhI0J3d0VTzCxcm7+q F5kwgKsavWURQ== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4StfjW0LjSz9rxF; Mon, 18 Dec 2023 00:46:06 +0100 (CET) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Sun, 17 Dec 2023 23:46:06 +0000 From: Yueh-Shun Li To: Jonathan Corbet Cc: linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Irrelevant documentation recommending the use of "include/linux/kernel.h" Message-ID: Dear Maintainer, The section "18) Don't re-invent the kernel macros" in "Linux kernel coding style" (Documentation/process/coding-style.rst) recommends re-using the macros defined in "include/linux/kernel.h" instead of the improvised ones locally. However, There's a note in the comment block added by commit 40cbf09f060c ("kernel.h: include a note to discourage people from including it in headers") two years ago, saying that there's an in-progress splitting of kernel.h and inclusion in headers under include/ is discouraged. Considering that the section was added 17 years ago by commit 58637ec90b7c ("Add a new section to CodingStyle, promoting include/linux/kernel.h"), the section about kernel.h in the "Linux kernel coding style" documentation seems outdated. Reproduction steps: ```sh # cd to the kernel source tree cd path/to/source/linux # Show the git blame of the documentation section added in 2006 git blame -L 1051,1071 Documentation/process/coding-style.rst # Show the comment note on top of include/linux/kernel.h added in 2022 git blame -L 2,10 include/linux/kernel.h ``` Should we change ``` The header file include/linux/kernel.h ``` to something like ``` The header files under the include/linux/ directory ``` or a specific header that contains standalone helper macros? It might be out of scope here, but such a header that collects standalone helping macros seems non-existent so far. It would be great to have one that contains things like "STRINGIFY", "CONCATENATE" (or "PASTE"), "UNIQUE_ID" and other helper macros without external dependencies. There's one called "include/linux/util_macros.h", but it depends on "include/linux/math.h". It's the first time for me to report an issue in LKML. Please kindly point out anything that I should fix or could improve. Best regards, Shamrock