Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp5929746pxj; Wed, 23 Jun 2021 12:06:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyD2EJgITaZ1SGA3t8EbcLmWIAACdlDWAz+SUVDzjGDHGq6NrZ5j3JVlva28zWUtTdA/sCN X-Received: by 2002:a05:6638:191d:: with SMTP id p29mr1038099jal.75.1624475192717; Wed, 23 Jun 2021 12:06:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624475192; cv=none; d=google.com; s=arc-20160816; b=RGV3HeTh79LuTC1UHOiF5UwGaMVMQki2ylBbAAv3SGz+SvS8LblajEV71ZAwFnmFdE bT/zlNBPYQ7s6O+iSLGi/etHeDMDmUiAufqB1za1HNgGFOeFLyI2BWWw62sRs1OqRoJM 5Shv5LS46iKj3IZePJaqvXud3ahjO7s89FiujhxakISAvF92qbMdlpRSmka8AIbzzO1Y ExpsDO4FxNSjHJY3g1C34S6qlLAgE5wsOa9xVkOfPaM4s64/+HnSsAT2MMrJU9pmfYoH jslPFyytfONszXl+UBQvE0Tl6u0QTzjUIZMXHMs7bF5TvDFW6bK+/myiH2jOePwrsW/c UnfA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature:dkim-filter; bh=iqMYBX8gNJqygF5F9g1MwbXLNoGunuU4jx9xCfqhSX0=; b=Tknm2yyGitrJTzH8AKU6XMMAw0JlKAgWXwpYFkM6lX+1yLKy03l7HmmPrEj1EAVDhM nBlTTJaVWpuetUqVjZw31QX/nsZ5Yg+naEwtKXg+c28ls564JnHyztOYZW2pCAy6C4Hx hdVJrWzzeiZum1MP6937XAVpQPnPOuNtmi/1l4GDcXC2IG6ACAdKvCBBEGHy7qz6sF1m Eb+/PWvr5zSeq8XmhXOiCA0t8ug/GG3PnxKRBxKbQSz6WlzeIkfN46PqLJq/y5sMlPsh vWiAfdgSiqeIgbAz6IYwFWEqfKO7n8GZsyiGkQAi8wxaxsCcpdd0cp74nyle57ej6sQm JN7A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.microsoft.com header.s=default header.b=f70CcZvM; 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=linux.microsoft.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h5si711325ioz.62.2021.06.23.12.06.19; Wed, 23 Jun 2021 12:06:32 -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=@linux.microsoft.com header.s=default header.b=f70CcZvM; 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=linux.microsoft.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229818AbhFWTGf (ORCPT + 99 others); Wed, 23 Jun 2021 15:06:35 -0400 Received: from linux.microsoft.com ([13.77.154.182]:37004 "EHLO linux.microsoft.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229688AbhFWTGe (ORCPT ); Wed, 23 Jun 2021 15:06:34 -0400 Received: from mail-pl1-f181.google.com (mail-pl1-f181.google.com [209.85.214.181]) by linux.microsoft.com (Postfix) with ESMTPSA id D3E8E20B83F5; Wed, 23 Jun 2021 12:04:16 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com D3E8E20B83F5 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1624475056; bh=iqMYBX8gNJqygF5F9g1MwbXLNoGunuU4jx9xCfqhSX0=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=f70CcZvM/X7fzhoqUcMyo7Roi1vV3/vgWgNEKgWo5+lETiBHk3BERcmLN8jUe2Fps xMnNIdfI2QILIpkVmd2wWBudvWqVfJqhtoyRN2+Bmx0ysTjetGEQhorSEYYxJbz2Pt eznGGnjlr9NrhSpO9MCcHGvA/dHVsuPim7IsWm10= Received: by mail-pl1-f181.google.com with SMTP id v12so1653329plo.10; Wed, 23 Jun 2021 12:04:16 -0700 (PDT) X-Gm-Message-State: AOAM530ySDJmbQ2tUKCfRsBa5kFZIeJYXPbSL1K3wzxx+uwMuGcx3rG5 UutYrVMrqGAhpF60I6XwGgCqstcn/AMzqP6lE1s= X-Received: by 2002:a17:902:e9d5:b029:124:926:7971 with SMTP id 21-20020a170902e9d5b029012409267971mr816793plk.19.1624475056368; Wed, 23 Jun 2021 12:04:16 -0700 (PDT) MIME-Version: 1.0 References: <20210623105858.6978-1-mcroce@linux.microsoft.com> <20210623105858.6978-4-mcroce@linux.microsoft.com> In-Reply-To: From: Matteo Croce Date: Wed, 23 Jun 2021 21:03:40 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v3 3/6] block: refactor sysfs code To: Christoph Hellwig Cc: linux-block@vger.kernel.org, linux-fsdevel@vger.kernel.org, Jens Axboe , Linux Kernel Mailing List , Lennart Poettering , Luca Boccassi , Alexander Viro , Damien Le Moal , Tejun Heo , "Javier Gonz??lez" , Niklas Cassel , Johannes Thumshirn , Hannes Reinecke , Matthew Wilcox , JeffleXu Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jun 23, 2021 at 1:53 PM Christoph Hellwig wrote: > > > -static void disk_add_events(struct gendisk *disk) > > +static void disk_add_sysfs(struct gendisk *disk) > > { > > /* FIXME: error handling */ > > - if (sysfs_create_files(&disk_to_dev(disk)->kobj, disk_events_attrs) < 0) > > + if (sysfs_create_files(&disk_to_dev(disk)->kobj, disk_sysfs_attrs) < 0) > > pr_warn("%s: failed to create sysfs files for events\n", > > disk->disk_name); > > +} > > Actually, what we need here is a way how we can setup the ->groups > field of the device to include all attribute groups instead of having > to call sysfs_create_files at all. I don't get this one. You mean in general or in this series? -- per aspera ad upstream