[PATCH] s390/cio: use assign_bit() where applicable

Peng Fan (OSS) posted 1 patch 5 days, 8 hours ago
drivers/s390/cio/blacklist.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
[PATCH] s390/cio: use assign_bit() where applicable
Posted by Peng Fan (OSS) 5 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/s390/cio/blacklist.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/s390/cio/blacklist.c b/drivers/s390/cio/blacklist.c
index 020d210bde9f..c80c1f527bb1 100644
--- a/drivers/s390/cio/blacklist.c
+++ b/drivers/s390/cio/blacklist.c
@@ -60,10 +60,7 @@ static int blacklist_range(range_action action, unsigned int from_ssid,
 
 	while ((from_ssid < to_ssid) || ((from_ssid == to_ssid) &&
 	       (from <= to))) {
-		if (action == add)
-			set_bit(from, bl_dev[from_ssid]);
-		else
-			clear_bit(from, bl_dev[from_ssid]);
+		assign_bit(from, bl_dev[from_ssid], action == add);
 		from++;
 		if (from > __MAX_SUBCHANNEL) {
 			from_ssid++;
-- 
2.51.0