lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 26 Jul 2017 17:21:49 +0100
From:   Mark Brown <broonie@...nel.org>
To:     Damien Riegel <damien.riegel@...oirfairelinux.com>
Cc:     alsa-devel@...a-project.org, linux-kernel@...r.kernel.org,
        Liam Girdwood <lgirdwood@...il.com>,
        Jaroslav Kysela <perex@...ex.cz>,
        Takashi Iwai <tiwai@...e.com>,
        Patrick Lai <plai@...eaurora.org>,
        Banajit Goswami <bgoswami@...eaurora.org>,
        Srinivas Kandagatla <srinivas.kandagatla@...aro.org>,
        kernel@...oirfairelinux.com
Subject: Re: [PATCH v1 2/3] ASoC: codecs: msm8916-analog: support jack
 detection

On Tue, Jul 25, 2017 at 01:51:25PM -0400, Damien Riegel wrote:

> +	for (i = 0; i < ARRAY_SIZE(jack_detect_irqs); i++) {
> +		int irq;
> +
> +		irq = platform_get_irq_byname(pdev, jack_detect_irqs[i].name);
> +		if (irq < 0) {
> +			dev_warn(dev, "failed to get irq '%s', jack insertion detection disabled\n",
> +				 jack_detect_irqs[i].name);
> +			break;
> +		}
> +
> +		ret = devm_request_threaded_irq(dev, irq, NULL,

Don't put the loop in when there's only one IRQ, wait till it's needed.
This is an unusual pattern and it's not clear that just bombing out of
the loop with interrupts half requested is a good idea.

Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ