Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp7913571pxb; Fri, 19 Feb 2021 02:38:40 -0800 (PST) X-Google-Smtp-Source: ABdhPJxrhnVPbXQNtX+Z2bZnoJ4wu5Sn6QyDMrqgp5uwyTC1NR/nX8H+1stVHmzihF4idGUD6YD1 X-Received: by 2002:a50:da4f:: with SMTP id a15mr8304355edk.301.1613731120159; Fri, 19 Feb 2021 02:38:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1613731120; cv=none; d=google.com; s=arc-20160816; b=JlP6RUjFKzO3oqt6n6mhm1knICDIV9Jkqu1fly6Jut+EPbOhRknsozRpR9TAxGi8Gl bTxbKCaFzwYBSPQHDJ+ht//wti7kwMpiudjgcnFmduK5vhgPrslzAQfna68H6jAyMTXn N5BJ/UJ5abqksF1Jra8GsQUX6E6TTozYKoJ9PxKV5Z28htz/AyhOs86NE+K34H3RyN0P iIXbF+0sNdatt9GrHhFLtqKMwnqbTA0DO5/+pP5SCNnxNeSCEttfYFCI5IGmsiW1LSW3 1VGQLdfltTPOhnB3hI4/A88Le6/YedGqOru+lExrIUpJinZQvTGS9+lj93oRXIWzamin Pfhw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:user-agent:date :mime-version:references:in-reply-to:cc:to:reply-to:from:subject :message-id; bh=nTn6ZavwiX+iUA/fKHbxz6oGLOlCA6cVyQWgY9ZgZLg=; b=pAsbY1td1k4qVybgkmAntlZ9ogqRr5rzI9q12N5Gn1jqko5/WRCMeGYQSdx3rDIixR DabD1OYLOJL73Jg9RM5kQbKxGkBzN4NGYznHBm/UA8NpxDAqm37Woo9ItzIWtDf13Udh PEdrkDnQ4+NZqp2Rz1ggHzO9g+60EaDXENEcW5E3kmOTMXvCqPn7+Gpx1KwQyPPni2p3 qabAxJDfmTr/FD8hwicKzCOzciCMPHe+QjoVvGe4sRx5MX0TxD0I4TLh2CaBYzHD6w5Q 0rY6dHe3I7WxbMkmnDYx+xDlED49FSy3nDiJ/LQeWI1FiZZjdTGFrgDd+qFPB8Oul2ng 2sLw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j19si5979538edw.550.2021.02.19.02.38.14; Fri, 19 Feb 2021 02:38:40 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230009AbhBSKgu (ORCPT + 99 others); Fri, 19 Feb 2021 05:36:50 -0500 Received: from mail-lj1-f181.google.com ([209.85.208.181]:38274 "EHLO mail-lj1-f181.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229527AbhBSKgl (ORCPT ); Fri, 19 Feb 2021 05:36:41 -0500 Received: by mail-lj1-f181.google.com with SMTP id j6so17651396ljo.5; Fri, 19 Feb 2021 02:36:23 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:subject:from:reply-to:to:cc :in-reply-to:references:mime-version:date:user-agent :content-transfer-encoding; bh=nTn6ZavwiX+iUA/fKHbxz6oGLOlCA6cVyQWgY9ZgZLg=; b=QOxCjO3HH+ADPyELPS+QSf9+cI77RXwHBMsIBsKkHVDB365VpD5Uuok1Qfiv4bMpwB HEe3djJNrFMYB9dTScQbG4C5Ct+SpT0YxxK3lPo+C3VXugWnqh5ygmnEcmbSFYKDH/rH HXhXKtbxq9j7LE+8EdpvO/rP4w4747SdT/D80t1AzypXTSz16XrSwIiHWtyjmBd0QNHn lh4bsc2viQa1MGo6BOLSo2BpkkdrFvBC+rexNHGLgJP5mz/U+xwhZCKvDKhwvOmk9pJh VNfFCMsp6nk3vdxWbOL8E65r5WWIxjH5AQvQn5S5ckOQ7te3fGn0nW1IuaGfIt6X+I9y 8KDw== X-Gm-Message-State: AOAM531kmq5iyUW/yLN/BbtHuU4uNSrs3eNHj2sJt2saEZpouWt9w7/N 9fzjFuShVF/0R4gaHhVcqSw= X-Received: by 2002:a2e:7c02:: with SMTP id x2mr5110440ljc.247.1613730958187; Fri, 19 Feb 2021 02:35:58 -0800 (PST) Received: from dc7vkhyyyyyyyyyyyyycy-3.rev.dnainternet.fi (dc7vkhyyyyyyyyyyyyycy-3.rev.dnainternet.fi. [2001:14ba:16e2:8300::4]) by smtp.gmail.com with ESMTPSA id q3sm882433ljb.64.2021.02.19.02.35.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 19 Feb 2021 02:35:57 -0800 (PST) Message-ID: <468a5c7820a510b8a12c10b1b8a107fb41e9d26c.camel@fi.rohmeurope.com> Subject: Re: [RFC PATCH 0/7] Add managed version of delayed work init From: Matti Vaittinen Reply-To: matti.vaittinen@fi.rohmeurope.com To: mgross@linux.intel.com Cc: Greg Kroah-Hartman , "Rafael J. Wysocki" , MyungJoo Ham , Chanwoo Choi , Andy Gross , Bjorn Andersson , Jean Delvare , Guenter Roeck , Hans de Goede , Sebastian Reichel , Chen-Yu Tsai , Liam Girdwood , Mark Brown , Wim Van Sebroeck , Saravana Kannan , Heikki Krogerus , Andy Shevchenko , Joerg Roedel , Dan Williams , Bartosz Golaszewski , linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-hwmon@vger.kernel.org, platform-driver-x86@vger.kernel.org, linux-pm@vger.kernel.org, linux-watchdog@vger.kernel.org In-Reply-To: <20210218162821.GP154917@linux.intel.com> References: <20210218162821.GP154917@linux.intel.com> Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Date: Fri, 19 Feb 2021 12:35:51 +0200 User-Agent: Evolution 3.34.4 (3.34.4-1.fc31) Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello Mark, Thanks for taking a look at the series! This is the first time anyone has been commenting on a cover-letter which is likely to fade away and never be looked at again. Guess you are a thorough person :) On Thu, 2021-02-18 at 08:28 -0800, mark gross wrote: > On Sat, Feb 13, 2021 at 01:58:17PM +0200, Matti Vaittinen wrote: > > It's not rare that device drivers need delayed work. > > It's not rare that this work needs driver's data. > > > > Often this means that driver must ensure the work is not queued > > when > > driver exits. Usually this is done by ensuring new work is not > > added and > > then calling cancel_delayed_work_sync() at remove(). In many cases > > this > > may also require cleanup at probe error path - which is easy to > > forget. > > > > It might be helpful for (a) few drivers if there was a work init > why the (a) and not just a? I am not sure how many drivers are needed to change it from 'few' to 'a few'. Additionally, this series converted only the drivers which I found could easily get rid of the .remove() - I did not analyze how many drivers would benefit from this by getting rid of mixed devm/manual resource management. So to sum up - I don't know how many drivers will benefit and what people think makes 'few' to turn to 'a few'. '(a) few' leaves this decision to readers - and (a) few of them know the drivers better than I do. > > Main reson why this is RFC is that I had hard time deciding where > > this > > function should be introduced. It's not nice to include all device > > stuff > > in workqueue - because many workqueue users are not interested in > > devices. In same way, not all of the devices are interested in WQs. > > OTOH, adding own file just for this sounds like an overkill. > s/own/one Hm. The 'own file for XXX' does not make sense for native English speakers? Didn't now that. Thanks for pointing it out. I will edit the cover letter when I respin this rebased on v5.12-rc1 - and it is likely the series v2 will add this function inlined in a new header dedicated for devm-helpers (as was suggested by Hans de Goede). Best Regards --Matti