mirror of
https://github.com/SCST-project/scst.git
synced 2026-05-19 03:31:26 +00:00
qla2xxx: Use ARRAY_SIZE() in the definition of QLA_LAST_SPEED
Make the code easier to read by avoiding to use a hard-coded constant. This patch does not change any functionality. git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8231 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
@@ -378,7 +378,7 @@ qla2x00_get_link_speed_str(struct qla_hw_data *ha, uint16_t speed)
|
||||
static const char *const link_speeds[] = {
|
||||
"1", "2", "?", "4", "8", "16", "32", "10"
|
||||
};
|
||||
#define QLA_LAST_SPEED 7
|
||||
#define QLA_LAST_SPEED (ARRAY_SIZE(link_speeds) - 1)
|
||||
|
||||
if (IS_QLA2100(ha) || IS_QLA2200(ha))
|
||||
return link_speeds[0];
|
||||
|
||||
Reference in New Issue
Block a user