From nobody Sat Feb 7 18:15:47 2026 Received: from mail-pl1-f182.google.com (mail-pl1-f182.google.com [209.85.214.182]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id F2B712D6E7E for ; Tue, 6 Jan 2026 19:09:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.182 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767726558; cv=none; b=dNUw17j7syvCfmKBPDB4NfQ8QF5AUi5PtAgfPiFNtr16Kr4Ts/N7AoYJikKIECdNyjBJxMj6CWgncXjxoCiewvgj98JBLTNpIN8ZUpBWBuF6F7gIm/BmiwozP897eY0Qw23IkgEbrGDF/CT6LrLDcXcmhPI6wz/gvW+8hj0z+i0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767726558; c=relaxed/simple; bh=crmmpgYHpa5RdbN9QfB0hv+JH6CpIsDGdNmwc5APkw8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=RG7FzKkj1iAKuBZzZytRgaXuedVYOlXSuir5XxOy5sbyitF+PPSyl3ctxw6znb4/TsWPFcpDDtWvG+dEJvBcFiej1ItPadponCruv2TwuoAho3ujHslCktOwmTvGh+nHUD55HNoMN3JZGvqbKv8FwB2rtl72noJytwLcXzjm7Ok= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=Tne+Mzm0; arc=none smtp.client-ip=209.85.214.182 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Tne+Mzm0" Received: by mail-pl1-f182.google.com with SMTP id d9443c01a7336-2a0bb2f093aso11940975ad.3 for ; Tue, 06 Jan 2026 11:09:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1767726556; x=1768331356; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=lhwaSoSDcJzaU6emLiSJOWLUcyi9EjvkM7Ru1loqRjM=; b=Tne+Mzm0EcDycWrgVr1vsvjuuCdTRJeUxwp3g66Mq0PzgAmqVZr1VM+4MPsBgYC2VU AYcv4dV4qxwuk60eR4AUwBtOwoIBbO0YYiyvnYk6jBtf1FIh2T2bASZeJ1Qj8+0gdgwJ 0zTOF8fHH2mbeSrkBntc2dPK9T5GqXo8BYu0/TN9fEeqFIYAA0sBOSMb34SF4dSPOMc/ k9clHEoZ+8KO947ECZ8cwujHZU+7zFX/T0+GWkDyK0AM/7eX9rBA7hAQC1a+rjqfsL7l k8ssdXxxwosIBmkzmR2HPkuJU/TWgaRdCV7yo2Va9IJrf3Nko7D6y7fmh/LRIgQtIsCl 5j2w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1767726556; x=1768331356; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=lhwaSoSDcJzaU6emLiSJOWLUcyi9EjvkM7Ru1loqRjM=; b=SrEF6uq9GazLNjPm088ebP6Ow1n30z8a3qXceUxH45JhRHXnD4ongW5ELozuHbShJD 30Hg/SpnwH+0uGIO4zyrgRRTDahfEc4RXeEkU6kaCBdRczcSxgGVTe4NAXVaNTHxkNdp 1PlxmYZTgaDk7VKQdRYjE2QikjROCxPD5UUns6yvYTL7xMCQ7EKaelNY1HqtjmYuy3RZ OqVl1mEoFz6+ggrrwh4KRZmNut66H58RMi5rU7kkqt2zsnZZ2V0NFYNw0Oj7N+oqovsN lO1IFKleM1OGJDtKKAKm4COmDdSA4UQzGLAiV6sVR3jnc4ncGvt+D5fCm+Y44gEXbsnM dkJw== X-Forwarded-Encrypted: i=1; AJvYcCVmxfhj8icbWvpGjWA9ITx/HKOkIfXazNMQ+mnD7NUOszoOtwfD0jFh6emSd2t5nrRNeOtDCdNoAlTegCg=@vger.kernel.org X-Gm-Message-State: AOJu0YylQlbJ/PMia7dPGdyUPLk49lAMAA8kR2d4k3IjSCH+P6PPP/wI rJspqMA9L+h8me85avzJd/IscX/QJ9gQTUb6SsHmI1d9v0ym1OJIAPBO X-Gm-Gg: AY/fxX4Q2itqOQ5Yc31FqfQSlJ6hi+zkLdauQR2sCRGvI+/EmNOD66OEVn/Qg+lh67+ +K3l3bo8UoQSQHdmUaT8tXzV6pr7RobZHzBoYKUBaXdHc/fOQ+qI9JwK07et9yGqTB2YVdBycm3 7oq63j4IHjk6KfKcodBWgG7LTStegk3lecZbjU8hyBMdschXe6aMyDlT9B55Fk9oBPWemswFgo8 +MY3ve++vePze+7CZcvjvXWRNBtPeZYqSaaOjazPq6JhgT5970jVevjxioiGOTtW89bungej7vh X/SmzPkO31FGMimACjTrR9LFj7lVuc6xZtP6hbVeWDmz2GSkocwiJKNpQZLob8jmKJQQix3eUp1 1yf6Ngb2PCTV7BYBAeL2GPegQJHlXDqRAawW9mqOa1SCibTKI+Zpgv8c077NNqpwUz+5JTsmJkL 6slwrBj4pNXMKgPTtNOg== X-Google-Smtp-Source: AGHT+IG/FutjzhU827sNvJPVoR5OnV23bzd0idPEqRV+0+0JnOaD0+CqzPWXI3rmEXY695v5Rtx7sQ== X-Received: by 2002:a17:903:b45:b0:2a0:b62e:e016 with SMTP id d9443c01a7336-2a3e2cfcf9dmr34016045ad.32.1767726556016; Tue, 06 Jan 2026 11:09:16 -0800 (PST) Received: from rivendell ([101.0.62.234]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2a3e3cc78c0sm29380975ad.69.2026.01.06.11.09.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Jan 2026 11:09:15 -0800 (PST) From: Benjamin Philip To: Julia Lawall , Nicolas Palix , Jonathan Corbet Cc: cocci@inria.fr, workflows@vger.kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, Benjamin Philip Subject: [PATCH RESEND 1/3] scripts: coccicheck: simplify debug file handling Date: Wed, 7 Jan 2026 00:38:34 +0530 Message-ID: <20260106190836.36630-2-benjamin.philip495@gmail.com> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260106190836.36630-1-benjamin.philip495@gmail.com> References: <20260106190836.36630-1-benjamin.philip495@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" This commit separates handling unset files and pre-existing files. It also eliminates a duplicated check for unset files in run_cmd_parmap(). Signed-off-by: Benjamin Philip --- scripts/coccicheck | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/scripts/coccicheck b/scripts/coccicheck index 89d591af5f3e..2efb74afef2b 100755 --- a/scripts/coccicheck +++ b/scripts/coccicheck @@ -138,7 +138,7 @@ run_cmd_parmap() { if [ $VERBOSE -ne 0 ] ; then echo "Running ($NPROC in parallel): $@" fi - if [ "$DEBUG_FILE" !=3D "/dev/null" -a "$DEBUG_FILE" !=3D "" ]; then + if [ "$DEBUG_FILE" !=3D "/dev/null" ]; then echo $@>>$DEBUG_FILE $@ 2>>$DEBUG_FILE else @@ -259,13 +259,13 @@ coccinelle () { =20 } =20 -if [ "$DEBUG_FILE" !=3D "/dev/null" -a "$DEBUG_FILE" !=3D "" ]; then - if [ -f $DEBUG_FILE ]; then - echo "Debug file $DEBUG_FILE exists, bailing" - exit - fi -else - DEBUG_FILE=3D"/dev/null" +if [ "$DEBUG_FILE" =3D "" ]; then + DEBUG_FILE=3D"/dev/null" +fi + +if [ -f $DEBUG_FILE ]; then + echo "Debug file $DEBUG_FILE exists, bailing" + exit fi =20 if [ "$COCCI" =3D "" ] ; then --=20 2.52.0 From nobody Sat Feb 7 18:15:47 2026 Received: from mail-pl1-f178.google.com (mail-pl1-f178.google.com [209.85.214.178]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 028A733CE8F for ; Tue, 6 Jan 2026 19:09:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.178 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767726565; cv=none; b=r418UGQPpE30/EIPtyOI/IA0NlZj3YrH9BnYkKeTa1CiVGoyPUaEmtJu3ZsLeYZQRey5GhfrEwCAOyLnwRyluyNF23QcEN4m/+/LJLZD4VCb+c6L268VqT+Eto4BJe1gG9m58bpe8/J0Oaj6xh0Um59bV6lma9CVX/IO6T+41yI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767726565; c=relaxed/simple; bh=RX9qHaUriBcnZk/sTEJF3KSyASsPGsLPByLnwAt8Oac=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=S8lwnveX+vhcOxkgwQv/uTLU+W4U7aHzV3frYApv0D7bPlvdNXTamuufFEVRpGAmyUx2nxEkoXqUGaS0dwDg7gH7EVcc/1EHXKAPetVw0ATT98fUF0af6Lv6TWP+xCvxXFaprvKij4WlQda0FNB7bveSUCKlC3HSRl8nCGUotOQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=IqFHHgEZ; arc=none smtp.client-ip=209.85.214.178 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="IqFHHgEZ" Received: by mail-pl1-f178.google.com with SMTP id d9443c01a7336-29efd139227so14123485ad.1 for ; Tue, 06 Jan 2026 11:09:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1767726563; x=1768331363; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=BATdJWgJUwnMbHLsMBqXXAerZpaNwXBAjVbJPcNyAvU=; b=IqFHHgEZFNpnSvJV7KojPs4eDuqArBFg+N296nq7PoPo6wSKe70NsduqZvKT5kQTKD w3Y/uY3huuIOXBUagPfYhj3arPn8m2dJ+wOJBVaVfESXoasrfUWAwnlcE7kQGdb9iVtZ 5vXXbl1ZTSZL7GSFe5LxVnlBNAh/RMqqsg53jPVKKgzzJ00cKmdYMDlntoe+2dmwv5Iz CoQXsexy9cOvnMCvCq+qsvKk6pgSc8O1/hiF2BCT58eGcJ9MqOV7ap/xWFFd7pStoE9I yzLiZdCWJeBtXU44m5MMsrDlwfHsnVQeiuZ98w5xvpE8/Tupp3X/kYT5Mcxlv8avJMHD ns2A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1767726563; x=1768331363; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=BATdJWgJUwnMbHLsMBqXXAerZpaNwXBAjVbJPcNyAvU=; b=bNFGIbCGh/h+mjSH6RFtZ+Qhx2W5D2q1EsabSkfWKLSzWIGbalAX6+K3PPm++6GgwN If3l9Vj4ovrJ5QTawerXjxuNLPEQ+PKgUIuC2xUaV1WJ1AFoA2WnLwu9Y6ZpNiWa0q4x 6fVPQv5kTzXd2KxY5PeDBKTLat+T37st98viIV83dzIU94A6tvcSSDI41EfNZAn2B362 LWqxU5Mk8EJzLtSBsj8LBmqfmnbv5rRcJjkxlGVA40Da6OY6XWjy8x0vQ0On/o76zJ1s 60+94Slj/Ur55gD7QzPfLso7XwZESxqJ7mQmTTO1+vBb6vCXA18pnwuoM5S4tn31B6KF blaw== X-Forwarded-Encrypted: i=1; AJvYcCVA/cXc98V1ESUzmhmtKtIIFzEq7Kpfbx8SGM+QMU3S5EBxtWHo5t+wNBgp21ogmbaEefrleOEgE9wyI/U=@vger.kernel.org X-Gm-Message-State: AOJu0Yy/YHQjDfUK+MFD8m27H5uZDaRurH8bq78+xsUJosDfJ9cyBhIW Za95OCPffFyVanfjxtVhrE/2D2ZOaKxai+QfLjsgvUyd2frU/6gbLz6M X-Gm-Gg: AY/fxX7hnXj3k/aVdLHYtCHUMlcEJKOO1oMubrZnYxijQUBRd3dUp5/JfJqg0ovNo1p uQwNBp4dwBdpI9gs7U/IjdORZbmEJwZUcwulInhMdfdB79QGZ8kh/d2Zt67os7p7UlOJAMRPE5L ekWxL+jcjwzxBbLtkUVAoHwwPwNBjG15+IDozExUyt57uvPfDzw/EUXP9GOF5xo2RBr85ZeO1od Xr04ZZRKS6fMKGdgQ3HgZcBZzX3yCs4VMC7/kN6/1Wa46sCky9CJoDyoL1uwHp/TDl9wDWnO/lD auyNBltuClP98qWXUhtZ5NBI1q+uLfAIJ8J4UP5Odo636jwTF74upkXqJqX5f0VzBaTtNIXYQ61 5VYBPw+aO9GrtMsD089E/IxYhzOqIwOjnscS4uCJkyRYtLNZsaQXsY5W98mBg08G8rppMG5+IUb s9Cgnvl9oKPWC74xrZAw== X-Google-Smtp-Source: AGHT+IEv3DyNwRK5RvEmcexsucGDjZhsLc4jeZexw6MFns14bMGlit2ognMpseLu1Intl2qBeIsDAw== X-Received: by 2002:a17:903:2c5:b0:295:fe17:83e with SMTP id d9443c01a7336-2a3e2cbb647mr42089515ad.19.1767726563165; Tue, 06 Jan 2026 11:09:23 -0800 (PST) Received: from rivendell ([101.0.62.234]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2a3e3cc78c0sm29380975ad.69.2026.01.06.11.09.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Jan 2026 11:09:22 -0800 (PST) From: Benjamin Philip To: Julia Lawall , Nicolas Palix , Jonathan Corbet Cc: cocci@inria.fr, workflows@vger.kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, Benjamin Philip Subject: [PATCH RESEND 2/3] scripts: coccicheck: warn on unset debug file Date: Wed, 7 Jan 2026 00:38:35 +0530 Message-ID: <20260106190836.36630-3-benjamin.philip495@gmail.com> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260106190836.36630-1-benjamin.philip495@gmail.com> References: <20260106190836.36630-1-benjamin.philip495@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" coccicheck prints debug logs to stdout unless a debug file has been set. This makes it hard to read coccinelle's suggested changes, especially for someone new to coccicheck. From this commit, we warn about this behaviour from within the script on an unset debug file. Explicitly setting the debug file to /dev/null suppresses the warning while keeping the default. Signed-off-by: Benjamin Philip --- scripts/coccicheck | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/scripts/coccicheck b/scripts/coccicheck index 2efb74afef2b..8dd766009de1 100755 --- a/scripts/coccicheck +++ b/scripts/coccicheck @@ -260,6 +260,11 @@ coccinelle () { } =20 if [ "$DEBUG_FILE" =3D "" ]; then + echo 'You have not explicitly specified the debug file to use.' + echo 'Using default "/dev/null" as debug file.' + echo 'Debug logs will be printed to stdout.' + echo 'You can specify the debug file with "make coccicheck DEBUG_FILE= =3D"' + echo '' DEBUG_FILE=3D"/dev/null" fi =20 --=20 2.52.0 From nobody Sat Feb 7 18:15:47 2026 Received: from mail-pl1-f194.google.com (mail-pl1-f194.google.com [209.85.214.194]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 974BE33FE1A for ; Tue, 6 Jan 2026 19:09:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.194 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767726573; cv=none; b=WXDUsrRDk9pbS49wWHNpfWQ8TcGzaOzzg3tHlyTRt2jMcBzC1pvGUu0OQ9HAf452j1A8OxaBcEezo1j70IDnJsf2zEsofDGB259DX2pXc+LZD5/+OZjC9OvM3Kxj5yEV7gekZY59rG3PzhyioMdY33FPqorQxok8DguqZc1wpVY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767726573; c=relaxed/simple; bh=j0jDV4lbFVQ9QVQdB139GuIVebX7BEtCYepQXaLrbqE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=mvTX3uJBwjJwVik1Ru08NgPAxt0dwsJSbOcq7k1OsxOaXTpPund2rggoh55tMaDkA9mm06bSk1p9WrXgg4paGWhYFYctkQBYepl0tr/4qlpkKWDaQYqRYMhAORRZhmxBkSX/Hjab0HfGHBAjH+0DhalHFGudXyQQUvN/krxIjtg= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=FS6D/Mta; arc=none smtp.client-ip=209.85.214.194 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="FS6D/Mta" Received: by mail-pl1-f194.google.com with SMTP id d9443c01a7336-2a0834769f0so13236645ad.2 for ; Tue, 06 Jan 2026 11:09:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1767726571; x=1768331371; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=7ZDIxAuQXdSZKM+omOFdw1K6fCzWMGD3B/LiysTgYjs=; b=FS6D/MtaN2mec5qP9Q2U7xSzHsDTnCfOl01/noWmYTPyH2osEUrnCX8bDLz2nVJqbm OZZyC33z8LppBERZS8VGJHrAFKUeymTSdow3dTfe7CB43z1R6yOQzRVVJ8vvy69G3ZMu YgdnXptH+lI0NMu/B1MJ+zkGw1OA4xE6+2AnwTKKTy2j/14GqB7QzERjL1OgPr11oAht SV5QI9uSi4xQ6uhxuf7R3yrCjNEPajlnWuRpUeB6V0veQH7LenSI40mfmT+1egx4cWAJ yoceJFfHC4l+tuwObO15/JeiptK06VGDQtMJxpu1jRhDleW6GUH4chW4vAHTLt3pbTgb 2qHg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1767726571; x=1768331371; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=7ZDIxAuQXdSZKM+omOFdw1K6fCzWMGD3B/LiysTgYjs=; b=BKMaPPSplsCxttCjpTcDzC0btyJoxHLc4t8B+YQA560VuQDshMC8Ejy8ZQjgMyBRRV wQ1a8Z86ZK894ZFYVcbCS+6FpA3z+5dmDlp4YGhUD7x5wrPlHhMP1C4dQDV0mifvSPI4 TFV+wuEBTBXah8Z3J5AV3ydvlpUjA5Jmu0v64phYa8kmn6N6F3mkC61h8i1fi3whRU08 VfXoK4AADTAclFkFKzm2hEX8UW1lZ8nlOQ4l731oLW0iwacLI1Hf4Jd6WIFSXc93QmdV Q+5CmOxUuKWvuKasUjVHk64OnWPOTb1MfegHkt6X9WD6/yV4hp2UhPi37dq92C2IP+CF HSgA== X-Forwarded-Encrypted: i=1; AJvYcCVy5FHDyI7Y7+QJmQZ0Zf5GTufxVhOUzzEoguP3j4GPJhWQoZ9vHrxF1MXS886Q1iemn2IqCgRaooSDMC0=@vger.kernel.org X-Gm-Message-State: AOJu0YxsPSlSiNbFjcLC7dMeSHp43x0exdkBG9Zzcn/kTBaT70d7UHOb VFO0oWZb5mMW5Tlw32Gji3FDc2zqvJUdb4QktRpybxwqxK1VtB2f0OIX7Byf157y X-Gm-Gg: AY/fxX5fkLPTiVuTQ1oFkSU3vEYzEkZA2qwpjT0LQ/QjwBHZkp/hqMj/Ni/LgdVEeuo bTFWAmEDbRIY3vm4Bp8hkIm5BEBmDpIWXSmMWVa90nPFID0YvhAnRRWN+g2HXRBHA0WH6ASFs70 +VH4w2tcYcPquxs1K58FFiBSBjCWYtg8F0TktbtSAlhtepR0QYGRso43MjSqlIb39eluvVENJ1I g+pr4JJWo22OyU8UGk4RvW+rnyWHFUppKmrc4bB3wCQRr1kQE26LBGEM5xFDkcFtkdClaSfFpYu LIH89NEfFVJOjLi+a3L87f4PgUbIMzGlnWUBB8RcEzv92Sk4IdMLQZbCRmfW15Q5kdFzVmmKf82 LMruz81XeZr3m185wXitbTvoSMogbVtU6GgKOpCEgMUfbngIx0ZrsAj0TqIWjXtAxKgiRm8tetM Akpy+7QJ4ljZK7jgttvA== X-Google-Smtp-Source: AGHT+IE1WFyskV9UBz53SZomuLYRFUJQlyS3/Vk4tjY//MxsM+cH3sL/yfbwmTq7HM4vYlJFb86sSA== X-Received: by 2002:a17:902:e80d:b0:295:9db1:ff3a with SMTP id d9443c01a7336-2a3e2df5181mr37055245ad.28.1767726570816; Tue, 06 Jan 2026 11:09:30 -0800 (PST) Received: from rivendell ([101.0.62.234]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2a3e3cc78c0sm29380975ad.69.2026.01.06.11.09.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Jan 2026 11:09:30 -0800 (PST) From: Benjamin Philip To: Julia Lawall , Nicolas Palix , Jonathan Corbet Cc: cocci@inria.fr, workflows@vger.kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, Benjamin Philip Subject: [PATCH RESEND 3/3] Documentation: Coccinelle: document debug log handling Date: Wed, 7 Jan 2026 00:38:36 +0530 Message-ID: <20260106190836.36630-4-benjamin.philip495@gmail.com> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260106190836.36630-1-benjamin.philip495@gmail.com> References: <20260106190836.36630-1-benjamin.philip495@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" The current debug documentation does not mention that logs are printed to stdout unless DEBUG_FILE is set. It also doesn't mention that Coccinelle cannot overwrite debug files. Document this behaviour in the examples and reference it in the debugging section. Signed-off-by: Benjamin Philip --- Documentation/dev-tools/coccinelle.rst | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/Documentation/dev-tools/coccinelle.rst b/Documentation/dev-too= ls/coccinelle.rst index 6e70a1e9a3c0..c714780d458a 100644 --- a/Documentation/dev-tools/coccinelle.rst +++ b/Documentation/dev-tools/coccinelle.rst @@ -127,6 +127,18 @@ To enable verbose messages set the V=3D variable, for = example:: =20 make coccicheck MODE=3Dreport V=3D1 =20 +By default, coccicheck will print debug logs to stdout and redirect stderr= to +/dev/null. This can make coccicheck output difficult to read and understan= d. +Debug and error messages can instead be written to a debug file instead by +setting the ``DEBUG_FILE`` variable:: + + make coccicheck MODE=3Dreport DEBUG_FILE=3D"cocci.log" + +Coccinelle cannot overwrite a debug file. Instead of repeatedly deleting a= log +file, you could include the datetime in the debug file name:: + + make coccicheck MODE=3Dreport DEBUG_FILE=3D"cocci-$(date -Iseconds).lo= g" + Coccinelle parallelization -------------------------- =20 @@ -208,11 +220,10 @@ include options matching the options used when we com= pile the kernel. You can learn what these options are by using V=3D1; you could then manually run Coccinelle with debug options added. =20 -Alternatively you can debug running Coccinelle against SmPL patches -by asking for stderr to be redirected to stderr. By default stderr -is redirected to /dev/null; if you'd like to capture stderr you -can specify the ``DEBUG_FILE=3D"file.txt"`` option to coccicheck. For -instance:: +An easier approach to debug running Coccinelle against SmPL patches is to = ask +coccicheck to redirect stderr to a debug file. As mentioned in the example= s, by +default stderr is redirected to /dev/null; if you'd like to capture stderr= you +can specify the ``DEBUG_FILE=3D"file.txt"`` option to coccicheck. For inst= ance:: =20 rm -f cocci.err make coccicheck COCCI=3Dscripts/coccinelle/free/kfree.cocci MODE=3Drep= ort DEBUG_FILE=3Dcocci.err --=20 2.52.0