[PATCH] CLKDEV: Add helper routines to allocate and add clkdevs for given struct clk *

Domenico Andreoli cavokz at gmail.com
Mon Apr 16 07:52:15 EDT 2012


On Mon, Apr 16, 2012 at 1:02 PM, Russell King - ARM Linux
<linux at arm.linux.org.uk> wrote:
> On Mon, Apr 16, 2012 at 12:56:48PM +0200, Domenico Andreoli wrote:
>> > I don't think these checks actually help anyone, especially if the user
>> > forgets to check the return value (which makes them silent errors.)
>> >
>> > If you're going to abuse the interface by passing a NULL clk_lookup or
>> > num=0 then you deserve to get a big fat oops to tell you that you messed
>> > up.  Same for NULL dev_id and con_id above.
>>
>> I hope for a BUG_ON then.
>
> Would you also like all the standard functions such as strcpy() to also
> check for NULL pointers just in case you want it to copy your string to
> the NULL pointer as well?
>
> This is utterly rediculous.  If your programming ability is soo poor that
> you need this kind of help (because you think you might abuse interfaces
> by doing really stupid stuff like passing NULL clk_lookup pointers to
> functions which can only ever take a valid pointer) then you shouldn't be
> touching the kernel.

ok, you are for the total removal. got it now.

thanks,
Domenico



More information about the linux-arm-kernel mailing list