[PATCH] zorro: use assign_bit() where applicable

Peng Fan (OSS) posted 1 patch 6 days, 8 hours ago
drivers/zorro/zorro.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
[PATCH] zorro: use assign_bit() where applicable
Posted by Peng Fan (OSS) 6 days, 8 hours ago
From: Peng Fan <peng.fan@nxp.com>

Convert open-coded if/else with set_bit/clear_bit to the assign_bit API.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
---
 drivers/zorro/zorro.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/zorro/zorro.c b/drivers/zorro/zorro.c
index 45495c423c79..cc3177cc681c 100644
--- a/drivers/zorro/zorro.c
+++ b/drivers/zorro/zorro.c
@@ -103,10 +103,7 @@ static void __init mark_region(unsigned long start, unsigned long end,
 	while (start < end) {
 		u32 chunk = start>>Z2RAM_CHUNKSHIFT;
 
-		if (flag)
-			set_bit(chunk, zorro_unused_z2ram);
-		else
-			clear_bit(chunk, zorro_unused_z2ram);
+		assign_bit(chunk, zorro_unused_z2ram, flag);
 		start += Z2RAM_CHUNKSIZE;
 	}
 }
-- 
2.51.0