|
|
Re: [PATCH] CLKDEV: Add helper routines to allocate and add clkdevs for given struct clk * |
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. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
[Linux ARM (vger)] [Linux ARM MSM] [Linux Omap] [Linux Arm] [Linux Tegra] [Fedora ARM] [eCos] [Linux Fastboot] [Gcc Help] [Git] [DCCP] [IETF Announce] [Security] [PDAs] [Linux] [Linux MIPS] [Yosemite Campsites] [Photos]
![]() |
![]() |