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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAGsJ_4yJZYHUzr9YerdM5o8grGd6iP51ra4nJkMuOo5Khn95RQ@mail.gmail.com>
Date:	Wed, 1 Feb 2012 10:11:10 +0800
From:	Barry Song <21cnbao@...il.com>
To:	Wolfram Sang <w.sang@...gutronix.de>
Cc:	Grant Likely <grant.likely@...retlab.ca>,
	Barry Song <Barry.Song@....com>,
	Linus Walleij <linus.walleij@...aro.org>,
	Greg Kroah-Hartman <gregkh@...e.de>,
	linux-kernel@...r.kernel.org, workgroup.linux@....com,
	Erik Gilling <konkers@...gle.com>,
	linux-mtd@...ts.infradead.org, Barry Song <Baohua.Song@....com>,
	David Woodhouse <dwmw2@...radead.org>,
	Atsushi Nemoto <anemo@....ocn.ne.jp>
Subject: Re: [PATCH 1/3] platform: add common resource requesting and mapping helper

hi Wolfram,

2012/2/1 Wolfram Sang <w.sang@...gutronix.de>:
>
>> > I am not sure using 'platform_devm_request_and_ioremap' and later using
>> > plain 'devm_*' functions (without platform_-prefix) is less confusing.
>> > The alternative would be to check which helper functions also use
>> > 'struct resource' and if they do checks on that. If all do that, you
>> > would have the simple rule, that you only need to check yourself if you
>> > access it yourself.
>>
>> The reason I suggested the wrapper is that then the driver code doesn't need
>> to fart around with the res pointer at all.  It reduces boilerplate in platform
>> drivers which I think is a good thing.
>
> I do understand your motivation and fully agree with what you are aiming for
> (that's exactly why I implemented devm_request_and_ioremap()).
>
> This patch is a micro-optimization, though, and won't cut it IMHO. I still have
> issues with only one platform_devm_* and all the rest being devm_* (without
> platform_). Things might look better, if we'd for example also have
> platform_devm_request_irq() or something similar. That might be an approach
> where we can play around with and see what is left to do. Or, if other
> approaches might be more elegant.
>
> To discuss that, try things, etc, I'd simply like to have a bit more time. If
> we are accepting the first iteration right away, and people let run their
> coccinelle-scripts based on that, it might get annoying to change that a second
> time, I'd think.
>

i think it makes sense for us to have platform_devm_request_irq() and
similar things. i'll take care.

PS:  as the man maintaining embedded systems of the i2c subsystem,
would you comment the CSR i2c driver which has been there waiting for
a long time?
http://www.spinics.net/lists/linux-i2c/msg07081.html

> Regards,
>
>   Wolfram
>
> --
> Pengutronix e.K.                           | Wolfram Sang                |
> Industrial Linux Solutions                 | http://www.pengutronix.de/  |

Thanks
barry
--
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