[{"id":3688140,"web_url":"http://patchwork.ozlabs.org/comment/3688140/","msgid":"<20260508035122.2C5CEC2BCB0@smtp.kernel.org>","list_archive_url":null,"date":"2026-05-08T03:51:21","subject":"Re: [PATCH 06/18] rust: error: impl From<FromBytesWithNulError> for\n Kernel Error","submitter":{"id":93311,"url":"http://patchwork.ozlabs.org/api/people/93311/","name":null,"email":"sashiko-bot@kernel.org"},"content":"Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:\n- [Low] The newly added import `use core::ffi::FromBytesWithNulError;` does not follow the required kernel vertical import style.\n--\n\ncommit 125b12ec12dfbbb7b1bcebfd39f627c83e1aa2f3\nAuthor: Alistair Francis <alistair.francis@wdc.com>\n\nrust: error: impl From<FromBytesWithNulError> for Kernel Error\n\nImplement From<FromBytesWithNulError> for the Kernel Error type.\n\n> diff --git a/rust/kernel/error.rs b/rust/kernel/error.rs\n> index 05cf869ac0908..5463addbfd957 100644\n> --- a/rust/kernel/error.rs\n> +++ b/rust/kernel/error.rs\n> @@ -12,6 +12,7 @@\n>      str::CStr,\n>  };\n>  \n> +use core::ffi::FromBytesWithNulError;\n>  use core::num::NonZeroI32;\n>  use core::num::TryFromIntError;\n>  use core::str::Utf8Error;\n\nThis isn't a bug, but should this newly added import follow the kernel\nvertical import style documented in the general coding guidelines?","headers":{"Return-Path":"\n <linux-pci+bounces-54182-incoming=patchwork.ozlabs.org@vger.kernel.org>","X-Original-To":["incoming@patchwork.ozlabs.org","linux-pci@vger.kernel.org"],"Delivered-To":"patchwork-incoming@legolas.ozlabs.org","Authentication-Results":["legolas.ozlabs.org;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256\n header.s=k20201202 header.b=SONPOt6l;\n\tdkim-atps=neutral","legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org\n (client-ip=2600:3c0a:e001:db::12fc:5321; helo=sea.lore.kernel.org;\n envelope-from=linux-pci+bounces-54182-incoming=patchwork.ozlabs.org@vger.kernel.org;\n receiver=patchwork.ozlabs.org)","smtp.subspace.kernel.org;\n\tdkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org\n header.b=\"SONPOt6l\"","smtp.subspace.kernel.org;\n arc=none smtp.client-ip=10.30.226.201"],"Received":["from sea.lore.kernel.org (sea.lore.kernel.org\n [IPv6:2600:3c0a:e001:db::12fc:5321])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519 server-signature ECDSA (secp384r1) server-digest SHA384)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4gBb1H3VG4z1yCg\n\tfor <incoming@patchwork.ozlabs.org>; Fri, 08 May 2026 13:57:39 +1000 (AEST)","from smtp.subspace.kernel.org (conduit.subspace.kernel.org\n [100.90.174.1])\n\tby sea.lore.kernel.org (Postfix) with ESMTP id 195F5304C052\n\tfor <incoming@patchwork.ozlabs.org>; Fri,  8 May 2026 03:51:33 +0000 (UTC)","from localhost.localdomain (localhost.localdomain [127.0.0.1])\n\tby smtp.subspace.kernel.org (Postfix) with ESMTP id DB62831F98F;\n\tFri,  8 May 2026 03:51:22 +0000 (UTC)","from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org\n [10.30.226.201])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby smtp.subspace.kernel.org (Postfix) with ESMTPS id B6EA83164B4\n\tfor <linux-pci@vger.kernel.org>; Fri,  8 May 2026 03:51:22 +0000 (UTC)","by smtp.kernel.org (Postfix) with ESMTPSA id 2C5CEC2BCB0;\n\tFri,  8 May 2026 03:51:22 +0000 (UTC)"],"ARC-Seal":"i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;\n\tt=1778212282; cv=none;\n b=RT6emuujbfyJnfBSX9BDeqCwF5Ov0zFXK1BoiZaUEmY+8h0b9iYPEOD8kdfy2aqoMjqN0zB/L50XWoy40KQSew+B5cr4SziMK/GDj+G2oCKTdUeproOtXnnuoOY4J0TJ9ENmurTZzYDc2uRdhvVl5CQflJv0hZ06nxSjdjiVmGw=","ARC-Message-Signature":"i=1; a=rsa-sha256; d=subspace.kernel.org;\n\ts=arc-20240116; t=1778212282; c=relaxed/simple;\n\tbh=z+5oA5BPPIEqNHttbRIYC/r5Gs4ENfdToHy8KAl0PI0=;\n\th=From:Subject:To:Cc:In-Reply-To:References:Content-Type:Date:\n\t Message-Id;\n b=ZMKFxHIYzlbzhhWiLBvWXxg/g0llBSPc5dU8p9Bl5TgtAA8cFJrE7W2PsrHaZKHhHstOWFDGd4yW9SGzI8QlR5yb2CMS7Ygw/CxjxOIrowydY7CyhgTh3J/vBcFJAhNp9ooim3beMbp+G0WsVFkqJECp64tfy27fv5bGx9u06nc=","ARC-Authentication-Results":"i=1; smtp.subspace.kernel.org;\n dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org\n header.b=SONPOt6l; arc=none smtp.client-ip=10.30.226.201","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org;\n\ts=k20201202; t=1778212282;\n\tbh=z+5oA5BPPIEqNHttbRIYC/r5Gs4ENfdToHy8KAl0PI0=;\n\th=From:Subject:Reply-To:To:Cc:In-Reply-To:References:Date:From;\n\tb=SONPOt6lI5DzliodITB9Z/pKBA4Y4C6Q6b9zM1SW3gSY4uNRTNe1NqJEHleoKszuj\n\t d+XJFuAySaUiwbHFUrdYHnJ8+fbC8W4nQtteQF4ZijVdQUi4j52YaDDNp1Z+09MWCw\n\t q/yVpJIXQjjrvULSF2ca4cgiZVXaNwt3VxvscZfjBw2aGJZDFpyD+E34cxk3Btyqs/\n\t khygxEYDLyHA0RtfeECskjJgseImNvzvjmuikbibhyvBzURkc3Mge0XPvDjLCa6cl3\n\t h9aNYAYsueDaDtTlSkaLQyuwTD1gWDi2P1ht/LZ+O9g+Syh2CkePwTJNuN6gcNSo68\n\t KroaxSZxzXjDw==","From":"sashiko-bot@kernel.org","Subject":"Re: [PATCH 06/18] rust: error: impl From<FromBytesWithNulError> for\n Kernel Error","Reply-To":"sashiko@lists.linux.dev","To":"alistair23@gmail.com","Cc":"linux-pci@vger.kernel.org, ojeda@kernel.org","In-Reply-To":"<20260508031710.514574-7-alistair.francis@wdc.com>","References":"<20260508031710.514574-7-alistair.francis@wdc.com>","Content-Type":"text/plain; charset=utf-8","Content-Transfer-Encoding":"quoted-printable","Date":"Fri, 08 May 2026 03:51:21 +0000","Message-Id":"<20260508035122.2C5CEC2BCB0@smtp.kernel.org>","Precedence":"bulk","X-Mailing-List":"linux-pci@vger.kernel.org","List-Id":"<linux-pci.vger.kernel.org>","List-Subscribe":"<mailto:linux-pci+subscribe@vger.kernel.org>","List-Unsubscribe":"<mailto:linux-pci+unsubscribe@vger.kernel.org>"}}]