From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-dy1-f182.google.com (mail-dy1-f182.google.com [74.125.82.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 344D5310655 for ; Sat, 7 Feb 2026 21:08:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=74.125.82.182 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770498499; cv=none; b=rZwPE36r2EBNuWUyxYQClXfflLPckKHcTrE0G8qP2yrGP0dU4ERfFsGnPdtsc8wmzfSvzcbfxAHTpW0FDuR9YFij6pCtL/ikFr22nvUG35ZaS/KJa/3KiwE9vR8ZwMgS1dYi41bUsUMOXhTqAmAY3kxonMGL37Ryfld0ljXu6P0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770498499; c=relaxed/simple; bh=C7nWhSH5ZIBC5gMfK4XviN9conYjV/ZPoeELP6joANw=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=A8B5AAdxvJsgwiyNLmX2EmmX/1urmzmUAOZzGka3zMlZbimhTdG82tpW5qCaHgrm9otlXTqSnt+ZYkparb6H5T07FXA2RfEln7XpxnF/E/PiFvVjDV6Q8ro1lXIhZNaUkHH3FeLr+Egk5h2Y4GuuefkMQupk/odhV1b5HqEWdEA= 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=hqEOCaKt; arc=none smtp.client-ip=74.125.82.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="hqEOCaKt" Received: by mail-dy1-f182.google.com with SMTP id 5a478bee46e88-2b8397e3e09so3809676eec.0 for ; Sat, 07 Feb 2026 13:08:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1770498498; x=1771103298; 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=XNVS1D5uVOL3ZzlJvhqueM/TaA1XdrpiV4JrF6+Qf5Q=; b=hqEOCaKtRRIz89qh2zgftZyl9zbIAgQXTFTvZEF1lBcjVeO5n9V1UyNuDwb3NVOWz9 1WAB/oNdXhxsCoiKmKnc78EANZ9IwlIc/1g4URf8G9Bd6bCzKiHdB2PKBKzu+CAJJ2fR Eys6s+hJWXblAq/ILdbMJTjs8qcADOY6s06CJJ4COtTgnjdXhLRmVr+hy8kp6yx6KhD6 ux/sLICVACFkF32UjkJNYLVpZX3aLeggo29hW/QLrsrILiij88W2mYM6k2OvhogIsmBE ZhP20B4Kk9pWvngwrio6kXn6eLZj1aKW6ls66QGlPil/QIUjtYW9ywX37p+zTv5C1hFs Hp6A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1770498498; x=1771103298; 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=XNVS1D5uVOL3ZzlJvhqueM/TaA1XdrpiV4JrF6+Qf5Q=; b=B7ngSxUBU+N9jTgWeJrmWwPuwU6Lxsop9aXESrcjpUsfi3xFZSI2/RMnoZ6p1vQwLx shDVXTAMffxy1FXY87MJw61VUmGCtMBaLzOL+4+q4CFfV8zVTtUmBsuXNpinFNFiFyz0 Z/0k3n/Uu/4wMA1UWB43SQitceXb5B4E0+Ik7kqqRqRaXmXFKShW1AjeHR4fipoLN11W LVODeBcnY0pb9RDblaLTlLD5adjd20bqskSILNeOyXvxpgyEKWrQXdOKON7OiPl7fiRY XHj5xBQZ7CY+9Rk1HzKYfrho5arlIXOLIC+99sZMlZXq3NBLZ1cxJGVp51vVProhI5B4 GlVA== X-Forwarded-Encrypted: i=1; AJvYcCXKEZR1tbtq8KzSwS/L4ej8hDvrzWoXDLjemVM8NQQ9m7snk1k+RFbPiCH+utk7EU+/mtYrNdI7kK6vjmQ=@vger.kernel.org X-Gm-Message-State: AOJu0YzdaIfpuAzy/Ec8/Y+hqL5YGH6/KpY/x3hvDOTXPZqbVsqdwlnC 8H5TPG/1RKkOuFawrZtqWF4Jcnpmcn60/S5G2d7TTcU/gtVmeSyUKfjc X-Gm-Gg: AZuq6aIKtQWq9vtMcVQj34vykiSUiZycmfC0R9a0xecZLRUlmit/QpkrUQJ94ph/cYt c0x0uNv5zQsDnKH1Rk5qooJW1e6E6Vyhwr8YNtrk0NlYbDnTMhXUzE2nOTQEWQmIKV1pLO8IqPk a1V2bfhoAQ/KlmyCUbh8Jxma+xLBC+a2yXRPw9mFqzJWIE/hGLv9O/qMqn131nipxI/TAds+kt2 lKz77+vlagb7BissUskzQasqhCjp/X2at9byhbd3K3/nf8xN/2/vUdWbftbe+obKAjP9EYmYEA8 CyhPUKiS52XvLc4IFbUBWPFY07oD/JWzLdKNaXpssWMjgEdFctYrZLqLnyjGZ0qz2DWyDPx+7EY 1X1tT0KM1Xk2fYOCSXsznnNxm8kS0I/ZNCToEHPywhu2n7P9SEApwHjb2hEYNuJ5zH2vUbw4T6D NRlB/nRw3L1+qsKEw8XUCcVeVmgVJL4XaGkBBAfM+JZfBhKo9/YLxD3qZJoaKyPRt+ X-Received: by 2002:a05:7300:b594:b0:2b7:ee1e:75f4 with SMTP id 5a478bee46e88-2b856a5b95fmr3056648eec.42.1770498498216; Sat, 07 Feb 2026 13:08:18 -0800 (PST) Received: from jason-hall-A520-B.. ([2600:8800:41a0:8000:987e:6d8e:7cd5:6e71]) by smtp.gmail.com with ESMTPSA id 5a478bee46e88-2b855afdbfbsm4504628eec.11.2026.02.07.13.08.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 07 Feb 2026 13:08:16 -0800 (PST) From: Jason Hall To: Miguel Ojeda , Joe Perches Cc: rust-for-linux@vger.kernel.org, linux-kernel@vger.kernel.org, Boqun Feng , =?UTF-8?q?Bj=C3=B6rn=20Roy=20Baron?= , Benno Lossin , Andreas Hindborg , Alice Ryhl , Trevor Gross , Danilo Krummrich , Dirk Behme , Andy Whitcroft , Dwaipayan Ray , Lukas Bulwahn , Jason Hall Subject: [PATCH v8 0/2] modularize Rust lints and add RUST_UNWRAP check Date: Sat, 7 Feb 2026 14:07:44 -0700 Message-ID: <20260207210805.196759-1-jason.kei.hall@gmail.com> X-Mailer: git-send-email 2.43.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 Content-Transfer-Encoding: 8bit This series moves Rust-specific linting logic into a separate file to prevent further growth of the main scripts/checkpatch.pl script and introduces a new lint to enforce safety standards. The first patch creates the infrastructure for scripts/rust_checkpatch.pl and adds a conditional loading hook in the main checkpatch script. It also updates the MAINTAINERS file to track this new file. The second patch introduces the RUST_UNWRAP lint, which warns against the use of .unwrap() and .expect() unless they are accompanied by a '// PANIC:' justification comment. Jason Hall (2): scripts: checkpatch: move Rust-specific lints to separate file scripts: checkpatch: add RUST_UNWRAP lint MAINTAINERS | 22 ++++++++++++++-------- scripts/checkpatch.pl | 14 ++++++++++++++ scripts/rust_checkpatch.pl | 30 ++++++++++++++++++++++++++++++ 3 files changed, 58 insertions(+), 8 deletions(-) create mode 100644 scripts/rust_checkpatch.pl -- 2.43.0