linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Pavel Machek <pavel@ucw.cz>
To: Aditya Prayoga <aditya@kobol.io>
Cc: linux-ide@vger.kernel.org, linux-leds@vger.kernel.org,
	Jason Cooper <jason@lakedaemon.net>, Andrew Lunn <andrew@lunn.ch>,
	Gregory Clement <gregory.clement@bootlin.com>,
	Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>,
	Russell King <linux@armlinux.org.uk>,
	Jens Axboe <axboe@kernel.dk>,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org,
	Jacek Anaszewski <jacek.anaszewski@gmail.com>,
	Daniel Golle <daniel@makrotopia.org>
Subject: Re: [PATCH 1/2] libata: add ledtrig support
Date: Thu, 20 Sep 2018 09:23:54 +0200	[thread overview]
Message-ID: <20180920072354.GA20392@amd> (raw)
In-Reply-To: <1537328730-9156-2-git-send-email-aditya@kobol.io>

[-- Attachment #1: Type: text/plain, Size: 939 bytes --]

Hi!

> +#ifdef CONFIG_ATA_LEDS
> +	/* register LED triggers for all ports */
> +	for (i = 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 = host->ports[i]->ledtrig_name;
> +
> +		if (led_trigger_register(host->ports[i]->ledtrig)) {
> +			kfree(host->ports[i]->ledtrig);
> +			host->ports[i]->ledtrig = 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
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]

  parent reply	other threads:[~2018-09-20  7:24 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-19  3:45 [PATCH 0/2] Add support per ATA port ledtrigger on armada 38x Aditya Prayoga
2018-09-19  3:45 ` [PATCH 1/2] libata: add ledtrig support Aditya Prayoga
2018-09-19 13:01   ` Andrew Lunn
2018-09-20  9:53     ` Aditya Prayoga
2018-09-19 18:36   ` kbuild test robot
2018-09-19 21:49   ` kbuild test robot
2018-09-19 21:49   ` [PATCH] libata: fix semicolon.cocci warnings kbuild test robot
2018-09-20  7:23   ` Pavel Machek [this message]
2018-09-20  8:24     ` [PATCH 1/2] libata: add ledtrig support Daniel Golle
2018-09-20 22:04       ` Pavel Machek
2018-09-21  6:31         ` Daniel Golle
2018-09-19  3:45 ` [PATCH 2/2] ARM: mvebu: Enable ARCH_WANT_LIBATA_LEDS in Armada 38x Aditya Prayoga
2018-09-20  7:26   ` Pavel Machek
2018-09-26  6:05     ` Aditya Prayoga

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180920072354.GA20392@amd \
    --to=pavel@ucw.cz \
    --cc=aditya@kobol.io \
    --cc=andrew@lunn.ch \
    --cc=axboe@kernel.dk \
    --cc=daniel@makrotopia.org \
    --cc=gregory.clement@bootlin.com \
    --cc=jacek.anaszewski@gmail.com \
    --cc=jason@lakedaemon.net \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-ide@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-leds@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=sebastian.hesselbarth@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).