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] [day] [month] [year] [list]
Message-ID: <20110818161811.GC20208@opensource.wolfsonmicro.com>
Date:	Fri, 19 Aug 2011 01:18:13 +0900
From:	Mark Brown <broonie@...nsource.wolfsonmicro.com>
To:	ashishj3 <ashish.jangam@...tcummins.com>
Cc:	sameo@...nedhand.com, linux-kernel@...r.kernel.org,
	Dajun <dajun.chen@...semi.com>, linaro-dev@...ts.linaro.org,
	arnd@...db.de
Subject: Re: [PATCH 01/11] MFD: DA9052/53 MFD core module v4

On Thu, Aug 18, 2011 at 07:23:22PM +0530, ashishj3 wrote:

> +int da9052_reg_read(struct da9052 *da9052, unsigned char reg)
> +{
> +	int val, ret;
> +
> +	if (reg > DA9052_MAX_REG_CNT) {
> +		dev_err(da9052->dev, "invalid reg %x\n", reg);
> +		return -EINVAL;
> +	}
> +
> +	if (da9052->bustype == BUS_SPI)
> +		reg = (reg << 1) | 1;

The same comment I made last time applies now: this isn't something that
should be being handled at the driver level.

For all your I/O functions there's not really any work going on in the
function except the translation from struct da9052 to the regmap it
points to.  May as well just turn the functions into inlines.

> +	if (events == 0)
> +		goto err;
> +
> +	for (i = 0; i < 32; i++) {
> +		if (events & (1 << i))
> +			handle_nested_irq(da9052->irq_base + i);
> +	}
> +
> +	da9052_group_write(da9052, DA9052_EVENT_A_REG, 4, v);
> +
> +	if (da9052->chip_id == DA9052 || da9052->chip_id == DA9053_AA)
> +		DA9052_FIXME();
> +
> +err:
> +	return IRQ_HANDLED;

If you hit an error you didn't handle an IRQ and so ought to be
returning IRQ_NONE.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ