From nobody Mon Feb 9 18:48:00 2026 Received: from mail-lj1-f173.google.com (mail-lj1-f173.google.com [209.85.208.173]) (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 23E347081A for ; Sun, 28 Dec 2025 19:34:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.173 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1766950474; cv=none; b=glHCv88Ft+FnTHUCzN/wzfiGXlC2PLx0vhn/IvMMOH3mgxGp8qfcZY1B1VtAVCUNHivHmJhDKe0UWyoc5LlTdd99qfDhk0IbLg/fI/YXxrhB47Vw+N9zjcjLrT4Xe75E2djDUQVx3MQ9Dm9s6fm6/tRShL4W3zfv3DDeEyJW6lY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1766950474; c=relaxed/simple; bh=xhd8SzaNLSn5n7vZg/YZdNoWCvF2xi7fh63QMmzjZKM=; h=From:In-Reply-To:References:MIME-Version:Date:Message-ID:Subject: To:Cc:Content-Type; b=h/HtkgnA2FRQ5VR6IB/EpG//aESx6s606aMT72bWAF+1CMLiK+3WLp9XpBa4/zjtbaDtkJ58JC8IBfo0qTxjVEjQg7n/AhZbd37s3fGrWbZkGXRqNQc2FmCuBaxbKfiRG6s/OQiHa5OzoUiGWgObKWppJqdgzj/fovjPjuO1KrY= 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=TYlpPakm; arc=none smtp.client-ip=209.85.208.173 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="TYlpPakm" Received: by mail-lj1-f173.google.com with SMTP id 38308e7fff4ca-37a2dced861so90851761fa.1 for ; Sun, 28 Dec 2025 11:34:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1766950471; x=1767555271; darn=vger.kernel.org; h=cc:to:subject:message-id:date:mime-version:references:in-reply-to :from:from:to:cc:subject:date:message-id:reply-to; bh=lhwaSoSDcJzaU6emLiSJOWLUcyi9EjvkM7Ru1loqRjM=; b=TYlpPakm/NSMIF8GhUQIRTwQKNorpqrvMxC6wmpBVoT21wAwX3WyF+eEuAuvbdG8V6 ah0S4XTl/q0hf96Vgi+w34NE8VDnLDw5E/4GGeB/eZWA96ZqFYnnNZninGFDkoTQ1CPz 9sToYB3qq6O68FD+pvbcjV3B+2LRrP0cjL8XHUnB4aESGdHydyuhvSwp9FTLHlAiOH3p z8Xf2neHY1Yf6EX0CRehnU5Asufz9/1eX0C+SEttdy0STOY3eSZKUPfH8AjCZMaJjG0y TPs5Sw15I+6K4U/9CQpQld/MGkoDcE6rdEKFQV7btB90Z32uu4XbDc401EHb6oGljxdg evDQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1766950471; x=1767555271; h=cc:to:subject:message-id:date:mime-version:references:in-reply-to :from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=lhwaSoSDcJzaU6emLiSJOWLUcyi9EjvkM7Ru1loqRjM=; b=QyhQA2AxM8qIVZ6Iv80D7A2VV4ZrfH6qbc27Mg1Z410KsE4lskERSeO7MsE8EjrINK IGd6jBzRiXKAzb6NNU69veEJOdy/nyZ/vt8fnW5v9fFeRlkA80/WnVsYpN+eExuLeBE1 o6Cgww59acnvF9NyHxMGEf87CBrUynlW+4i2GD+3yh9X5sVu8EXaJedz+N9zbwOiYrzu 6G7/dhhbXptpNVCY6WdFz3VoAA8Y7GNGik0XIad3bSXCnqvA7s43mEznZHhqDRsS3sb9 NVwcC47kt0Fb37LlUxj88Y12VZkD7nHrJvKJCq7jQj0qUCsjWrLooardAXEi8rXebyOT HTSQ== X-Forwarded-Encrypted: i=1; AJvYcCUTyQmgZXCOIHWUhZRnP7Cd585d+sCLk2/CZa9jQP1771lle9BL0OTlfkFhfwgj63niqToM4kS9afWCNKc=@vger.kernel.org X-Gm-Message-State: AOJu0YyU+hrYRizHhwj6yGcXwLWXmX3skGRXUAQDI+fSo7nnD7LvIZab e91ZeetpuNtJPfBguozoa2M0GTG/HKA06GZTCW5VAPgor+VY5m+1misM0q9b4cEtrw4p/9ORF/7 pUtHknsOcdxvkIfHButQtnWp+Sysiej0= X-Gm-Gg: AY/fxX6DT1x10h6wWDAbKpjQBKFk8c9o1R9UNR9SHfW/pRU0gRbI/V6ZLC1cBLUl42u GUvWAMmCeejSoZU0EaOmZf6yGtqHAD1BKxYtjIM4EjHoyOVqjgG33VH9R9Dm20Qc51VKhBj2ZcD ss/sY0n1fdp/SIHOrpTjRt1hBAO5nrzt4YTuRZfcNHDvNr997yAltxzx9r5BTc00FkOcLJk6V2G rrporqwuYJGKaBkiDNFg66CIR6sig9pr65bq/2KgywF051CCLmxroPE3RZCdOFN/vKedA== X-Google-Smtp-Source: AGHT+IHEfNupptHY9trgkQoCzy4+YnV+44PAeznmTGFiKYh8xCsFyOXYgpVdK1HwRf1XgcOE2oXV2up9kfOA+Vtk8dg= X-Received: by 2002:a05:651c:1443:b0:382:4f57:e8d1 with SMTP id 38308e7fff4ca-3824f57eda6mr47267891fa.18.1766950471166; Sun, 28 Dec 2025 11:34:31 -0800 (PST) Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Sun, 28 Dec 2025 11:34:29 -0800 Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Sun, 28 Dec 2025 11:34:29 -0800 From: Benjamin Philip X-Mailer: git-send-email 2.52.0 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Date: Sun, 28 Dec 2025 11:34:29 -0800 X-Gm-Features: AQt7F2rFGI1xRtTM5YKo2WsRWHsFnX_Zg31dsPOSPaG9OTCcg_vrVmKSegd2bmo Message-ID: Subject: [PATCH 1/3] scripts: coccicheck: simplify debug file handling 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 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 () { } -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 if [ "$COCCI" =3D "" ] ; then --=20 2.52.0 From nobody Mon Feb 9 18:48:00 2026 Received: from mail-lj1-f182.google.com (mail-lj1-f182.google.com [209.85.208.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 477C32737F6 for ; Sun, 28 Dec 2025 19:36:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.182 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1766950608; cv=none; b=gNNYpgHDrXje0bGCcQEAvd3nOcvoqUNyYCsmKPDY0852r6J35UQ2HGtDK4XOeNejGsaJ0Fg8QQewfIYzhvKAtyAI+msOb23gWVl+UNLNeVEoTWtUjwZ1KUZZYtAvMf2WZF0qWla86KwnH+v5bI6ePqUPEKrnOstst7MGnxuSKm4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1766950608; c=relaxed/simple; bh=MvgwSe2uuAnSoqmyj7Z6BxaI7PVqfjMSmemWw9nwZVI=; h=From:In-Reply-To:References:MIME-Version:Date:Message-ID:Subject: To:Cc:Content-Type; b=BNAx6k1dftYduWOrcmgSLynPwrc6FiAmzb/IdHjcCFZXL2Asoi/QmCW2aDvmhpx2F7RvRwM+Y6qOkx5NxsCyPXryGnVxTblV7EzcBhKx6QSwTq7D6xhjzpclf/U+XB3/G0v/0VSweWENpqArXwa3todeU+aPOVhehDQWkG6lV5A= 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=Jo26XEqa; arc=none smtp.client-ip=209.85.208.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="Jo26XEqa" Received: by mail-lj1-f182.google.com with SMTP id 38308e7fff4ca-37fd6e91990so66318541fa.3 for ; Sun, 28 Dec 2025 11:36:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1766950605; x=1767555405; darn=vger.kernel.org; h=cc:to:subject:message-id:date:mime-version:references:in-reply-to :from:from:to:cc:subject:date:message-id:reply-to; bh=a8pEOxCzRMteaLHsxGxdhMSLmiiDxpU7yALXLsW+y30=; b=Jo26XEqahZZt1bow3phaIBHzxhAzcPRO4iSMWbexkONb+RhC8n0KcHAwwDa8Af2/tK pgL46z2qw3F0hEqu67FmoIjIZXaaklT/sglRjO9cPAfOIK7afMAAFIN9Zycs2SgoIfqK iTxlxiul5J63SplcntsrpJtIatkbPkYY8zMuKqv+XFKDeF6VDu0bby45iTLt86uPQK/K LpAqNcaexCAYpkm4UCybEIJ9cFZ+i1YH62RgRVG1Zk8mOyWY/t6sBeSC9sm7q1+484ai aWSK91pcjJocah9bRGmTOjToq0Tt9JZxHtDUmoOo8p9dyFzASrfZjE/c5Dtk8vfaTo/k 0Gbw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1766950605; x=1767555405; h=cc:to:subject:message-id:date:mime-version:references:in-reply-to :from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=a8pEOxCzRMteaLHsxGxdhMSLmiiDxpU7yALXLsW+y30=; b=Df7MvLij6UK+xmmuG3kDPUvftSFYYnREHq7eEdO6EdKpjyykQbx1HDRNWTgfW8ZJeQ HBO6LZXWyKgZi6T0JgzOUmdr8KEKns6pjV7sUyxemhlw8E8RlzkpO/sJHBBH2cSskk4R /xQ/azNiGgcOUREGXZn2zeYxizwQ37w2ZSr5+bnt0XO0mj6rLA8qs/v3FbU5cbggHnoP NifHPNVE1AyUA48CXzB+79xWK+qOt+i9oXXq8mZQdLfJevhjIc11MIvj/cOhBq96e0Rv A/I+LWd6+vrPhd4glziIqVTFOc/oadYQcuPSvmSxBMS1HRXYULdCBT9+PmNQF6m9abTc SW6Q== X-Forwarded-Encrypted: i=1; AJvYcCWrnjnIxhK6SbaxbDkFwrdRDK41DxydWCwu4SifNm+0N4MbqVWKUuUFOSgwuwX8zTKCbye12ERpcFJZpIo=@vger.kernel.org X-Gm-Message-State: AOJu0YzMi7zYLu9lCUqn3etUyKOknaGcCNKuMmhmbNAIJaIGa/VGU26P k7bgOHNC6bxXDwEsUIHBtR9J9O1RNEkwIKEJ5poADqEtimMFbgSw453AZFNZYy8VmfF1RBm/E7z Z3LS/Vjn9i304iwnCgRuHxaffioxXFgw= X-Gm-Gg: AY/fxX4rQqeGPnwUxlr1t9399V33tS9tixwXKvgT0IJn/H1w6HEMmOUjoZOpmCAiUni 9Id7vFHMaCBsn7ELS5l5RJgtC+DG4R/u7pScuFTFbTKQ1p97AU8h/1p/tiOpfpZAvs0K+R/YDBF Nkat0FeRsiaU0/MLnP4Jh8Ynl5RQuU71i4ndd08UL2VXGSbZ4KqgZbLbUTOpe/sHYBURKAld3uI 1ZXfFHcDqNQ99AYh88eLj5gikFgZXKwP5U1RQREdKuCqjehxVrhcuCGfjma9WXmgnqbo5+0ExMK TN8A X-Google-Smtp-Source: AGHT+IEB4QizO116wEGtM/TvDrD28jqsY2fAs5pY5yVqGRRrOxCn4rxhxMSU2ASm78Oy6NPp0xHNiycd8NYhq/GICx4= X-Received: by 2002:a2e:bc0f:0:b0:37b:966a:493e with SMTP id 38308e7fff4ca-381216fcca6mr97098551fa.39.1766950605367; Sun, 28 Dec 2025 11:36:45 -0800 (PST) Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Sun, 28 Dec 2025 11:36:43 -0800 Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Sun, 28 Dec 2025 11:36:43 -0800 From: Benjamin Philip X-Mailer: git-send-email 2.52.0 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Date: Sun, 28 Dec 2025 11:36:43 -0800 X-Gm-Features: AQt7F2rxsR2W6BfMALSzXTLl-v-44B4FmN48vWNaW0EojizGDJpCSEaLdTYOeF4 Message-ID: Subject: [PATCH 2/3] scripts: coccicheck: warn on unset debug file 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 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 () { } 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 2.52.0 From nobody Mon Feb 9 18:48:00 2026 Received: from mail-lf1-f49.google.com (mail-lf1-f49.google.com [209.85.167.49]) (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 4DDF1273D75 for ; Sun, 28 Dec 2025 19:37:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.49 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1766950624; cv=none; b=Ajf2TFqTL/uzyffjYhtWuVJey7bHklOQY9kbItRMKHNxgnx/An0x7Hgae+aR+gpKLi1l/CTgJBiail75PW8FI2xIcqTeErXjisyntclq+9jl0c+YklI5XIkA/YwTdKAjrt9jyVVCAuTU2XzM72qcR6mZjeN+x5hqPtW6Bv1zXbc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1766950624; c=relaxed/simple; bh=Ja68HZD8n/Mecl05e+HzN9NzVeHRRawWqVqaJPniPSA=; h=From:In-Reply-To:References:MIME-Version:Date:Message-ID:Subject: To:Cc:Content-Type; b=Yd+eag745CKsV0Ssa8d2e7ojnnl6gr7VCYH1tABeKNLV0SPsiRznXc6bVa7UDQ9niDGsM0APpua23V6wINmqWMReFkyAmMzUQ4pOXJx9y7r387NIf31fmJMsg7VJrfLgw/b/G8+an0py9C8zcSxZ6++zRE5nf+8leEsuwC9RN+k= 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=J9d0DImZ; arc=none smtp.client-ip=209.85.167.49 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="J9d0DImZ" Received: by mail-lf1-f49.google.com with SMTP id 2adb3069b0e04-5957c929a5eso12471868e87.1 for ; Sun, 28 Dec 2025 11:37:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1766950620; x=1767555420; darn=vger.kernel.org; h=cc:to:subject:message-id:date:mime-version:references:in-reply-to :from:from:to:cc:subject:date:message-id:reply-to; bh=ADTTnGIZjP2u1Oe9R0dqscHBsTYiL86hsl8c8md8O10=; b=J9d0DImZCC39w6HycqCM2XZMuJQvSqR10Ny6abV6N17M5/LhRsHK/cRwbyDIYyaNbt vqLa9sVIeoijmkTzow2yL7T6PCcAmNWwUKn+Jn8h9ErdjYj0OnY0bmeKgirRdEa5fgwF fWBe3rRS3rHhWWn9Yx2l15Ok6OOBL9GJDWSgA0WewZ7EolWNt76QEf+oO/wdVyO/zCAY 6D3UjFdjl4QZPfMAXX2CHbfeXAioPcdgwSsnu/Ql/PkCEEPtJzIhb30LDhlF0aRecfVW T7l6ofa7Xd9Gaxy2aVEJmdxXUcOVD72FyfwvIHwcPQDIN8fEswUFqIzNNI09qZzkJaVd IPdg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1766950620; x=1767555420; h=cc:to:subject:message-id:date:mime-version:references:in-reply-to :from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=ADTTnGIZjP2u1Oe9R0dqscHBsTYiL86hsl8c8md8O10=; b=LFJ/JUKtf1X5BGW8Tws4bxV2toRtbDX4/T2A/vvxGG/Nvkz8mU7KZEuAbXpTPDpwY4 jNFhKoofFWJ/3O0NTTq20R4pre3PuuTnco5ZmvRWUx6801CnRQYy07ph7QQrVhdHjeJT TeM87zhVLatnD3rgIRsPpwtOXDgw3U62l0yZseoDBMSrZO1aFjQfL0GsG1zPnsATW43y oAw6ddV/HeM5J3i60yUdAFzV0cl1vqykE/hivzWPp9S5l/69/5gwFwlyHQbgmYLRbEy/ Z1yv6G8dVOsPG0mzTpwjdUG+crqhKfR9nPn2kuqf5d95rUa8Rez9UaZ9DKHqXOkBuU9l fgAQ== X-Forwarded-Encrypted: i=1; AJvYcCXrC6V0L35R/HXXjHSgXG3+JeXgMU9wuS4MjNXTwp76kJ1eOy/dyfhdj3KrzMubcfH621z4F/a8N9KdHZM=@vger.kernel.org X-Gm-Message-State: AOJu0Yx7RyZodr84lOJGCwTPt+jpdriHPJi3L97FR6o7QkIT8jfgic90 ARqin7hfn6RckTs8jEXNs1sXhI2V2lrrFeaTRNFZG2r+6tLk1kCnbhcScnpNLux7v2AElSBfT43 DsMmRlKwNPP+MQ19+XbrEjp4cNmoOkWA= X-Gm-Gg: AY/fxX4zZn6NFT6DrsGcEtwUVRVMFiQeV7scRovkqrGbXysimaBbKhgkx05ZoOo2Tu9 H275bkhtMDUDr2nou9wfF09gETN4Lc04ZzMh7hLVBw0DQkQR0wQspM9mA6s4B/ioGwZTLH0dmG1 edDkhuaNAnaX/eHHNSEHNra6NK4qUNkswx7WMMQgbtb721qlvRRH6IwDd5OxADQqA44en990/r2 U/gjFAJ12oezdeeEXY3GJX7Z7LCZMA6bVHgqDB4me7k4SP2TVcnT/6bZq3tmAwC+dBpEmqzaoxj IVwT X-Google-Smtp-Source: AGHT+IEjLwwl0rS0LTYlhd2cdL11fDgszL6gw/6sfMpPXrUmy9mHWgnuGvwJ+khXGtCLqbUuvebxIoficoUgt+rViVM= X-Received: by 2002:a05:6512:304d:b0:598:f1a1:9611 with SMTP id 2adb3069b0e04-59a17d46307mr9266404e87.32.1766950620107; Sun, 28 Dec 2025 11:37:00 -0800 (PST) Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Sun, 28 Dec 2025 11:36:59 -0800 Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Sun, 28 Dec 2025 11:36:59 -0800 From: Benjamin Philip X-Mailer: git-send-email 2.52.0 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Date: Sun, 28 Dec 2025 11:36:59 -0800 X-Gm-Features: AQt7F2o4TnnTitmnSO1AXOGAIw0BbCkBgd8exok1Zu9FNWssb4dmPyVfsyXQ8p0 Message-ID: Subject: [PATCH 3/3] Documentation: Coccinelle: document debug log handling 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 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-tools/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:: make coccicheck MODE=3Dreport V=3D1 +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 -------------------------- @@ -208,11 +220,10 @@ include options matching the options used when we compile the kernel. You can learn what these options are by using V=3D1; you could then manually run Coccinelle with debug options added. -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:: rm -f cocci.err make coccicheck COCCI=3Dscripts/coccinelle/free/kfree.cocci MODE=3Dreport DEBUG_FILE=3Dcocci.err --=20 2.52.0