On Tue, Nov 22, 2005 at 06:48:07PM +0100, Gerd Knorr wrote:
> + smp = kmalloc(sizeof(*smp), GFP_KERNEL);
> + if (NULL == smp)
> + return; /* we'll run the (safe but slow) SMP code then ... */
> +
> + memset(smp,0,sizeof(*smp));
what about using kzalloc ?
> + if (ALT_UP == smp_alt_state)
> + goto out;
any chance to write it smp_alt_state == ALT_UP ?
IMHO, this way of writting equal condition is backward (like giving
answer before asking the question). I do know of the (pseudo-)benefit
to write it this way, but that's not worth it.
Plus, nowadays, gcc warns you about simple equal in if.
Cheers,
--
Vincent Hanquez
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]