[PATCH] 2.6 PPC64: lockfix for rtas error log (third-times-a-charm?)]
Olof Johansson
olof at austin.ibm.com
Fri Jul 2 07:15:12 EST 2004
linas at austin.ibm.com wrote:
> + /* Log the error in the unlikely case that there was one. */
> + if (unlikely(logit)) {
> + buff_copy = kmalloc (RTAS_ERROR_LOG_MAX, GFP_ATOMIC);
> + if (buff_copy) {
> + memcpy (buff_copy, rtas_err_buf, RTAS_ERROR_LOG_MAX);
> + }
> + }
This isn't performance critical code, do you really need to hard code
unlikely here? The compiler and processor do pretty good prediction on
it's own where needed.
(also, as Greg said, you have extra whitespace in some places, including
after kmallocs and kfrees)
-Olof
** Sent via the linuxppc64-dev mail list. See http://lists.linuxppc.org/
More information about the Linuxppc64-dev
mailing list