Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3150585pxj; Mon, 7 Jun 2021 03:44:30 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx1dQLSi5Z7OJlGr11/Mt3mCPr2lUz2wUtaOtA+DmsOGvMp8jIWI791kSXkB6ITBnGzl/zk X-Received: by 2002:a17:906:394:: with SMTP id b20mr17224664eja.108.1623062669912; Mon, 07 Jun 2021 03:44:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623062669; cv=none; d=google.com; s=arc-20160816; b=iV46KO8IYwaaO35KYSjSv+oExYmGobFtVUD1ejwhEA5AqKBnrtfcljyRWUFqC1nRak EdQVISrazSaoO9UlcuWUa6gs8cOYM/PBbAttvuTggjGt3XONcfyAKGcumsV0rvem6i6O pF8JgC0ZFAky8iZtXD24tNlxQkO8F+04NIWw0DBe/laben4QmeYB7XaqB/aHPCKjhWqu 3Oxe2nxWzWNS2s62bm57v9S7KgbGfwbgh1lyqR8eGcNNve0DFP4gcddn/k998VIIZaL3 2qsSt5ksfDv6DOa1/ng6MhAJv9Z/TDKKix+e7sPp9s8SG45GH7WzgEjCXF7uDc3PaqWE Crrg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=QKrvxmxIL3/y4uu4N+eDSdV9CIOJ0ORbt2m7YDkBikE=; b=HB1g8BRYbZiuT1BDTPf0cRx5w0VQYPR1BkbP8lRdYykrnhcy04v26c8tPSQKbumAlm 2Gjm2B5vlTTsCSvdk7sTp7Ids0r0w8+s3kH/EmAIBMBDdKi5/d8DxuVnPuUu9XqkDMZr wC87iBgbnIQg5wF+atkYgCFFbivI0DHeFnUhIv50jMqcotqRCLrd+VPNxgUk/uy+oZeh /7Ov51PmqWrt534f6inUfBNkL2VCNaZuRaNDXs/n0tsqZcXTXmh/jsugy/YMxShSrikd vk/p+PQ+ZzveNhliJzGErh5SpiBAQHemK9IVUGFUxxj70xtYoornECgAuQ/C73mu0q2M y32w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=UEnlUtxi; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y10si12326866ejk.718.2021.06.07.03.44.06; Mon, 07 Jun 2021 03:44:29 -0700 (PDT) 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; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=UEnlUtxi; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230222AbhFGKnF (ORCPT + 99 others); Mon, 7 Jun 2021 06:43:05 -0400 Received: from mail.kernel.org ([198.145.29.99]:35852 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230219AbhFGKnC (ORCPT ); Mon, 7 Jun 2021 06:43:02 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id C759C610A2; Mon, 7 Jun 2021 10:41:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1623062471; bh=RvCE1NevIKsTueP7A+FGWPnBFH81BXVCV3Y+zXw8HPQ=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=UEnlUtxiM3Y1pRllAkTQE9RR7M0PgTxlBVbr5YBwmIEycKGWpoRqHfqMurjix03SW ZqAuOzxOzAXXBKxRJW8SM03J1cGkx1LmorVDPJe4V6FdjgL+NuLkmzFTDpcdhjBb2E 5P/5Yco0jbSj0KpVHb/XVV0OgEzr3O+bcR+WliwM= Date: Mon, 7 Jun 2021 12:41:08 +0200 From: Greg Kroah-Hartman To: Julian Wiedmann Cc: Tejun Heo , Lai Jiangshan , linux-kernel@vger.kernel.org Subject: Re: [PATCH wq/for-next 2/2] workqueue: let device core create the WQ_UNBOUND attributes Message-ID: References: <20210607094420.2054403-1-jwi@linux.ibm.com> <20210607094420.2054403-2-jwi@linux.ibm.com> <7b9366c0-13d9-a5ef-1a29-dd3510a831c0@linux.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <7b9366c0-13d9-a5ef-1a29-dd3510a831c0@linux.ibm.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jun 07, 2021 at 01:34:49PM +0300, Julian Wiedmann wrote: > On 07.06.21 13:27, Greg Kroah-Hartman wrote: > > On Mon, Jun 07, 2021 at 11:44:20AM +0200, Julian Wiedmann wrote: > >> Wrap the attributes for a WQ_UNBOUND workqueue in ATTRIBUTE_GROUPS(), > >> and wire them up in dev->groups so that the device core can manage them > >> for us. > >> > >> As device_add() will add such attributes _prior_ to raising the KOBJ_ADD > >> uevent, this also makes the initial uevent suppression unnecessary. > >> > >> Signed-off-by: Julian Wiedmann > >> --- > >> kernel/workqueue.c | 51 ++++++++++++++++++++-------------------------- > >> 1 file changed, 22 insertions(+), 29 deletions(-) > >> > >> diff --git a/kernel/workqueue.c b/kernel/workqueue.c > >> index 817dc2d7438a..629859ac5262 100644 > >> --- a/kernel/workqueue.c > >> +++ b/kernel/workqueue.c > >> @@ -5449,6 +5449,9 @@ static ssize_t wq_pool_ids_show(struct device *dev, > >> return written; > >> } > >> > >> +static struct device_attribute wq_sysfs_unbound_attr_pool_ids = > >> + __ATTR(pool_ids, 0444, wq_pool_ids_show, NULL); > > > > __ATTR_RO() please. > > > > I did consider using DEVICE_ATTR_*(), yes. But renaming all the _show and _store > functions added too much unrelated churn for my taste. So let's maybe do this > as a follow-on? Wait, oops, yes, do NOT use __ATTR() for a device attribute, use DEVICE_ATTR_RO() please. And yes, if you want to do it as a pater patch in this series that is fine, just say you are moving the attribute definitions closer to the callbacks in this patch. thanks, greg k-h