Received: by 2002:a05:6a10:a841:0:0:0:0 with SMTP id d1csp531335pxy; Thu, 22 Apr 2021 07:41:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxugtxBzB6myvx52xWdcV0EnruH7LeVWjg7Wsw6P7V8hdbFB3iD+Az7VORNlALC4o5C/xGZ X-Received: by 2002:a17:906:b6c3:: with SMTP id ec3mr3806852ejb.155.1619102506496; Thu, 22 Apr 2021 07:41:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1619102506; cv=none; d=google.com; s=arc-20160816; b=ecJ+k4KXtuQ0hKexPpEeiLq7B0ujTfV9R0wOYUOCZ7oIdqc7JZlEDzBut5CZJc6Dl0 Gy49uvw58caq3QTmPI20PmAwQfbAeTAbBlYfzyCul2u3a6Ga82bNtkGOkpMmd5rhcf7t KBGGLnmvNKHhdLGsYspH20YYHVcQkZ8koTghkeSyrMDSDcvHj8bt4WlCwIKVpcX545ZC tBCsnd2wVFtQLr9PqIjB8HleRw7WygXJsIHXn2W+WVi1phZ+zK7CKEKihIHBPbr5xAAE tfRwNBrzCk/PKji8ex7R7pgflu5BUwa3DoUgw+94jhdWqlOtxgFrIuqbr/lSIp2vywt7 tdBw== 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; bh=O2X0mcl0tFQoEdVkhLbgqLxAT+4bIiqmQzFGAO5hl4M=; b=I+SGs1lNPFtwBibcbSoJWknzgXA3B6kYiJRdRADWkseOABMIrKWIVt3ruybJQbxNnG tiwkGa8XuUJk2F/r1Q+PIQl3SyIR43MlKysoGnWFV7HCL3I6Vdrz3gCLaaAemZ0ApdB8 CA53ctLDqzfuvJ/0XM/OzbRMIGtIGfb29z1H3P8c7ZENQ9Xm6ikugeRHNDn08UJq3DUn 6Eb8n8UDe4BQlN3iLoigJXKVpVt8MqUH0Qcj7C3Mkrct+RHNb1yR/Iqt3qqRHfQTK3Kd rCGS8s88G1MkXzQ1wNDZiY0WRBTTcdaI7KpY0zLTHIts/IKzkK5ahdxH9FivYvgUKliH ijTA== 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 b1si2288178eju.122.2021.04.22.07.41.21; Thu, 22 Apr 2021 07:41:46 -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; 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 S236459AbhDVOkY (ORCPT + 99 others); Thu, 22 Apr 2021 10:40:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38916 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236501AbhDVOkY (ORCPT ); Thu, 22 Apr 2021 10:40:24 -0400 Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 72F91C06138B for ; Thu, 22 Apr 2021 07:39:49 -0700 (PDT) Received: from ptx.hi.pengutronix.de ([2001:67c:670:100:1d::c0]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lZaUc-00028T-D1; Thu, 22 Apr 2021 16:39:46 +0200 Received: from ukl by ptx.hi.pengutronix.de with local (Exim 4.92) (envelope-from ) id 1lZaUc-0003xQ-2x; Thu, 22 Apr 2021 16:39:46 +0200 Date: Thu, 22 Apr 2021 16:39:45 +0200 From: Uwe =?utf-8?Q?Kleine-K=C3=B6nig?= To: Greg Kroah-Hartman Cc: Juergen Borleis , kernel@pengutronix.de, linux-doc@vger.kernel.org, Jonathan Corbet , linux-kernel@vger.kernel.org, Pavel Machek , linux-leds@vger.kernel.org Subject: Re: [PATCH] leds: trigger/tty: feature data direction Message-ID: <20210422143945.n5gqkeh2y2jm6ece@pengutronix.de> References: <20210422074702.8831-1-jbe@pengutronix.de> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="pt2plmppneqtli76" Content-Disposition: inline In-Reply-To: X-SA-Exim-Connect-IP: 2001:67c:670:100:1d::c0 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --pt2plmppneqtli76 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hello Greg, On Thu, Apr 22, 2021 at 10:05:28AM +0200, Greg Kroah-Hartman wrote: > On Thu, Apr 22, 2021 at 09:47:02AM +0200, Juergen Borleis wrote: > > +static ssize_t dirfilter_show(struct device *dev, > > + struct device_attribute *attr, char *buf) > > +{ > > + struct ledtrig_tty_data *trigger_data =3D led_trigger_get_drvdata(dev= ); > > + > > + if (trigger_data->indirection) > > + return (ssize_t)sprintf(buf, "in\n"); > > + if (trigger_data->outdirection) > > + return (ssize_t)sprintf(buf, "out\n"); > > + return (ssize_t)sprintf(buf, "inout\n"); >=20 > sysfs_emit() please. >=20 > And you are adding new sysfs files, that requires an update to > Documentation/ABI/ please do so. I agree to these two suggestions. > But why are you adding random new sysfs values to a class device? That > feels really wrong. This is quite usual for triggers and there is IMHO no way around this. And it is also save as led_trigger_set() emits an uevent after a trigger was activated. Best regards Uwe --=20 Pengutronix e.K. | Uwe Kleine-K=F6nig | Industrial Linux Solutions | https://www.pengutronix.de/ | --pt2plmppneqtli76 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEfnIqFpAYrP8+dKQLwfwUeK3K7AkFAmCBiq4ACgkQwfwUeK3K 7An9WQf9HqPjIWCpV8lEEjlTUBeaJc2Pwfy9NYtrg6MaIZR/VB14IXJR8o2DfA0v ivVDNJTaSwZ6wgcxahH2CJ52PuZv8z240HwCQ8caOFYiGlwXoMaq3l+xE1pPOEfw UXY7BaNINxsvRwxpAWeoE33TQosTZlBq0mMga2ytAN6quHsmqK+TDAXdX1G5sTFs ++rQiUHZJUi0s75yzDxo2qnWpAvXsq2hPWgvOQDvmPdwcz0A2jem15t7PndFd0HP J1qiuuZgq+azo5YHYOoYul+HuU3bKza5Qh+auHxF57WorQ2k7KEtr04D4bA/8dMr bTUpJgvaHy3BAKpkjQXmd5fLt1GgMw== =CpzT -----END PGP SIGNATURE----- --pt2plmppneqtli76--