Commit 7156fffa authored by Kulikov Vasiliy's avatar Kulikov Vasiliy Committed by Jiri Kosina

libfc: use ARRAY_SIZE

Change sizeof(x) / sizeof(*x) to ARRAY_SIZE(x).
Signed-off-by: default avatarKulikov Vasiliy <segooon@gmail.com>
Signed-off-by: default avatarJiri Kosina <jkosina@suse.cz>
parent 501af8d1
...@@ -219,8 +219,6 @@ static void fc_exch_els_rrq(struct fc_seq *, struct fc_frame *); ...@@ -219,8 +219,6 @@ static void fc_exch_els_rrq(struct fc_seq *, struct fc_frame *);
*/ */
static char *fc_exch_rctl_names[] = FC_RCTL_NAMES_INIT; static char *fc_exch_rctl_names[] = FC_RCTL_NAMES_INIT;
#define FC_TABLE_SIZE(x) (sizeof(x) / sizeof(x[0]))
/** /**
* fc_exch_name_lookup() - Lookup name by opcode * fc_exch_name_lookup() - Lookup name by opcode
* @op: Opcode to be looked up * @op: Opcode to be looked up
...@@ -249,7 +247,7 @@ static inline const char *fc_exch_name_lookup(unsigned int op, char **table, ...@@ -249,7 +247,7 @@ static inline const char *fc_exch_name_lookup(unsigned int op, char **table,
static const char *fc_exch_rctl_name(unsigned int op) static const char *fc_exch_rctl_name(unsigned int op)
{ {
return fc_exch_name_lookup(op, fc_exch_rctl_names, return fc_exch_name_lookup(op, fc_exch_rctl_names,
FC_TABLE_SIZE(fc_exch_rctl_names)); ARRAY_SIZE(fc_exch_rctl_names));
} }
/** /**
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment