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, 11 Apr 2018 08:57:17 -0700
From:   Joe Perches <joe@...ches.com>
To:     Lukasz Majewski <lukma@...x.de>, Lee Jones <lee.jones@...aro.org>
Cc:     linux-kernel@...r.kernel.org, Sascha Hauer <s.hauer@...gutronix.de>
Subject: Re: [PATCH] mfd: mc13xxx: Add mc34708 adc support

On Wed, 2018-04-11 at 16:09 +0200, Lukasz Majewski wrote:
> From: Sascha Hauer <s.hauer@...gutronix.de>
> 
> The mc34708 has an improved adc. The older variants will always convert
> a fixed order of channels. The mc34708 can do up to eight conversions
> in arbitrary channel order. Currently this extended feature is not
> supported. We only support touchscreen conversions now, which will
> be sampled in a data format compatible to the older chips in order
> to keep the API between the mfd and the touchscreen driver.
[]
> diff --git a/drivers/mfd/mc13xxx-core.c b/drivers/mfd/mc13xxx-core.c
[]
> +static int mc34708_adc_conversion(struct mc13xxx *mc13xxx, unsigned int mode,
> +		unsigned int channel, u8 ato, bool atox,
> +		unsigned int *sample)
> +{
> +	int ret, i;
[]
> +	if (mc13xxx->adcflags & MC13XXX_ADC_WORKING) {
> +		ret = -EBUSY;
> +		goto out;
> +	}

This doesn't work.

> []
> +	mc13xxx_irq_free(mc13xxx, MC34708_IRQ_TSDONE, &adcdone_data);
> +
> +	if (!ret) {
> +		ret = -ETIMEDOUT;
> +		goto out;
> +	}
[]
> +out:
> +	ret = mc13xxx_reg_write(mc13xxx, MC13XXX_ADC0, old_adc0);

ret is reassigned here, so the ret = -<FOO>
uses above don't do what is expected.

> +
> +	mc13xxx->adcflags &= ~MC13XXX_ADC_WORKING;
> +	mc13xxx_unlock(mc13xxx);
> +
> +	return ret;
> +}

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ