From patchwork Fri May 1 11:00:15 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 2265 Return-Path: X-Original-To: u-boot-concept@u-boot.org Delivered-To: u-boot-concept@u-boot.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1777633328; bh=bfZi/eV3WRLATwRUkjDkgnvUCEVy4n7lTFtAxFCucn0=; h=From:To:Date:In-Reply-To:References:CC:Subject:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=mz7CXDXCoqzaUHwhJ/UMkPQDF0UpqbYk+0At9Dgh8HieHue543FoNr+5vJyzkk51D DfHOMDSNYVy+cQ8/5rv3bnVkZ0ibLAdcBdIkqhngoH8ll+L7wQorFavBOnbxa2R4dD 6AQGg7Aj5qASzaMTkNrHi08hZFTxnRHneCOuB8AY= Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 6B0006A82E for ; Fri, 1 May 2026 05:02:08 -0600 (MDT) X-Virus-Scanned: Debian amavis at Received: from mail.u-boot.org ([127.0.0.1]) by localhost (mail.u-boot.org [127.0.0.1]) (amavis, port 10024) with ESMTP id Oj_nGlIxJaT3 for ; Fri, 1 May 2026 05:02:08 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1777633328; bh=bfZi/eV3WRLATwRUkjDkgnvUCEVy4n7lTFtAxFCucn0=; h=From:To:Date:In-Reply-To:References:CC:Subject:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=mz7CXDXCoqzaUHwhJ/UMkPQDF0UpqbYk+0At9Dgh8HieHue543FoNr+5vJyzkk51D DfHOMDSNYVy+cQ8/5rv3bnVkZ0ibLAdcBdIkqhngoH8ll+L7wQorFavBOnbxa2R4dD 6AQGg7Aj5qASzaMTkNrHi08hZFTxnRHneCOuB8AY= Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 542C66A833 for ; Fri, 1 May 2026 05:02:08 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1777633326; bh=BH+OvojW/OMbFSHOrAca/fO+laq7fqZYMljbli3t30U=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=l7jlgFImFb9Ys72W5fs4Tb/JnDxoBTk7aWf+bYOYJyhbhykQ4zDb1HFpblnL6c0B9 HOzbKMpPyfkq13dDJJeNdfNQeBIGrLGcHetm+UbHyxlxgieroHph3W0gS9jYlSslZh bAwDBQcJ0rBNteQzmy+shnvUSpRmJviBnqV9O+wY= Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id AD1D26A82E; Fri, 1 May 2026 05:02:06 -0600 (MDT) X-Virus-Scanned: Debian amavis at Received: from mail.u-boot.org ([127.0.0.1]) by localhost (mail.u-boot.org [127.0.0.1]) (amavis, port 10026) with ESMTP id dSLced-Jw6Nv; Fri, 1 May 2026 05:02:06 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1777633324; bh=9aNcfs393rxSil1Bkn8x4F1yDpv/gkkMhXSA4vIepaw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Imak5sMMhlAZ1UQXtdVrsa0OBAP9ePi5sfdgFl3L7RSpRPo0u0io6YV9je77HnIfC wG0YXf9y8jTaC4bzhLAB+S48RF98LKfvPzGQI8+nWQDxajtblTaGkJJaTDwG21PXKa 7/gWTpQnPNN0rLi6sODoezn5s/uf+CmpSWRSVtGw= Received: from u-boot.org (unknown [174.51.25.52]) by mail.u-boot.org (Postfix) with ESMTPSA id 40BA06A850; Fri, 1 May 2026 05:02:04 -0600 (MDT) From: Simon Glass To: U-Boot Concept Date: Fri, 1 May 2026 05:00:15 -0600 Message-ID: <20260501110040.1874719-24-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260501110040.1874719-1-sjg@u-boot.org> References: <20260501110040.1874719-1-sjg@u-boot.org> MIME-Version: 1.0 Message-ID-Hash: ECGGZGMG2U4M43DFBQZWJPW4KH6UPOWQ X-Message-ID-Hash: ECGGZGMG2U4M43DFBQZWJPW4KH6UPOWQ X-MailFrom: sjg@u-boot.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Simon Glass X-Mailman-Version: 3.3.10 Precedence: list Subject: [Concept] [PATCH 23/29] patman: Force diff headers in every review comment List-Id: Discussion and patches related to U-Boot Concept Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: Simon Glass The review agent sometimes omits the 'diff --git' and '@@' header lines from each COMMENT block, quoting only the code being commented on. Without the headers the reader cannot tell which file the comment refers to. Strengthen the rule with explicit BAD and GOOD examples, and a note that the headers must be copied verbatim from 'git show'. Signed-off-by: Simon Glass --- tools/patman/review.py | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) -- 2.43.0 diff --git a/tools/patman/review.py b/tools/patman/review.py index 0508b01e5ec..c173a9938d5 100644 --- a/tools/patman/review.py +++ b/tools/patman/review.py @@ -369,11 +369,25 @@ VERDICT: changes_needed Rules: - Always start with GREETING: (first name or empty) -- Each COMMENT: block MUST include the diff header lines (the - 'diff --git' and '@@' lines) before the quoted code, so the file - and line number are clear -- Each COMMENT: block starts with quoted diff lines (using '> ' prefix), - followed by a blank line, then your comment text +- Each COMMENT: block MUST start with the two diff header lines + copied VERBATIM from 'git show {commit_hash}': + > diff --git a/ b/ + > @@ -, +, @@ + then the quoted code lines (with '> ' prefix), then a blank line, + then your comment. This is NOT optional — without the headers, the + reader cannot tell which file or function the comment refers to. + BAD: + COMMENT: + > +#include + + This include is unnecessary. + GOOD: + COMMENT: + > diff --git a/drivers/clk/qcom/clock-ipq5210.c b/drivers/clk/qcom/clock-ipq5210.c + > @@ -0,0 +1,97 @@ + > +#include + + This include is unnecessary. - Quote enough context from the diff to identify the location - Be specific and constructive, but brief — use as few words as possible to make the point. Avoid restating what the code does;