From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 80F1AC432BE for ; Fri, 30 Jul 2021 05:22:22 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 622C860E76 for ; Fri, 30 Jul 2021 05:22:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236383AbhG3FWZ (ORCPT ); Fri, 30 Jul 2021 01:22:25 -0400 Received: from new4-smtp.messagingengine.com ([66.111.4.230]:50165 "EHLO new4-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229696AbhG3FWY (ORCPT ); Fri, 30 Jul 2021 01:22:24 -0400 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailnew.nyi.internal (Postfix) with ESMTP id B013F580D65; Fri, 30 Jul 2021 01:22:19 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute6.internal (MEProxy); Fri, 30 Jul 2021 01:22:19 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kroah.com; h= date:from:to:cc:subject:message-id:references:mime-version :content-type:content-transfer-encoding:in-reply-to; s=fm1; bh=w Z3kutLqmcKQSNip3ycj7XGCG1ZWDjerJRvqk0QSHZU=; b=BuomH8qzwT4tALiDl 1vvTx8AQRdRK03K/c44WkmzqAzSSvSd2BKdtL6br6Uxgsce9a3efQVVa7Bik4ioc oooOTbE7QoDEwwxuXrIiHWwjjWzvhiAKmmxBNusBDpkl0JYoWhF6XCmVPAfXeJy/ Y/H1Qa9Qot+qKa8nJmlGd0O7QTGH0hEqI+Bd+IN6Ysu42Na/oXfUvEtzwtpQzCuZ ltfhuqSMhYnFUsdPC/aHelqqlkS18ZvGUTZEHBUu8T4tqdz4ZzwgxZKqL4ag0PsP lH4q7TNa/r/TyzM6R5Tvj5p5NTIylU2wil7BHXfiRPQ5jcXnUQEEvYS314rEQdOz qZtBg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm3; bh=wZ3kutLqmcKQSNip3ycj7XGCG1ZWDjerJRvqk0QSH ZU=; b=W/RL+RnDcbQqBAdaQn7yFZp1OdzFohjyvjMHp7rfQaNi4mJEUZkbMdwq3 VCn/rfRv6KUyBeRjfPiR5/bAF6IdWpKtIIqtJLV+o0+C7F5LLNFlxppXAMXSf5eh rhpHfRVxGhfgifxyR449pC+7dUg5GuB+xzahqrqlEIEE2HoHPhsext5B7THDA/6/ QWyOuJypQTeCd3YoHB5A3TFyreECeP8qJPpNvtRXwhmCPDSoEKkHMwE9tvivBtz1 PXYx5X490xQz/mYQotbDqeJihUxRQw4RUBPaXYbUxdQWexi2O6FZRM5qVXYp/BKa xV599mJPVnGkFI1Oh+HZw33hQsVAQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrheeggdejhecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpeffhffvuffkfhggtggugfgjsehtkeertddttdejnecuhfhrohhmpefirhgvghcu mffjuceoghhrvghgsehkrhhorghhrdgtohhmqeenucggtffrrghtthgvrhhnpeeuheekhe elffefieduteefkeejffdvueehjeejffehledugfetkedvleekudduvdenucevlhhushht vghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehgrhgvgheskhhrohgrhh drtghomh X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 30 Jul 2021 01:22:18 -0400 (EDT) Date: Fri, 30 Jul 2021 07:22:16 +0200 From: Greg KH To: Ian Pilcher Cc: Valdis =?utf-8?Q?Kl=C4=93tnieks?= , axboe@kernel.dk, kernelnewbies@kernelnewbies.org, linux-kernel@vger.kernel.org, linux-block@vger.kernel.org, pavel@ucw.cz, linux-leds@vger.kernel.org Subject: Re: [RFC PATCH 1/8] docs: Add block device LED trigger documentation Message-ID: References: <20210729015344.3366750-1-arequipeno@gmail.com> <20210729015344.3366750-2-arequipeno@gmail.com> <108629.1627528155@turing-police> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jul 29, 2021 at 10:52:06AM -0500, Ian Pilcher wrote: > On 7/28/21 10:09 PM, Valdis Klētnieks wrote: > > > + # cat /sys/class/block/led_trigger_list > > > + baz: 0 > > > + bar: 0 > > > + foo: 0 > > > > This looks like an abuse of the "one entry one value" rule for sysfs. > > Perhaps this should be a directory /sys/class/block/defined_triggers/ > > and separate files under that for foo, bar, and baz? That would probably > > make reference counting a lot easier as well.... > > Indeed it is. > > Funny that you should mention using a subdirectory. I originally wanted > to put all of the trigger-related stuff into > /sys/class/block/led_triggers/, but I couldn't find any API to create a > subdirectory for *class* attributes (only for device attributes), nor do > I see any such subdirectories on my system. Add a name to your attribute group and sysfs creates the subdirectory automagically for you. thanks, greg k-h