All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] FDDI: defxx: simplify if-if to if-else
@ 2022-04-24  9:28 Wan Jiabing
  2022-04-24 10:39 ` Maciej W. Rozycki
  0 siblings, 1 reply; 6+ messages in thread
From: Wan Jiabing @ 2022-04-24  9:28 UTC (permalink / raw)
  To: Maciej W. Rozycki, David S. Miller, Jakub Kicinski, Paolo Abeni,
	netdev, linux-kernel
  Cc: kael_w, Wan Jiabing

Use if and else instead of if(A) and if (!A).

Signed-off-by: Wan Jiabing <wanjiabing@vivo.com>
---
 drivers/net/fddi/defxx.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/fddi/defxx.c b/drivers/net/fddi/defxx.c
index b584ffe38ad6..3edb2e96f763 100644
--- a/drivers/net/fddi/defxx.c
+++ b/drivers/net/fddi/defxx.c
@@ -585,10 +585,10 @@ static int dfx_register(struct device *bdev)
 			bp->mmio = false;
 			dfx_get_bars(bp, bar_start, bar_len);
 		}
-	}
-	if (!dfx_use_mmio)
+	} else {
 		region = request_region(bar_start[0], bar_len[0],
 					bdev->driver->name);
+	}
 	if (!region) {
 		dfx_register_res_err(print_name, dfx_use_mmio,
 				     bar_start[0], bar_len[0]);
-- 
2.35.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2022-04-25 12:07 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-24  9:28 [PATCH] FDDI: defxx: simplify if-if to if-else Wan Jiabing
2022-04-24 10:39 ` Maciej W. Rozycki
2022-04-24 22:17   ` Andrew Lunn
2022-04-24 23:26     ` Maciej W. Rozycki
2022-04-25  3:27       ` Jiabing Wan
2022-04-25 12:06       ` Andrew Lunn

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.