Received: by 2002:a05:7208:13ce:b0:7f:395a:35b6 with SMTP id r14csp18449rbe; Wed, 28 Feb 2024 10:39:05 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWh1glkQCeDZoL2WwYgxJOzdKU89EHzBVsStLYx90EwQLynds9Q9M1j+lRFLXjUWfTJRvzYHmKHuyj6XEJarXEuv3EqRKPju9olK7Fy8g== X-Google-Smtp-Source: AGHT+IGuRal9CRdP2d8Ol4lUaO5RPH72n4WBBcRMv3JFiTWbF07UUB1AONf+Vhy3wmhJrMO9Z2/8 X-Received: by 2002:a17:902:a70c:b0:1dc:5efc:8498 with SMTP id w12-20020a170902a70c00b001dc5efc8498mr249007plq.56.1709145544961; Wed, 28 Feb 2024 10:39:04 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709145544; cv=pass; d=google.com; s=arc-20160816; b=0r44fF1u3J6BwQGRP0kgcBIXMOJcdrxBjh12squJICkIg6kOMCuoNNn2N0aUvJj7Wd 43SAYAy5lIR77GWwyUwEX7DCs3MWPzkAuO3cfxFjLuX7HrOZpWs4AQdPeIUQL9+vZEqt HLVwmXXsvlkL3gdLr+LkhpCqF55mjgs9LWzeNvNv41uZN1ZEDTS9bSdsnEQfbgFn39kx 2dOiXBO3EPjLB0cfiiR0HAz/YAWDICF9Pmfr+CCViNYnevRAD9qEQqe/MDwAKGQwxWUO xMw/ekWEXxkWKT9uGVRLTrNe4OUQiWXwOZz3eN0hYEPAbi8G/qEKOMQVUNWcVZWFmyYr 2Qxg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:dkim-signature:dkim-filter; bh=Chw8fDCFwBt5A2/SvvRPqfWy1mLEboN1K9MXEuYd6OI=; fh=G0IZvvtf/ztzFnCEdRxSV6/Pn7VUTf6bZkwKwy6FH4o=; b=i1YDelxZVGFzk8wPJo6kVxRxEGML6s38sUMZ7z6u2ecnqAl+PnNlJkZ4N0eNCO7O13 /cgTwPIphrcX2XmbeGyu89oEtdctm7EXeEJIA8119eSuKJ8y+eMdolfuD6i5CJynYvCr E+3hukxo52CcWa4NYLWofvXAeiC9h23LmH1T6FTIOjEaoVg+UoaWY5o7gJm/DzRrCkOZ STxfT0g1Cy0BG8w+TKz+RuYu1qPsOGTp8lUtFHh+Ugn7lNnj9eXBBuBpVVGLTbTM4IEe BqKR6FyS6fRAwyi4W/iYR4+2k8kRgpPRmLB15okVAk+CN6sQMJdnartmdve5/C3syPbY QfSw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linux.microsoft.com header.s=default header.b=MikMP4IN; arc=pass (i=1 spf=pass spfdomain=linux.microsoft.com dkim=pass dkdomain=linux.microsoft.com dmarc=pass fromdomain=linux.microsoft.com); spf=pass (google.com: domain of linux-kernel+bounces-85534-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-85534-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.microsoft.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id b13-20020a170902650d00b001dbe4001529si3684121plk.214.2024.02.28.10.39.04 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Feb 2024 10:39:04 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-85534-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.microsoft.com header.s=default header.b=MikMP4IN; arc=pass (i=1 spf=pass spfdomain=linux.microsoft.com dkim=pass dkdomain=linux.microsoft.com dmarc=pass fromdomain=linux.microsoft.com); spf=pass (google.com: domain of linux-kernel+bounces-85534-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-85534-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.microsoft.com 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 sy.mirrors.kernel.org (Postfix) with ESMTPS id E78C8B2497A for ; Wed, 28 Feb 2024 18:29:28 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id AD5AC4086B; Wed, 28 Feb 2024 18:29:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.microsoft.com header.i=@linux.microsoft.com header.b="MikMP4IN" Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9580579B70 for ; Wed, 28 Feb 2024 18:29:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=13.77.154.182 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709144963; cv=none; b=SrZe9DlnE5Fmr/fs04VotHL1LPGhhn3rIsFkS5HbtxF8JiJmV4Hmk8pepRYlLOHkgFQoafWqSOAa31IFShESTk+fMwuqXC+DOsimBbAX8KzEFCxyGNUFADe7C+XkZRLYYO2d9WaOmXwYvr0zPI2pgiWJOOjFHOzG0zq2aXrkS04= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709144963; c=relaxed/simple; bh=MdA8+4QUymfCHVKe0K1EYHVaU3HSAX3ub09oN1E5DpI=; h=Content-Type:Mime-Version:Subject:From:In-Reply-To:Date:Cc: Message-Id:References:To; b=rMiv79sx1Jnppw1FqYdlcC8xRVABZ/NIKpSy8YDw49IbU2XyS4INuNx+DbLgOr4jq+P8wsB2/X2NqW6OMxYH69SKfj1aTlZVYvRXXqWrjkCX6PvuucjK36er0iYfEGJwQw6FN8FKKRv+oFxchoU67WWuo3/w+7EzSWUxGbhVx7c= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.microsoft.com; spf=pass smtp.mailfrom=linux.microsoft.com; dkim=pass (1024-bit key) header.d=linux.microsoft.com header.i=@linux.microsoft.com header.b=MikMP4IN; arc=none smtp.client-ip=13.77.154.182 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.microsoft.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.microsoft.com Received: from smtpclient.apple (d66-183-91-182.bchsia.telus.net [66.183.91.182]) by linux.microsoft.com (Postfix) with ESMTPSA id 33DB220B74C0; Wed, 28 Feb 2024 10:29:22 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 33DB220B74C0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1709144962; bh=Chw8fDCFwBt5A2/SvvRPqfWy1mLEboN1K9MXEuYd6OI=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From; b=MikMP4IN9+2kuC8k57Ae1slPMHZ7L1RSuUPkQzhMTBifzEHDXWUHvFJUY8ZGQW6+5 xNLDMNkQl2wxtCK/R697sSOg5taA+3fcEH3GM2px+oSr9+Bb6aZYWYk30EibooJFFJ XH8i5oFXmPWBXSXBZh3YM1yKMiixpTt67KkGjdpc= Content-Type: text/plain; charset=us-ascii Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3774.400.31\)) Subject: Re: [PATCH] kernel: Introduce enable_and_queue_work() convenience function From: Allen Pais In-Reply-To: Date: Wed, 28 Feb 2024 10:29:11 -0800 Cc: jiangshanlai@gmail.com, Linux Kernel Mailing List Content-Transfer-Encoding: 7bit Message-Id: <630C383C-1A60-4929-9E04-39135EB9AC90@linux.microsoft.com> References: <20240228181850.5895-1-apais@linux.microsoft.com> To: Tejun Heo X-Mailer: Apple Mail (2.3774.400.31) >> The enable_and_queue_work() function is introduced to streamline >> the process of enabling and queuing a work item on a specific >> workqueue. This function combines the functionalities of >> enable_work() and queue_work() in a single call, providing a >> concise and convenient API for enabling and queuing work items. >> >> The function accepts a target workqueue and a work item as parameters. >> It first attempts to enable the work item using enable_work(). If the >> enable operation is successful, the work item is then queued on the >> specified workqueue using queue_work(). The function returns true if >> the work item was successfully enabled and queued, and false otherwise. >> >> This addition aims to enhance code readability and maintainability by >> providing a unified interface for the common use case of enabling and >> queuing work items on a workqueue. >> >> Signed-off-by: Allen Pais > > I'll apply this together with the rest of the series once v6.10-rc1 opens. Thank you. Meanwhile, I will go ahead and prepare the conversion with Based on this change. Thanks. > > Thanks. > > -- > tejun