[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210917144043.566049-7-idosch@idosch.org>
Date: Fri, 17 Sep 2021 17:40:42 +0300
From: Ido Schimmel <idosch@...sch.org>
To: netdev@...r.kernel.org
Cc: mkubecek@...e.cz, vadimp@...dia.com, moshe@...dia.com,
popadrian1996@...il.com, mlxsw@...dia.com,
Ido Schimmel <idosch@...dia.com>
Subject: [PATCH ethtool-next 6/7] sff-8636: Convert if statement to switch-case
From: Ido Schimmel <idosch@...dia.com>
The indentation is wrong and the statement can be more clearly
represented using a switch-case statement. Convert it.
Signed-off-by: Ido Schimmel <idosch@...dia.com>
---
qsfp.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/qsfp.c b/qsfp.c
index 3401db84352d..d1464cb50fdc 100644
--- a/qsfp.c
+++ b/qsfp.c
@@ -863,11 +863,13 @@ void sff8636_show_all(const __u8 *id, __u32 eeprom_len)
}
sff8636_show_identifier(id);
- if ((id[SFF8636_ID_OFFSET] == SFF8024_ID_QSFP) ||
- (id[SFF8636_ID_OFFSET] == SFF8024_ID_QSFP_PLUS) ||
- (id[SFF8636_ID_OFFSET] == SFF8024_ID_QSFP28)) {
+ switch (id[SFF8636_ID_OFFSET]) {
+ case SFF8024_ID_QSFP:
+ case SFF8024_ID_QSFP_PLUS:
+ case SFF8024_ID_QSFP28:
sff8636_show_page_zero(id);
sff8636_show_dom(id, id + 3 * 0x80, eeprom_len);
+ break;
}
}
--
2.31.1
Powered by blists - more mailing lists