Skip to contentSkip to conversation

drivers/mtd/onenand/onenand_base.c unlikely(x) || unlikely(y) => unlikely(x || y)

PATCH In review Roel Kluin 2 participants 2 messages Feb 16, 2008 – Feb 18, 2008 Memory technology devices (MTD)

lore
Share & tools
lore

Roel Kluin

author
#0 lore raw

PATCH 1/1 drivers/mtd/onenand/onenand_base.c unlikely(x) || unlikely(y) => unlikely(x || y)

Not yet tested.
---
Replace unlikely(x) || unlikely(y) by unlikely(x || y)

---

drivers/mtd/onenand/onenand_base.c +2 -2
index 8d7d21b..7334b4a 100644
@@ -1336,7 +1336,7 @@ static int onenand_panic_write(struct mtd_info *mtd, loff_t to, size_t len,
 	}
 
 	/* Reject writes, which are not page aligned */
-        if (unlikely(NOTALIGNED(to)) || unlikely(NOTALIGNED(len))) {
+        if (unlikely(NOTALIGNED(to) || NOTALIGNED(len))) {
                 printk(KERN_ERR "onenand_panic_write: Attempt to write not page aligned data\n");
                 return -EINVAL;
         }
@@ -1466,7 +1466,7 @@ static int onenand_write_ops_nolock(struct mtd_info *mtd, loff_t to,
 	}
 
 	/* Reject writes, which are not page aligned */
-        if (unlikely(NOTALIGNED(to)) || unlikely(NOTALIGNED(len))) {
+        if (unlikely(NOTALIGNED(to) || NOTALIGNED(len))) {
                 printk(KERN_ERR "onenand_write_ops_nolock: Attempt to write not page aligned data\n");
                 return -EINVAL;
         }