What's up of this if (likely()) bracing?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello *,

I am not sure to have perfectly understand all subtle details of likely() &
unlikely() macros but I think there's some brace at the bad place in following
chunk:
--- arch/parisc/lib/memcpy.c.Orig	2007-10-18 15:27:30.000000000 +0000
+++ arch/parisc/lib/memcpy.c	2008-01-03 10:17:52.000000000 +0000
@@ -299,7 +299,7 @@
 
 	/* Check alignment */
 	t1 = (src ^ dst);
-	if (unlikely(t1 & (sizeof(double)-1)))
+	if (unlikely(t1 & (sizeof(double) - 1)))
 		goto unaligned_copy;
 
 	/* src and dst have same alignment. */
@@ -405,7 +405,7 @@
 
 unaligned_copy:
 	/* possibly we are aligned on a word, but not on a double... */
-	if (likely(t1 & (sizeof(unsigned int)-1)) == 0) {
+	if (likely((t1 & (sizeof(unsigned int) - 1)) == 0)) {
 		t2 = src & (sizeof(unsigned int) - 1);
 
 		if (unlikely(t2 != 0)) {
=== <> ===
First hunk is just to add some whitespace?

Otoh for the second hunk, my reading of the original stuff was that:
> likely(t1 & (sizeof(unsigned int)-1)) 
i.e. likely's macro embraced only "t1 & (sizeof(unsigned int)-1)" in place of
"(t1 & (sizeof(unsigned int)-1)) == 0".

What's your opinion?

Tia,
    r.
---
Scarlet One, ADSL 6 Mbps + Telephone, from EUR 29,95...
http://www.scarlet.be/

-
To unsubscribe from this list: send the line "unsubscribe linux-parisc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux SoC]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux