Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp750842pxj; Thu, 20 May 2021 21:52:05 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwWvAy089lkK3HbPDzExgMHFtcj6eLaZKYdUEMYpPlfQ5/6onff+u4KjsLzOKg+2qwhYwUv X-Received: by 2002:a92:dd04:: with SMTP id n4mr9815649ilm.165.1621572725373; Thu, 20 May 2021 21:52:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621572725; cv=none; d=google.com; s=arc-20160816; b=k8HxVNk0ZJvL/k4sg9Yxg0x2sq8acHCsxWzhLkByOLoNZz8pJ89bQiDR/Tig6Pa8Be qfs1R9zbP6QbHzJ7q7HuTz1KnoqJQdmktUOwcxN0el7pHc82a7LOJ9P8GA5UaOwnnCCP gVXNZmeBTTnqGUAICqR3Tsna/D3PyirjZ2om0mrNiIFt/9D9lmle6rzF6VILvdTawcZX A9cjqoIR5/ws2f2qvyi6dlFjxrbA+qs8jFkbpVu4lrVckBMip2TK64yTSG0TO0+hN9PY CyqWjqLJf/44xplQPc57qs5f+PH7Out3BXpM57cs1GvzIKr3Vy0ZRj+avERfUk7OT5QG uC3g== 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=Bfs5XG6Orq6hCirwXDv5eFA3LNXHAM5IFwkddiPAs8g=; b=P12zP6LE144GfcWG2057F+QQZsUFBugKEwHssz+8kCU7RFnsJPIxYv2Uvc/SKqvUV6 O2rpbwad1K+68FerayF2GneD7bFxHaR8VWZQUsU67jtUA0LBwERVlm/6XORqrNKg2PE9 mdulgGXIrgykmR6BfgLVI83d2w75vxW4bg8EjA+PJT8jc7SdKcS++/vHZspRyM/Of8i4 GRVzqALLQzPFcyr6Itf5Z2UN4n87xvZEEmPLwKcVX72YwD0TvraxVetBJuBe90T65RNd HodVn7K22+El3a4V58VnOzkSRMsDbIgikDQmpmjU21ty5zsCb3plMuejWjlwnRj/pc6a iH8g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=azrOQ06X; 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 f14si4251694ilj.120.2021.05.20.21.51.52; Thu, 20 May 2021 21:52:05 -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=azrOQ06X; 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 S232099AbhETNLC (ORCPT + 99 others); Thu, 20 May 2021 09:11:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36656 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243596AbhETNJV (ORCPT ); Thu, 20 May 2021 09:09:21 -0400 Received: from mail-lf1-x12a.google.com (mail-lf1-x12a.google.com [IPv6:2a00:1450:4864:20::12a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 00E03C06138B for ; Thu, 20 May 2021 06:02:49 -0700 (PDT) Received: by mail-lf1-x12a.google.com with SMTP id v8so19400913lft.8 for ; Thu, 20 May 2021 06:02:49 -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=Bfs5XG6Orq6hCirwXDv5eFA3LNXHAM5IFwkddiPAs8g=; b=azrOQ06XjZ71pGUijwdHkI0wPGcXQCx8uLOHPB0jJ5DQPHGwNnvIZmLywTL526K44i 8LypOQWJQUb9bOTa4omd9etXsoHDTXJzKeYjYpAasxEg86sRunHOYGnVbSiZ9jOCoi8I vjsi7+TOsqS5+aMYLrQc3Gx5/lqQyPhj5rMLRqAiOje6AS0xvSLObTD2vi4EmrxY6i2l MIdmiBz0ve2nex6CjdjPuSIG77/Rhb5ajQ8apbKMoWwHQIBCA5VnRFhKmUw1hkAnLL6q D6+yUWnGfxbX2Cpg7wSAdm6vDv/ZR8js6nX53/Ht92//fEiU7y4jyqb+PglSJYOEXGhs z12g== 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=Bfs5XG6Orq6hCirwXDv5eFA3LNXHAM5IFwkddiPAs8g=; b=muwqsR3v7PLqHlXddLEa93UqKck9IVApsd4MDW1ZPOuJKiPyZhd34Z1lNbG6wJJWtX 1+T/bEO48LvUlk7NNVXCpIM/KM6+DSc+Pw9/rWMlbscNHgFF3y91CYTob0tREil2S5C5 lplvhlZWzeYZd3eyoLqBuPXI3dllDq9ic4tSH1TFRGSXXVVitsmwXFSriY3P6AB0/cSJ r9QtUG6Ss8KQSZACmr9qBc/egQKAopj96r0Vr2V2Zp43ixI4jreJhkMyXVCK/rIRC8vl SRDDUrRreFxPuEhInBnV/RRplcB5WqWUdfIYGUEPRQGuN4cdq88rgwYMGwjCUYrMfc5y gn+w== X-Gm-Message-State: AOAM5303NESUppAWqdHefP6c7ot9r8mDpmafdxRUhBM16xvRxz9VSpom Xvc54WoMT5/6gN9sbHHVek8CYfV5MQpU70X+Ag8yFFY/Z8FeD32G X-Received: by 2002:ac2:4ed9:: with SMTP id p25mr3240375lfr.576.1621515767913; Thu, 20 May 2021 06:02:47 -0700 (PDT) MIME-Version: 1.0 References: <20210520015704.489737-1-andrew@aj.id.au> <72ed5aa8-bca5-451d-9458-48735fc17b84@www.fastmail.com> In-Reply-To: From: Dwaipayan Ray Date: Thu, 20 May 2021 18:32:36 +0530 Message-ID: Subject: Re: [PATCH] Documentation: checkpatch: Tweak BIT() macro include To: Lukas Bulwahn Cc: Andrew Jeffery , Joe Perches , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, May 20, 2021 at 5:36 PM Lukas Bulwahn wrote: > > On Thu, May 20, 2021 at 12:21 PM Dwaipayan Ray wrote: > > > > On Thu, May 20, 2021 at 3:15 PM Andrew Jeffery wrote: > > > > > > > > > > > > On Thu, 20 May 2021, at 18:47, Dwaipayan Ray wrote: > > > > On Thu, May 20, 2021 at 12:55 PM Andrew Jeffery wrote: > > > > > > > > > > > > > > > > > > > > On Thu, 20 May 2021, at 16:28, Lukas Bulwahn wrote: > > > > > > On Thu, May 20, 2021 at 3:57 AM Andrew Jeffery wrote: > > > > > > > > > > > > > > While include/linux/bitops.h brings in the BIT() macro, it was moved to > > > > > > > include/linux/bits.h in [1]. Since [1] BIT() has moved again into > > > > > > > include/vdso/bits.h via [2]. > > > > > > > > > > > > > > I think the move to the vDSO header can be considered a implementation > > > > > > > detail, so for now update the checkpatch documentation to recommend use > > > > > > > of include/linux/bits.h. > > > > > > > > > > > > > > [1] commit 8bd9cb51daac ("locking/atomics, asm-generic: Move some macros from to a new file") > > > > > > > [2] commit 3945ff37d2f4 ("linux/bits.h: Extract common header for vDSO") > > > > > > > > > > > > > > Cc: Jiri Slaby > > > > > > > Signed-off-by: Andrew Jeffery > > > > > > > > > > > > Looks sound to me. > > > > > > > > > > > > I would prefer a bit of word-smithing the commit message by just > > > > > > removing the references: > > > > > > > > > > > > So: > > > > > > > > > > > > > While include/linux/bitops.h brings in the BIT() macro, it was moved to > > > > > > > include/linux/bits.h in commit 8bd9cb51daac ("locking/atomics, asm-generic: Move some macros from to a new file"). Since that commit, BIT() has moved again into > > > > > > > include/vdso/bits.h via commit 3945ff37d2f4 ("linux/bits.h: Extract common header for vDSO"). > > > > > > > > > > > > > > I think the move to the vDSO header can be considered a implementation > > > > > > > detail, so for now update the checkpatch documentation to recommend use > > > > > > > of include/linux/bits.h. > > > > > > > > > > > > > > > > > > > And then drop references [1] and [2]. > > > > > > > > > > > > Andrew, what do you think? > > > > > > > > > > I mostly did this because initially I wrapped the commit message and > > > > > checkpatch spat out errors when it failed to properly identify the > > > > > commit description for [1]. But, leaving the description unwrapped > > > > > inline in the text feels untidy as it's just a work-around to dodge a > > > > > shortcoming of checkpatch. > > > > > > > > > > With the reference style the long line moves out of the way and > > > > > checkpatch can identify the commit descriptions, at the expense of > > > > > complaints about line length instead. But the line length issue was > > > > > only a warning and so didn't seem quite so critical. > > > > > > > > > > While the referencing style is terse I felt it was a reasonable > > > > > compromise that didn't involve fixing checkpatch to fix the checkpatch > > > > > documentation :/ > > > > > > > > > > > > > Hey, > > > > Can you share which wrap around caused the checkpatch errors > > > > to be emitted? We can try to fix that. > > > > > > > > I was able to wrap it without checkpatch complaining. You might consider > > > > replacing it with this if you wish? > > > > > > > > While include/linux/bitops.h brings in the BIT() macro, it was moved to > > > > include/linux/bits.h in commit 8bd9cb51daac ("locking/atomics, asm-generic: > > > > Move some macros from to a new file"). > > > > > > This wording works because the commit description is only split across > > > two lines. With the wording I had it was split across three, and this > > > caused checkpatch to barf. If we do this: > > > > > > > Yes it won't work for 3 lines. We are checking only for an additional line > > for split commit descriptions. Might be a thing to improve in the future. > > > > Dwaipayan, you certainly got my go to improve checkpatch for this > issue. You might want to re-run our known checkpatch evaluation and > see how often this issue for commit references with multiple lines > appears. > > Looking forward to your patch, Sure I will try something. Last time I ran checkpatch over 50k commits from v5.4 there were 1032 instances of the error "GIT_COMMIT_ID: Please use git commit description style 'commit <12+ chars of sha1>". Ref: https://raydwaipayan.github.io/blogs/checkpatch_out_50k.txt (42MB dump) But now it's hard to tell how many are due to warping into > 2 lines. A majority of these seem to be actual errors. (Through random sampling :)). But unless we extract the commit messages themselves it's hard to tell. Might be a very insignificant number or might be considerable as well. Does Joe have any suggestions for this? Thanks, Dwaipayan.