Received: by 2002:a05:7208:13ce:b0:7f:395a:35b6 with SMTP id r14csp11107rbe; Wed, 28 Feb 2024 10:24:39 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUvZieKO6/z7djkR7FahyikREjxZpC0LoFjTYRzqJEe0r1RUpJ+W4ZljllXQPHt5eL4IXYnoJxcT6i54IstGiaQd67P4tbm0Is1z5SsMQ== X-Google-Smtp-Source: AGHT+IG7Tey5/rIV2+rQcRT1ZT1UNGOvISYUOfKPZb1+V0imSdZ70t/B3WFeVZfRb2NiSRSYqv5J X-Received: by 2002:a05:622a:19a9:b0:42e:5a82:2965 with SMTP id u41-20020a05622a19a900b0042e5a822965mr15717510qtc.34.1709144678988; Wed, 28 Feb 2024 10:24:38 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709144678; cv=pass; d=google.com; s=arc-20160816; b=FYWsSYWh1LBOwe4/8fqx38hAbSdij1ana5+e/J3fYF/a7HNZVigGsqW6y4e18BBQ+7 j/+eBguyOIo4w2cBbuZMe+lw47p1W2q+dYG5de7dD7TROQZZA8Q2cNEihjYtq+K+0+Hy Zew7ajRVPIc9c0y9nOjeaIja/OJs4Hxuz/yJrFHmY+WgfvqeXJPTSB97YyW2EISSPrEZ mt0aYfneGmdKYI7J8kIjULY/ZpRm302EQJ718SbLl3zC3A34Y70xC+vt8V4LSG9u4lJZ VAGg+KZUXsZiAOjll55BtxCZq8GanEn/6JgvQaX2Pwh84t6Yq3JFTf503uhEkgD1IitQ EU8w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:sender:dkim-signature; bh=3weX12Jydvw2iQSNrmeDVigxrB3bIIY4H0E1E8jahR8=; fh=cI+LxUQuxw0XY7V13PItAKKthDQy6mPtCAIutMl6sRw=; b=tFmFEcP9vh4yPklgQ4WgrE9VVVrYXwa0Yq3CFSg0QCndEmuznSFvk1aJ/4MEK9Bfpf Xfh2zFkki8w1VpmVKnUzTgnI5QNVNXpBcJfQTR7SGsHb8l0vyS0nh7IPM4r9vSBjQoZD iyVacD+nHCYkQQueu+TU268etltZ22PCgw7gB5f3xNq+Fm4EBf6FKJNv/DYI5/eI3YIc hbHG8AceKRwWtf0EQfzhC8DuGm4ajGdTRCbqWD/ORBrKYSzJw0WDMfIQal2UQgC8IZaY JYVqM9HWjou/txiaLBkUKjrf1xSuF3dH19FA/7JlzHk7FkMev9QY2vceCjgOj9UDJE+g AwHA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=L54GeCTc; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-85530-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-85530-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id f16-20020ac84710000000b0042daa920d4esi9573516qtp.305.2024.02.28.10.24.38 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Feb 2024 10:24:38 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-85530-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=L54GeCTc; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-85530-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-85530-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id B7BFB1C22769 for ; Wed, 28 Feb 2024 18:24:38 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1B41B40862; Wed, 28 Feb 2024 18:24:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="L54GeCTc" Received: from mail-pl1-f180.google.com (mail-pl1-f180.google.com [209.85.214.180]) (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 CD84A40846 for ; Wed, 28 Feb 2024 18:24:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.180 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709144675; cv=none; b=GRD41v7s+hjbnpceVvqntuM0+KZ0YJuQYsNwy3x3t5BUI9PFEd7XNtFmazDPniafCiaYevlBdVdFiuKFiwNVbQtpZRoUJuoASj6RPqJgA70r3gGTF6EkM70mNyfaI7lw9OfLV4go+tcK/f8l7aZMUv29rqVIKUDxFbqpUFNk3jw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709144675; c=relaxed/simple; bh=KLVHgL9DGtOA1LZ4QpgI7es0AHDvgKX2wiD5ghdJhTg=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=qRmf3ygE2i4tIuLeHI01KVVU9j6ujDPuApjC5PY6TT7Bl/ll+wkP5bIKQrq5wsJqhBMhMZm5prBV3648fldw3jvu02BHtbFhBfSmCBjqXulL6bBYjhsXOTB4a2iqznLeU84Qzr089SnQ2/dvCVHBtUekzCvd4LciQWKn0PJjvVU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=L54GeCTc; arc=none smtp.client-ip=209.85.214.180 Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-pl1-f180.google.com with SMTP id d9443c01a7336-1db6e0996ceso738015ad.2 for ; Wed, 28 Feb 2024 10:24:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1709144673; x=1709749473; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:sender:from:to:cc:subject:date:message-id :reply-to; bh=3weX12Jydvw2iQSNrmeDVigxrB3bIIY4H0E1E8jahR8=; b=L54GeCTcj328PzK+aQLR0zwNXV/WhIGYYLpJk7/USx7/8N6kVYlX3ycYN3MO7HvG2o O0ftuVGFK/yv5abtMbdeiQdOwpKGMMLhq727umvr+kyIFidzU9DwM9JiYcwozoVy0rYu PwnRGiPyXJWYEIa7j3L72KZl1dME8h7KnOAFLnVq3tayX9gKYj0LpgDgSQNyyIeUJgvK b8y0l8RxCjOUQWgWjH7lhIJgWP6W5kQgL7H6om1NQSbNgYzTwVB0e8Th0ihSwasdkYNw OIDsCMCXq9EgC7ioUJmQ4FZOLkCUivOcb4E8nG6zj3ZVkDcClCYUmiEXp1KG+flgE/QQ vi/A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709144673; x=1709749473; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:sender:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=3weX12Jydvw2iQSNrmeDVigxrB3bIIY4H0E1E8jahR8=; b=se9lIVP3uAyBNqVdSLw4Lm+QRMO2juh8fBpgiESh6Cr/XrxA70hcxPtiUuNF6S1ehR hG8XWUazZrHRFy42rTbboP+eenyjvwIanNM8YjaYvnB5sAVPNj3k0PeAKfaM7Yw18Lzk EVRkygwxxMXo8nt87AvHbkOWrE6za7BVZWc+BgZph5sV/vID+l7LwhZvrWF0Q911n0lR Xw9usd68FWFxDmk1ATtLcA5lWOLCzW5Ljx3dD128ZVU3IjkLYDJRNQGOsbYzzCIrv3/2 uEfEBVaTCSBOaJY/ThJ1KBe84qZIVA+UqA3HINSvJ8G5oTy96QNzlbxw9TBx7exQkWHW Vz1w== X-Forwarded-Encrypted: i=1; AJvYcCWhcpRNFVPtIgumxhi/8RGt2u+IeOcOVLuIIZBdjyBdMdjdmngtM5JPKzhFYGmyfqQU/Up9jqDXL6Wdeam0zbr9/iEg0c4oBGlflFjq X-Gm-Message-State: AOJu0YxiX+g9ESAqvYY+CVkpx/8ZW+bQ9FQoRhtIEaCRT6Hl98Qh6M3x 80BsrPulk7fkkDAJhbtSLnUSAfO4GW+/GThsPdYYqgrhYf4th9YV X-Received: by 2002:a17:903:98b:b0:1dc:af71:29fc with SMTP id mb11-20020a170903098b00b001dcaf7129fcmr358384plb.6.1709144673126; Wed, 28 Feb 2024 10:24:33 -0800 (PST) Received: from localhost ([2620:10d:c090:400::5:8305]) by smtp.gmail.com with ESMTPSA id kn11-20020a170903078b00b001d6f29c12f7sm3597240plb.135.2024.02.28.10.24.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Feb 2024 10:24:32 -0800 (PST) Sender: Tejun Heo Date: Wed, 28 Feb 2024 08:24:31 -1000 From: Tejun Heo To: Allen Pais Cc: jiangshanlai@gmail.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH] kernel: Introduce enable_and_queue_work() convenience function Message-ID: References: <20240228181850.5895-1-apais@linux.microsoft.com> 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=us-ascii Content-Disposition: inline In-Reply-To: <20240228181850.5895-1-apais@linux.microsoft.com> On Wed, Feb 28, 2024 at 06:18:50PM +0000, Allen Pais wrote: > 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. Thanks. -- tejun