From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-dl1-f50.google.com (mail-dl1-f50.google.com [74.125.82.50]) (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 E9F4915539A for ; Sat, 7 Feb 2026 22:49:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=74.125.82.50 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770504555; cv=none; b=CMn+IY4UUDFnS+9L2yUrJhhzLBiHeCmlHO2XLGdDa4ZZxHrAPCZKPng4+eNPV1/91Ql704FmaLHpLQrflPfZaLODdx96ToMeJS1TbCubAqCCjA3kcqe6UmsOmIG2DKANi1GkuuaWkiu43zUK+nGHRHoW3eqR1Zio0dOZuNVdrqE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770504555; c=relaxed/simple; bh=p4sqO1mG97vd4jVtw3NiZSPL1ufijbZuHKgqGBtMU80=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=pgh1htDKesckIHdCUNbaSLRTcs2jYCOdOsHLEW1YhOHQ9KceTg5dRDdSR74xta/JIj976+CDXNAJg27onUONj8ZisLKoVYabLH1UtdhsZ6cEfHc9RA/VSUqRxC9BCqNKVaJq2K/5LfecxB77ZE9sZovI8azRRVPHM4dQtWTdvVU= 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=HoOZojwo; arc=none smtp.client-ip=74.125.82.50 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="HoOZojwo" Received: by mail-dl1-f50.google.com with SMTP id a92af1059eb24-1233b953bebso7900036c88.1 for ; Sat, 07 Feb 2026 14:49:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1770504554; x=1771109354; 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=Xmt0za/RINbPauP/GT/yB3oia1AGMi1h2xDlnyHfSuA=; b=HoOZojwoaFjaY6CGc2PULu9mt0txoldL5LNUYZfQLiHFBVVQamA/r3BU7I6Sfi5nLD a/PSw7Q3VVawncTOgOX3RnjArj3slH6JCDb/wdA6IYzzP37E3uuQps7OZ0FMl9oPYA8D mBFIdJx4TzxdXifScMtLVy9OkX7YtbgNeOntKPGLb97DJlfz2qQSZNp/XgLiymNdTZv5 rVBCyS5YOfULb6QbcX8QhAgGpJGHVwEeaalxKsgeaRCOt2VG2Ys/Eg1oWQjD9uwx4s49 7N4ACuR90zkZNVnDQmtrtiUuxL0jZoK9N9DZuL7j/3Cz4eg4EWXA5E9T0yTBF3NcJIA1 gXyQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1770504554; x=1771109354; 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=Xmt0za/RINbPauP/GT/yB3oia1AGMi1h2xDlnyHfSuA=; b=JzOsLYyCywe/fd7eWO31BHG0Dyx5tvi8RsJomNzdwQXiSPEcBKUvGOo3MSORqNf60T RPS8JpWyzl8iYc0kHfaIXSCdEp7C6dGn5J/O4IQTtkW5FosKkrbuaGrgLmbmRS5gnFjg vidU6Njh4QtNdi7NGwpo5eBpO6N7nUagV1PNe2/ZbTHXX8bM9BJ4BErXWg0CU4OOx+JP ZzsZFDJcWODpfiPCrZ+hwfgqFI1uGTaa64ILR3MJZGHb6t3kdZtgskj9A+yIudw2XWfq CAVmnTp5lj7VHMH4yIgnDo5P6M8mzjRvfP2cmgYp5UQc/PRSNV93hMvjbSmMVDXbgIc+ syuw== X-Forwarded-Encrypted: i=1; AJvYcCXhwcJm0j9e3f/n6wVowv+wzKNLlL2sejUSWRsmq7dv2iSw57q6umy0GyyiqZNtrhZwHBuDwUpwt0nTAM8=@vger.kernel.org X-Gm-Message-State: AOJu0YwmYf23NloSj8VoqaQXaMcH5r42NPbiUGhKdQnaY2uhhpFVDaB4 rZwncjEgqfnBS9pCSygOWGT94d8zXACfcYmWbMtPlu5U7QhjW/VfqD93 X-Gm-Gg: AZuq6aKm+IVkG46m3lZreEQMcrpXzyzdb/QupGZlrE+BDTDgTXkO5HT+ALHGur6kvrp MO0YwN6ONiTSdnhO2eZLDjru2B9wq665IJH5Ym4AgKv3YfZDLUJQoZMQ+ij1ZugAEB2ibIHRP+a RmHJYioXarIyO2DkOZNCAkwhy/RRR2Z6mSda+yYRbAB2GUZQYu5OLOURLSTO6OZyiQDvTJyR+zT 7XekocHNGktLitOx/+KFYx91V8Fl/jWMwYRUxsYhwo150iWYvrZE7Hjdt/kGJkUJA6hZ0/FJGZp nKlx+jJekhrvrnP+wBFJwnrX02pQEJ6XpQWFLppQYb5gCxp1ZEk21gnfbkYtFsSq7c4JDSZy8Ks UlBmIKg/PXkTFZyRUMCCEUoB08dw0/2t2S01Fi/WPgjVorc53DgYG5v2WuUMCmHiIFX4zXXbhAe VdJzbbHm0zJBY1q45et4FDEBT0dNOru7Qj8PTO9lynhpmWHNv+tpJajsZyfkoe9SJHS/tqNpyLI v4= X-Received: by 2002:a05:7022:ec03:b0:11b:a3a7:65cd with SMTP id a92af1059eb24-127040014a0mr3552322c88.12.1770504553929; Sat, 07 Feb 2026 14:49:13 -0800 (PST) Received: from jason-hall-A520-B.. ([2600:8800:41a0:8000:987e:6d8e:7cd5:6e71]) by smtp.gmail.com with ESMTPSA id 5a478bee46e88-2b855afdbfbsm4648131eec.11.2026.02.07.14.49.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 07 Feb 2026 14:49:13 -0800 (PST) From: Jason Hall To: Miguel Ojeda Cc: rust-for-linux@vger.kernel.org, linux-kernel@vger.kernel.org, Joe Perches , 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 v9 0/2] modularize Rust lints and add RUST_UNWRAP check Date: Sat, 7 Feb 2026 15:49:05 -0700 Message-ID: <20260207224907.234815-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 | 6 ++++++ scripts/checkpatch.pl | 14 ++++++++++++++ scripts/rust_checkpatch.pl | 30 ++++++++++++++++++++++++++++++ 3 files changed, 50 insertions(+) create mode 100644 scripts/rust_checkpatch.pl -- 2.43.0