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]
Message-ID: <7536276.uh7gaa9vHu@barack>
Date:	Mon, 4 Jul 2011 16:11:48 +0300
From:	Péter Ujfalusi <peter.ujfalusi@...com>
To:	Samuel Ortiz <sameo@...ux.intel.com>
CC:	"Girdwood, Liam" <lrg@...com>, Tony Lindgren <tony@...mide.com>,
	Mark Brown <broonie@...nsource.wolfsonmicro.com>,
	Dmitry Torokhov <dmitry.torokhov@...il.com>,
	"linux-input@...r.kernel.org" <linux-input@...r.kernel.org>,
	"linux-omap@...r.kernel.org" <linux-omap@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"alsa-devel@...a-project.org" <alsa-devel@...a-project.org>,
	"Lopez Cruz, Misael" <misael.lopez@...com>
Subject: Re: Re: [PATCH v6 08/18] mfd: twl6040: Add initial support

Hi Samuel,

On Monday 04 July 2011 13:48:44 Samuel Ortiz wrote:
> Hi Peter,
> 
> On Tue, Jun 21, 2011 at 04:39:06PM +0300, Peter Ujfalusi wrote:
> > +int twl6040_is_powered(struct twl6040 *twl6040)
> > +{
> > +	return twl6040->power_count;
> > +}
> > +EXPORT_SYMBOL(twl6040_is_powered);
> 
> Do we really need to export this one ?

No, we don't.
At the end we do not need this function at all either.
I'm going to remove it.
 
> > +static inline int twl6040_get_rev(struct twl6040 *twl6040)
> > +{
> > +	return twl6040->rev;
> > +}

No need for this either, I'll remove it.

> > +
> > +static inline int twl6040_request_irq(struct twl6040 *twl6040, int irq,
> > +				      irq_handler_t handler,
> > +				      unsigned long irqflags,
> > +				      const char *name,
> > +				      void *data)
> > +{
> > +	if (!twl6040->irq_base)
> > +		return -EINVAL;
> > +
> > +	return request_threaded_irq(twl6040->irq_base + irq, NULL, handler,
> > +				    irqflags, name, data);
> > +}
> > +
> > +static inline void twl6040_free_irq(struct twl6040 *twl6040, int irq,
> > +				    void *data)
> > +{
> > +	if (!twl6040->irq_base)
> > +		return;
> > +
> > +	free_irq(twl6040->irq_base + irq, data);
> > +}
> 
> I don't see the value of those 3 inline functions. Removing them would make
> the code actually more understandable (especially for the 2nd one).

The twl6040_request_irq is also used by the ASoC codec driver, and the vibra 
driver, but if you think it is better to replace those as well, I will do it 
right away.

-- 
Péter
--
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