Messages in this thread |  | | | Date | Wed, 23 Nov 2005 16:12:14 +0100 | | From | Vincent Hanquez <> | | Subject | Re: [patch] SMP alternatives |
| |
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 majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
|  |