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=-2.3 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_PASS,USER_AGENT_MUTT autolearn=ham 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 9F7C9C433F4 for ; Thu, 20 Sep 2018 07:24:00 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 6388B21523 for ; Thu, 20 Sep 2018 07:24:00 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6388B21523 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=ucw.cz Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731780AbeITNGA (ORCPT ); Thu, 20 Sep 2018 09:06:00 -0400 Received: from atrey.karlin.mff.cuni.cz ([195.113.26.193]:33757 "EHLO atrey.karlin.mff.cuni.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731366AbeITNGA (ORCPT ); Thu, 20 Sep 2018 09:06:00 -0400 Received: by atrey.karlin.mff.cuni.cz (Postfix, from userid 512) id 7351D8063B; Thu, 20 Sep 2018 09:23:55 +0200 (CEST) Date: Thu, 20 Sep 2018 09:23:54 +0200 From: Pavel Machek To: Aditya Prayoga Cc: linux-ide@vger.kernel.org, linux-leds@vger.kernel.org, Jason Cooper , Andrew Lunn , Gregory Clement , Sebastian Hesselbarth , Russell King , Jens Axboe , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Jacek Anaszewski , Daniel Golle Subject: Re: [PATCH 1/2] libata: add ledtrig support Message-ID: <20180920072354.GA20392@amd> References: <1537328730-9156-1-git-send-email-aditya@kobol.io> <1537328730-9156-2-git-send-email-aditya@kobol.io> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="AqsLC8rIMeq19msA" Content-Disposition: inline In-Reply-To: <1537328730-9156-2-git-send-email-aditya@kobol.io> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --AqsLC8rIMeq19msA Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi! > +#ifdef CONFIG_ATA_LEDS > + /* register LED triggers for all ports */ > + for (i =3D 0; i < host->n_ports; i++) { > + if (unlikely(!host->ports[i]->ledtrig)) > + continue; > + > + snprintf(host->ports[i]->ledtrig_name, > + sizeof(host->ports[i]->ledtrig_name), "ata%u", > + host->ports[i]->print_id); > + host->ports[i]->ledtrig->name =3D host->ports[i]->ledtrig_name; > + > + if (led_trigger_register(host->ports[i]->ledtrig)) { > + kfree(host->ports[i]->ledtrig); > + host->ports[i]->ledtrig =3D NULL; > + } > + } > +#endif No, we don't want you to register multiple triggers. We want one trigger, than has parameter "which port to watch". (Number of triggers is limited as by sysfs limitations). Otherwise yes, ata trigger makes sense. Pavel --=20 (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blo= g.html --AqsLC8rIMeq19msA Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAlujSwoACgkQMOfwapXb+vIkLQCeM1xnlhIVNTLBYZqEdF3DiNEH dG0AniCzufR3yA8q21j0PjHy7+Vo3TiQ =xqO6 -----END PGP SIGNATURE----- --AqsLC8rIMeq19msA--