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: <201507232315.16467@pali>
Date:	Thu, 23 Jul 2015 23:15:16 +0200
From:	Pali Rohár <pali.rohar@...il.com>
To:	Belisko Marek <marek.belisko@...il.com>
Cc:	"Andrew F. Davis" <afd@...com>, Sebastian Reichel <sre@...nel.org>,
	"Dmitry Eremin-Solenikov" <dbaryshkov@...il.com>,
	David Woodhouse <dwmw2@...radead.org>,
	Dan Murphy <dmurphy@...com>,
	Linux PM mailing list <linux-pm@...r.kernel.org>,
	LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 5/8] power: bq27x00_battery: Renaming for consistency

On Thursday 23 July 2015 22:56:26 Belisko Marek wrote:
> Hi Pali,
> 
> On Thu, Jul 23, 2015 at 10:15 PM, Pali Rohár <pali.rohar@...il.com>
> wrote:
> > On Thursday 23 July 2015 19:03:08 Andrew F. Davis wrote:
> >> >> -#ifdef CONFIG_BATTERY_BQ27X00_I2C
> >> >> -MODULE_ALIAS("i2c:bq27000-battery");
> >> >> +#ifdef CONFIG_BATTERY_BQ27XXX_I2C
> >> >> +MODULE_ALIAS("i2c:bq27xxx-battery");
> >> >> 
> >> >>  #endif
> >> > 
> >> > Why is this MODULE_ALIAS needed? Some lines upper there is
> >> > 
> >> >  MODULE_DEVICE_TABLE(i2c, bq27xxx_id);
> >> > 
> >> > which add proper i2c: module alias...
> >> 
> >> Not sure, looks like it was added in commit
> >> 8ebb7e9c1a502cfc300618c19c3c6f06fc76d237 which claims that the
> >> "module won't get loaded automatically" without it, but I have not
> >> had this problem, so I'm not sure why it's there.
> > 
> > git grep bq27000-battery show me that only one driver uses that
> > name: drivers/w1/slaves/w1_bq27000.c
> > 
> > And more over, it is platform device, not i2c device. So that
> > commit 8ebb7e9c1a502cfc300618c19c3c6f06fc76d237 is wrong! CCing
> > Marek.
> 
> If you look to power/bq27x00 driver then there is I2C part and
> platform part only
> both selectable by config. In
> 8ebb7e9c1a502cfc300618c19c3c6f06fc76d237 was added MODULE_ALIAS to
> have this driver working as module for both buses. Even if I2C isn't
> used anywhere
> I add MODULE_ALIAS also for that.
> 
> > MODULE_ALIAS("platform:bq27000-battery") is really needed for
> > w1_bq27000.c but MODULE_ALIAS("i2c:bq27000-battery") should be
> > removed. It is not used by any board platform code or DT.
> 
> Not sure if it's good idea to remove it. Somebody outside can use it.
> 
> > Marek, correct me if I'm wrong.
> > 
> > --
> > Pali Rohár
> > pali.rohar@...il.com
> 
> BR,
> 
> marek

Who, where any why is using alias i2c:bq27000-battery??

It is obviously wrong to add that alias. MODULE_DEVICE_TABLE(i2c, ... 
macro automatically adds all MODULE_ALIASes for all i2c devices.

If there is such device with needs i2c:bq27000-battery is should be 
fixed to use i2c:bq27??? identifier exported by MODULE_DEVICE_TABLE.

git grep on kernel tree did not return anything, so there is no usage.

Of course alias for platform:bq27000-battery is needed.

-- 
Pali Rohár
pali.rohar@...il.com

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ