From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f73.google.com (mail-wm1-f73.google.com [209.85.128.73]) (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 5AE0F257423 for ; Mon, 16 Mar 2026 09:27:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.73 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773653261; cv=none; b=XiQS2kdcOqNhGqXPXc8J7WjK0FPC7EuMep6oxj6NmqJNE6rZPLuLNxTJ0UGslP0NWGn6Ntg803McEkjnTdCWT41DQtBQGR6S2wySj/RnN8bZ7ROGBI2xOGYdgmxK84UjbfeAIfSLvZ8Kcy8RQIit8YL/tLaPpVkFPp9elJIjAgA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773653261; c=relaxed/simple; bh=fG/m/7watyEcbnXXgUUvv88DMlrRh0CMAuXRlm9LWmU=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=aUur9v6J3kZeP1Nx65yEBWfs6R01BwAkJgwOY1NJzkBWRC7e5eX9AlJweuxUyzJe6VbKl9XQYnC+39t6VSfc6uC/DG8RL6jTrBJYbIOHPyPm0UXk/BBNUSXbwXRuogEhkaBM5aU4jJOhcgPZrnI8Hda3vHmuDIYyHWbu94kvmCo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--aliceryhl.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=ImwZ6zht; arc=none smtp.client-ip=209.85.128.73 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--aliceryhl.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="ImwZ6zht" Received: by mail-wm1-f73.google.com with SMTP id 5b1f17b1804b1-485345e2fdfso23654835e9.2 for ; Mon, 16 Mar 2026 02:27:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20251104; t=1773653258; x=1774258058; darn=vger.kernel.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=7q6QzcmG6dxnzbKj8eqJeASThBGQ4nQR5hfoFgOE7Lk=; b=ImwZ6zhtkxAg1VMUevaTo0kja1miEFr9LvFz41rvWgv6MS875qMBO3P9zGO5M1HQzv 2l1mz8eINjBTla0VQZzDO4SfhHRiPhehuq9qUd/mBBvQ0RTHmHtfwY2FMLgjbPIVV35w jknzjcNOJBAjO1I13jZa2OLhGKKJU3UJiD+Hc8lpEnTqzNktnYQpqMxm0Waj3v5KDlMX a59MtA8zM5cPcA+c2uOqfxu3fBskBpNRkHozn4gduiSirZbVLUoOoJWBG12uAsWwDE9N 0aar0dSChJ7egQ56mAlxZtFT9KZtxGchf3WuIRhvQMVF0X1FS5vqjezaL5wS3Eh0UHgq mIpA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1773653258; x=1774258058; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=7q6QzcmG6dxnzbKj8eqJeASThBGQ4nQR5hfoFgOE7Lk=; b=NdPUD1m1evT4Z4r7zcyAdC61IqMT7YMLvHuwCAIj0zs5NfIDSa+5RlXlAB6YrJ+EKq W1XuonKxwrVMlqvgLIwyawOWaD8jMk3CpUZhacOh0dkXjrsff6oZK8ktSsTgFSKMMr56 9QgDiItItTPRHCTPY7HL2pPUSsvIQZ6Q4z16h9x5ntZdilA0HhakGFBCITrnuSBzc2vz xzjy2w+gMP5TF+XLctd8N2DzRm+5yR3/xo9LqgvpVjETdQukfs/HOCfvN0HRh09LItZe zaOmtbmWggTqynOgzfv8tCBoIO5Ro98B3W9Mr7XKIUbcSoMaVq1mjcBgrqr3qrpJN3bX 4DVw== X-Forwarded-Encrypted: i=1; AJvYcCVJV/Zqy1svSzNKHdZABHqbJI+9Bkm3/IlWK6SPJ/ziwG54hZjD6T4u+/ullUe3V3sg/5KNHWGNngS8W2Q=@vger.kernel.org X-Gm-Message-State: AOJu0YywJkhrHX0NswJl8KGnna4l1eM/GM+z1RQdHUIa4HxBrk4lSO1o GUWn5TMxq/YsrJhVsOxwFJ5zceR+maierxkJZqiR/Qr2xxPPQYj/WH1PjFTYHefm5niojDldfW4 AOquKEQoQ4FleL1wQig== X-Received: from wmbg26.prod.google.com ([2002:a05:600c:a41a:b0:485:385e:a8c1]) (user=aliceryhl job=prod-delivery.src-stubby-dispatcher) by 2002:a05:600c:c0d1:20b0:485:3abe:ab86 with SMTP id 5b1f17b1804b1-485570ce1cfmr145458085e9.4.1773653257588; Mon, 16 Mar 2026 02:27:37 -0700 (PDT) Date: Mon, 16 Mar 2026 09:27:35 +0000 In-Reply-To: <20260216-rnull-v6-19-rc5-send-v1-4-de9a7af4b469@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20260216-rnull-v6-19-rc5-send-v1-0-de9a7af4b469@kernel.org> <20260216-rnull-v6-19-rc5-send-v1-4-de9a7af4b469@kernel.org> Message-ID: Subject: Re: [PATCH 04/79] block: rust: fix generation of bindings to `BLK_STS_.*` From: Alice Ryhl To: Andreas Hindborg Cc: Boqun Feng , Jens Axboe , Miguel Ojeda , Gary Guo , "=?utf-8?B?QmrDtnJu?= Roy Baron" , Benno Lossin , Trevor Gross , Danilo Krummrich , FUJITA Tomonori , Frederic Weisbecker , Lyude Paul , Thomas Gleixner , Anna-Maria Behnsen , John Stultz , Stephen Boyd , Lorenzo Stoakes , "Liam R. Howlett" , linux-block@vger.kernel.org, rust-for-linux@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org Content-Type: text/plain; charset="utf-8" On Mon, Feb 16, 2026 at 12:34:51AM +0100, Andreas Hindborg wrote: > Bindgen generates constants for CPP integer literals as u32. The > `blk_status_t` type is defined as `u8` but the variants of the type are > defined as integer literals via CPP macros. Thus the defined variants of > the type are not of the same type as the type itself. > > Prevent bindgen from emitting generated bindings for the `BLK_STS_.*` > defines and instead define constants manually in `bindings_helper.h` > > Also remove casts that are no longer necessary. > > Signed-off-by: Andreas Hindborg It'd be ideal to change the C header to use an enum, but that may not work as I'm not sure you can specify the integer width you want for an enum. Reviewed-by: Alice Ryhl