Received: from flow-b7-smtp.messagingengine.com (flow-b7-smtp.messagingengine.com [202.12.124.142]) (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 C96403AE185 for ; Sat, 1 Aug 2026 02:50:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=202.12.124.142 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785552620; cv=none; b=FYtJQPWlo8jaxFFXDOF9DJdLfPD/HYIxr6GcDpK4R5ZcRT5hceufVN5yEDG4Yz/cNEI7Vu6KBC7iKGiwejnFgSLujgBwjulMKs4afhPQuz3LBd/GG0kva5BDSybdDe8/0Qi6Wt9vIx9che7CRG1PKihIbJerqLvLpB0yEgZUCrk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785552620; c=relaxed/simple; bh=vB6+xPNPh4BSLPkTslslKfbNJbUmfurGhlrgFHGsqGg=; h=Date:Message-Id:To:Cc:Subject:From:In-Reply-To:References: Mime-Version:Content-Type; b=JaN8qkrgqP8W5FQILYTWTLjxHOIqDXbUpZUq09vzf2BAX+WyeaD00KdKPaF4gruY4+p3NnA/mUUrzYQl9dJr6htVAgEN3xHdxfE1wV4CuqrSU7JV6TF5lKw24ziG8xn4/YhfRQZEAoVAeHtrvvD956Hj8MYhFtJwnpzG9GjQ/2A= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=flapping.org; spf=pass smtp.mailfrom=flapping.org; dkim=pass (2048-bit key) header.d=flapping.org header.i=@flapping.org header.b=i1QtMXVI; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=o/s+763/; arc=none smtp.client-ip=202.12.124.142 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=flapping.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flapping.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=flapping.org header.i=@flapping.org header.b="i1QtMXVI"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="o/s+763/" Received: from phl-compute-04.internal (phl-compute-04.internal [10.202.2.44]) by mailflow.stl.internal (Postfix) with ESMTP id 2BC551300119; Fri, 31 Jul 2026 22:50:16 -0400 (EDT) Received: from phl-frontend-03 ([10.202.2.162]) by phl-compute-04.internal (MEProxy); Fri, 31 Jul 2026 22:50:16 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=flapping.org; h= cc:cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm1; t=1785552616; x=1785556216; bh=jDyGZFCuEenEm6juqZjLr4hSsbJRYPYkYg6LYEc4AOs=; b= i1QtMXVIxTdUwvLNZnZKWjC96fDiaxSHfjYETvzxqlqaKJP9tXN96eOoQkK8N9HJ Ndj5HY+C9+7PVAHv2udOUbSUQcbm7+Nqfl8F4E5s9Fq2gdhwgFOpus0LTckvpY25 CWEX5GBsDlI2pVQADf2IJ/VXgqVP+VrR/X2r3rFfiGRYu+aVx5Zd5uYhnXkwXpZK dBJ0Kup1k4OQSSWNoczSqjXIBD+A0qbFyHwgLPBypp1h3hdC+jNI1nule7zBhU1a pFbPyOFvMSJQ915LsbqRVD7hJfEM7o7ByOKuVOeWfZNlDgazwVvsp0u/n29xg3x3 4eu1RInV19Gnzw5gjAS0ug== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t=1785552616; x= 1785556216; bh=jDyGZFCuEenEm6juqZjLr4hSsbJ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ME-Proxy: Feedback-ID: i51fe4b43:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 31 Jul 2026 22:50:11 -0400 (EDT) Date: Sat, 01 Aug 2026 11:50:09 +0900 (JST) Message-Id: <20260801.115009.962811080870881264.tomo@flapping.org> To: gary@garyguo.net Cc: tomo@flapping.org, ojeda@kernel.org, a.hindborg@kernel.org, acourbot@nvidia.com, aliceryhl@google.com, bjorn3_gh@protonmail.com, boqun@kernel.org, dakr@kernel.org, daniel.almeida@collabora.com, lossin@kernel.org, tamird@kernel.org, tmgross@umich.edu, work@onurozkan.dev, rust-for-linux@vger.kernel.org, fujita.tomonori@gmail.com Subject: Re: [PATCH v1] rust: bug: prevent dead_code warning from warn_on!'s flags constant From: FUJITA Tomonori In-Reply-To: References: <20260724.130853.1719089301624801198.tomo@flapping.org> Precedence: bulk X-Mailing-List: rust-for-linux@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit On Fri, 24 Jul 2026 14:23:23 +0100 "Gary Guo" wrote: >>> Also, the proper fix would be to mark it as used in the `warn_flags` macro >>> that discard the expression. >>> >>> if false { >>> _ = $flags; >>> } >> >> >> Yeah, having the callee that discards the argument consume it is more >> logical than working around it at the caller. I'll send v2 shortly. >> >> The same reasoning applies to `$file`. Since there is no warning right >> now, I'll rename `_COND_STR` to `COND_STR` and consume `$file` in a >> separate patch for consistency. > > Given that this is closely related to $flags I'd do it in a single patch. Ok, I've just sent v3.