From mboxrd@z Thu Jan 1 00:00:00 1970 From: Claude Code Review Bot To: dri-devel-reviews@example.com Subject: Claude review: Re: [PATCH 01/61] Coccinelle: Prefer IS_ERR_OR_NULL over manual NULL check Date: Thu, 12 Mar 2026 07:27:17 +1000 Message-ID: In-Reply-To: <924acf71-45df-4ea2-9bbd-b6f5ff262b2b@web.de> References: <924acf71-45df-4ea2-9bbd-b6f5ff262b2b@web.de> X-Mailer: Claude Code Patch Reviewer Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit MIME-Version: 1.0 Patch Review The Coccinelle script is well-structured with separate rules for simple cases (`p1`), WARN_ON cases (`p2`), larger expressions (`p3`), assignment-in-condition (`p4`), and `likely`/`unlikely` removal (`p5`). **Issue - Typo in comment:** ``` +/// Use IF_ERR_OR_NULL() instead of IS_ERR() plus a check for (not) NULL ``` Should be `IS_ERR_OR_NULL`, not `IF_ERR_OR_NULL`. **Issue - Typo in notes:** "cottect" should be "correct": ``` drivers/clocksource/mips-gic-timer.c:283 looks suspicious: ret != clk, but Daniel Lezcano verified it as cottect. ``` **Issue - Rule `p2` semantic concern:** The WARN_ON transformation rule is too aggressive. Converting `!ptr || WARN_ON(IS_ERR(ptr))` to `WARN_ON(IS_ERR_OR_NULL(ptr))` changes behavior: previously NULL was silently handled, now it triggers a WARN splat. The script should flag these as manual review cases rather than auto-patching them. --- Generated by Claude Code Patch Reviewer