Received: by 2002:a05:7412:bbc7:b0:fc:a2b0:25d7 with SMTP id kh7csp381953rdb; Thu, 1 Feb 2024 11:06:58 -0800 (PST) X-Google-Smtp-Source: AGHT+IFwd/6SxanVyGsNFOITFJ/qKNx6+bVC909MlPrK7Zu9qIw1D0fwJOJgN2AozXrknGLs7V2X X-Received: by 2002:a2e:8e81:0:b0:2d0:72c0:d5c0 with SMTP id z1-20020a2e8e81000000b002d072c0d5c0mr2207495ljk.27.1706814418772; Thu, 01 Feb 2024 11:06:58 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706814418; cv=pass; d=google.com; s=arc-20160816; b=KcdEoF4GBKvAnSHMPuSz52FFg5dCDIgTDdxfRiBaLtDtK766dcOP9iCcTaRtAdvD4k 7zPIaZ6B8CgmUN59cvtnTxGx/dULk4XUP2WpXCGQ09pv6zHACQJuH/2X68Ij/usnmiYq p/xwrEZUOxth13KfjoXD/VkJ9bLrDsOWuaudw5uFwdTiCOa+u9FWZ6l0H6413L7cMSXX 7WQXfzbPsor1wL4b7zVbzxzb9aLMWsXRhF8osHeCeDcFWCQ7vBlCtF+pMVe9kgRcoHef nJNqkuOY1SF+qQqIuPsYupb5Xud4eRFDFiT/wP4faKYQUxojnyNFbeTwPMhKHkgT6crO eU8Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=FE7btJtNkKKlj4+Acuiweg//JjBqWYQhsOXxCGd7u0o=; fh=xzW0lsyq7JCIsTzdKLYypVJHZ+unnD0xa9WB4oJ1Nmk=; b=f23O7iqWR8Fijv8b9FXnK3Kt6ia6KNklc4fR3yAwoKtKvJO0EaBNgMoJvLAb9lIWr6 x4GPN2Lu7rI3zJkR0iWJIasHOM7VKQTxHj1Ik+VdrUgKjAdDjFXvg/fjVVXwZTnECXGQ yaK9D+xPQUz36aIAAl3XFRNpmaQ07u/LoR/5bHGa+ZLKlUfgaNQscArVp1wFd07NmAHx puBc+ddseSk0Fprfgs6XXRWhY0pNOPsmwoVYw97z7osFny1Q7ZUzIpaudF1Ve9FZEEYH tD9xQsDFiRUa2zZAZmNH+myKgkNzzbNyJJpEL9bCz7e0llOuUAkQhk0vsQYRjtajnEl5 SmTw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Z4riNidI; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-48744-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-48744-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org X-Forwarded-Encrypted: i=1; AJvYcCUS+bTnq1Bxv0ZRrmjeNxhWr0We6s4P3dXVW5/tIhKWuc9kqE5DBlZnuFR5CgokxGWw0tswsu+fO3+85ZU1bEgC7VUcD2y2bGOtj/aYFQ== Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id c23-20020aa7df17000000b0055f4ac3af93si74363edy.606.2024.02.01.11.06.58 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Feb 2024 11:06:58 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-48744-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Z4riNidI; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-48744-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-48744-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 687ED1F269C6 for ; Thu, 1 Feb 2024 19:06:42 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4B3808527B; Thu, 1 Feb 2024 19:06:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Z4riNidI" 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 61E4084FD3; Thu, 1 Feb 2024 19:06:31 +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=1706814391; cv=none; b=togpDCXSPCHhSRfIXoXEIDE1GoX0T0xr564zfsSqfCfEoC1mIvqjgxgq//trzy+v9yimSNgwnF5u+z0vX289aU+iFWrKrwfus1+F5YKlwBmKzNmU4+rstHhloolQVChGYAG3V+i6x6Te/Zg7JGh8aQ0McgkQ6bV/uQefq209tfI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706814391; c=relaxed/simple; bh=UFdbdYDvAPWYwEH4H+sTZoi40RASTnVr7NExWeWKa1U=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=F35IsFe0FsfrYDMQZwrVaXMp1q/CG6+bc6lFDvrSQOusP/tQHomxIFCaWZAUganb8+WOE1b/GWjgB2poGhgy4VHBtZ6FDvxUsE9B3UrQYi6QTXDZI3SFBD8EoY2IFBc92CCxIkS/4cVqnySagta6SaBwif8TDOwIdkaR1lplLbE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Z4riNidI; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 23094C433C7; Thu, 1 Feb 2024 19:06:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1706814391; bh=UFdbdYDvAPWYwEH4H+sTZoi40RASTnVr7NExWeWKa1U=; h=From:To:Cc:Subject:Date:From; b=Z4riNidIswR8n6TXHT54Ikr2ScCpXEqZyrIJ8CiRqcwUQ/a+p+xXndyM8Tj2X3W4+ vIxSGDhVdiLH7BHuNzT6dcvSpy/SnwWTV2mG7+SueQYA8Kb8fwAxvkU0WW6yR3M79l r2xVdM9/C+bnLoneQj8eFEqhRdaAl+/pONbzRdAKFVDAliTSfmB8iQN2nS9k3lBtVH 7TDEpMbrOEza9WYDsqh+Vy5p9LYz1tbOlD5gEKOV+TECRGAbUsBzCByWK60LB3sizx 8Vwa2R+j+NbQzt5Jx0yASbufk5vMEKNnNje8hCqGIclhXrjAm/emqmszdHk+XwIHMu VE4nxwhJ5H9Fw== From: Miguel Ojeda To: Tejun Heo Cc: Miguel Ojeda , Wedson Almeida Filho , Alex Gaynor , Boqun Feng , Gary Guo , =?UTF-8?q?Bj=C3=B6rn=20Roy=20Baron?= , Benno Lossin , Andreas Hindborg , Alice Ryhl , rust-for-linux@vger.kernel.org, linux-kernel@vger.kernel.org, patches@lists.linux.dev Subject: [PATCH] workqueue: rust: sync with `WORK_CPU_UNBOUND` change Date: Thu, 1 Feb 2024 20:06:20 +0100 Message-ID: <20240201190620.18064-1-ojeda@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Commit e563d0a7cdc1 ("workqueue: Break up enum definitions and give names to the types") gives a name to the `enum` where `WORK_CPU_UNBOUND` was defined, so `bindgen` changes its output from e.g.: pub type _bindgen_ty_10 = core::ffi::c_uint; pub const WORK_CPU_UNBOUND: _bindgen_ty_10 = 64; to e.g.: pub type wq_misc_consts = core::ffi::c_uint; pub const wq_misc_consts_WORK_CPU_UNBOUND: wq_misc_consts = 64; Thus update Rust's side to match the change (which requires a slight reformat of the code), fixing the build error. Closes: https://lore.kernel.org/rust-for-linux/CANiq72=9PZ89bCAVX0ZV4cqrYSLoZWyn-d_K4KpBMHjwUMdC3A@mail.gmail.com/ Fixes: e563d0a7cdc1 ("workqueue: Break up enum definitions and give names to the types") Signed-off-by: Miguel Ojeda --- Tejun: here is the formal patch as you requested. Please feel free to either take it or to rebase to fix the old commit. Thanks! rust/kernel/workqueue.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/rust/kernel/workqueue.rs b/rust/kernel/workqueue.rs index 498397877376..d00231e18007 100644 --- a/rust/kernel/workqueue.rs +++ b/rust/kernel/workqueue.rs @@ -199,7 +199,11 @@ pub fn enqueue(&self, w: W) -> W::EnqueueOutput // stay valid until we call the function pointer in the `work_struct`, so the access is ok. unsafe { w.__enqueue(move |work_ptr| { - bindings::queue_work_on(bindings::WORK_CPU_UNBOUND as _, queue_ptr, work_ptr) + bindings::queue_work_on( + bindings::wq_misc_consts_WORK_CPU_UNBOUND as _, + queue_ptr, + work_ptr, + ) }) } } base-commit: 15930da42f8981dc42c19038042947b475b19f47 -- 2.43.0