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: <BANLkTim1QHe-hpyt0yQxKt2SBwtOAPQ3Bg@mail.gmail.com>
Date:	Mon, 18 Apr 2011 23:33:34 +0800
From:	Haojian Zhuang <haojian.zhuang@...il.com>
To:	Mark Brown <broonie@...nsource.wolfsonmicro.com>
Cc:	Haojian Zhuang <haojian.zhuang@...vell.com>, sameo@...ux.intel.com,
	linux-kernel@...r.kernel.org, dmitry.torokhov@...il.com,
	a.zummo@...ertech.it, johnpol@....mipt.ru, cbou@...l.ru,
	dwmw2@...radead.org, lrg@...mlogic.co.uk
Subject: Re: [PATCH 13/14] regulator: check name in initialization of max8925

On Mon, Apr 18, 2011 at 10:28 PM, Mark Brown
<broonie@...nsource.wolfsonmicro.com> wrote:
> On Mon, Apr 18, 2011 at 10:04:10PM +0800, Haojian Zhuang wrote:
>> Check name in initialization of max8925 regulator driver.
>
> What name are we checking and why do we need to check it?  I've no idea
> what the patch is supposed to do which makes it hard to review.
>
Actually, I didn't submit any platform driver before. So I can't
attach the related patch on
platform driver. After 2.6.39, I'll upload patches on platform driver.

In this original design, regulator data is assigned in platform driver
separately with index.
If I missed to define regulator[0] in platform data, the regulator
driver will meet failure
because of checking in max8925-core.c. The regulator[0] always means Buck0.

So I want to avoid to use the index and check regulator[] one by one.
I use a pointer to link
all regulator data together. I just need to check whether the
regulator pointer is valid or not.

>> +++ b/drivers/regulator/max8925-regulator.c
>> @@ -174,7 +174,7 @@ static struct regulator_ops max8925_regulator_ldo_ops = {
>>  #define MAX8925_SDV(_id, min, max, step)                     \
>>  {                                                            \
>>       .desc   = {                                             \
>> -             .name   = "SDV" #_id,                           \
>> +             .name   = "SD" #_id,                            \
>
> The above isn't obviously correct - it changes the name that's assigned
> from matching the macro used to something different.
>

The name isn't used by others. So I change it to SDx in order to
compare regulator name.
--
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