Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp1771788pxb; Mon, 20 Sep 2021 05:06:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyGGS2ZI7wWlNUFiQXXofSMKqCZnt0F2w31AlPktPIbnD9WncTKAKIdOLlmHDJkikU32GO2 X-Received: by 2002:a05:6e02:1c81:: with SMTP id w1mr16890584ill.112.1632139577056; Mon, 20 Sep 2021 05:06:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632139577; cv=none; d=google.com; s=arc-20160816; b=lv+CcHjVdBKIUUxe1ilKut0VSOtL3AsnwL4NlD3/xvw9vaMxHIYGCNDzz0U2hj48Ef /yk5EzpNFhINmc+pdJrJz//5SnhnMzT8ebHUE7dVYZnIkzByd0rSUK5D9iWC8MqVJsNz Xhs8v9XvnQltW+gnWzZ49gH2LJR5nsk/m+gRVVNvrbUEFJQNvdU6e7enq3/iDpzm0nWe WKaN+3gP/Kf7Mei8aGaCYtSNG/pzpzsOBgGCSAJAd2vLeGFJreWRcCWwBMOyHDmNGSDr AoWxqNzG392IYvGn8mP/jJ51hM1WZ0IC/n2M8uquA4wiKzxl6BYl2qH1D2pl4K03XPOA xSCw== 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=3Sy/rEGgIqKcMWpTMiQbwNJaSJE3pv4762nDAuPaBrI=; b=gBRSVyPdSQlA3/b9qFVC8TGYz9Jw2N39vXUxws19Bv8p6tWTarlB8ZnN6O/EwH9r6R f3P7gnsUvA59KrJlFs503v9LbmJKwJXpLP74Enppfj3YKs8XbR7lcoSI6urNmm+2cUjD xaFT5DKZ8yXPEZDZug/W9TrP+JKW5+3CPVymcMbQsLPgGWX1aE0li80MkR0ftrgCllZF 37oSW6rgJx3lC3VVUikA1FE4rOObnhidycNWjbxB/PC2OtriRI2lNFgdZ5H02SIglKnH r6Z7Y0F5zt9KLDfR2UtQ/89ZPlpE4dB/01wek367JfQ+8ONHGEDGNyv8Wfj6bmanQZZh Lm5w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=he667Lqf; 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 i12si11618293jaf.41.2021.09.20.05.05.58; Mon, 20 Sep 2021 05:06:17 -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=@infradead.org header.s=casper.20170209 header.b=he667Lqf; 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 S233137AbhITGqh (ORCPT + 99 others); Mon, 20 Sep 2021 02:46:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57950 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232938AbhITGqg (ORCPT ); Mon, 20 Sep 2021 02:46:36 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6CF3AC061574; Sun, 19 Sep 2021 23:45:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=3Sy/rEGgIqKcMWpTMiQbwNJaSJE3pv4762nDAuPaBrI=; b=he667LqfnFO1EieNx8AAe5GaTQ GTPR4ubHrX5lNhUEp/E/QwW26YOAALFn2E9HOICZVh+gkZARqQNV+4RU3syr3jWcqJaalUZP37egP TUr/VyO7Ry/7JKLYRbsyfqf3qTlhYfLK3dcR5r1ddyUVSGbbJOfuSSZTjhg2pSKaO29JrPmZdMqEc mNFuQmlEDZ8Q65nqa61Nq2PHp/e/ZTJv3iy14rWAtMRuxa4FJfR3A0Q1413SBwcCf+P6Ba5Fv33NH K2+PsJ51fFyWRGHDAnwtPKny07xHp90Tn4zBD7qR4Ar38b+Q3xpj4j5ror7MPSGemq0C6eN/sM+gi 3iHhGLag==; Received: from hch by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1mSD1s-002QwW-Gw; Mon, 20 Sep 2021 06:44:15 +0000 Date: Mon, 20 Sep 2021 07:43:52 +0100 From: Christoph Hellwig To: Greg KH Cc: Ian Pilcher , hch@infradead.org, pavel@ucw.cz, linux-leds@vger.kernel.org, linux-kernel@vger.kernel.org, kabel@kernel.org Subject: Re: [PATCH v4 1/2] docs: Add block device (blkdev) LED trigger documentation Message-ID: References: <20210916202127.1216994-1-arequipeno@gmail.com> <20210916202127.1216994-2-arequipeno@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-SRS-Rewrite: SMTP reverse-path rewritten from by casper.infradead.org. See http://www.infradead.org/rpr.html Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Sep 18, 2021 at 09:07:54AM +0200, Greg KH wrote: > > Honestly, I wasn't particularly enthusiastic about it in the first > > place; it feels like something that should be done in user space. I > > wouldn't have included it if I didn't have to make a writable copy of > > the buffer anyway, in order to trim a trailing newline. > > > > I can certainly remove the re-check logic. The end result will be an > > API that is slightly less "user friendly" in return for saving a bit of > > pointer arithmetic and a 5-byte memcpy(). > > Just use the kernel block device name and that way you do not have to > parse anything as it is unique and no paths are having to be followed. > > That's the way that other LED apis are working, right? The "kernel block device name" is the a block device special path that a normal VFS path lookup is done on. This is the preferred block device API used by everyone. And yes, this includes resolving symlinks. The only other API is by dev_t, but it is highly discouraged and should really not grow any new users.