From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E3B742C9A; Tue, 8 Apr 2025 19:46:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1744141620; cv=none; b=X+YcB0gZAOJKUPDRLlSHuAcUqql2MMVIHCUGsx+5+jQITGj8XopG6whoRNQAUGNZdGvyK5wF+yupVKL0MINW/4M+FDLU5/0kYrwTiTF1zBjHGFsX9KQlqAAB9BSVBqp8BbPH256J5YtMf3Y3e+lubV9TF8zHW/jLZOsUOwIdBLs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1744141620; c=relaxed/simple; bh=ykljCqn6FF0Yab/J+sQBV/c6rKO+79JVLrOtQ1WmWVM=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=DLjXvOQMelYB7E6S2BzJ+1IX8HD4l37wUfsb7dcBgTPJ4+yZcTZlr3Gt6HaeOyBnPNWoVWhtgE7rY8qmFhxynUVf7oe1ZbBa71JycOlpoomI1TiLM22ME+rl46ygaO0ePHTc+TDI4ZJyucrC04BH0wrFxlDM0yUKCf4jzvtVqwI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=ieI20o2X; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="ieI20o2X" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 83463C4CEE5; Tue, 8 Apr 2025 19:46:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1744141619; bh=ykljCqn6FF0Yab/J+sQBV/c6rKO+79JVLrOtQ1WmWVM=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=ieI20o2XC9sqVx27k6M5ZLvXJv0oeJ39/VH12q8QeJbsqqVjn1W3JdiLb0PT+k+7J lNDqH/WAwk30m/tnWBHpDUjPbPH16UXtdSht1dBefLhcVUFcIa4r1KJaxI3EXDO4Fl znOWAuTSZXCjzgpXSRe9YpghtSGVJ5BtdlkDEYHm5c/rJkZFBYpxRP5lpi8RyOwnJ6 3AMZOfQVCe9N9gbuhvn57hfOj2Pp7J70MrTWjq4lLZTzeomxOliPEYoHvFrRMbyWDF KnhZoNE8DFphYErc2ef9/tFza3vCMaGg4Nwp/9OOD+24p2ie03vT3C70Ovxows3hVO 7Nhj3lq8rd+Sw== From: Andreas Hindborg To: "Miguel Ojeda" Cc: "Benno Lossin" , "Abdiel Janulgue" , , "Danilo Krummrich" , "Daniel Almeida" , "Robin Murphy" , "Alex Gaynor" , "Boqun Feng" , "Gary Guo" , =?utf-8?Q?Bj=C3=B6rn?= Roy Baron , "Alice Ryhl" , "Trevor Gross" , "open list:DMA MAPPING HELPERS DEVICE DRIVER API [RUST]" , "Marek Szyprowski" , "open list:DMA MAPPING HELPERS" , "open list" Subject: Re: [PATCH 2/3] rust: dma: convert the read/write macros to return Result In-Reply-To: (Miguel Ojeda's message of "Tue, 08 Apr 2025 15:34:12 +0200") References: <20250326201230.3193329-1-abdiel.janulgue@gmail.com> <20250326201230.3193329-3-abdiel.janulgue@gmail.com> <87ldsahlxr.fsf@kernel.org> User-Agent: mu4e 1.12.7; emacs 29.4 Date: Tue, 08 Apr 2025 21:46:47 +0200 Message-ID: <87a58qh1w8.fsf@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable "Miguel Ojeda" writes: > On Tue, Apr 8, 2025 at 2:40=E2=80=AFPM Andreas Hindborg wrote: >> >> But the `assert_eq!` would panic anyway if comparison fails, right? > > Previously the `?` generated by the macro would return out of the > closure written by the sample, and thus it wouldn't reach the > `assert_eq!`. Right, I see. So the question is whether we want to have the assert panic here or not, of we get an Err. I vote yes. Best regards, Andreas Hindborg