summaryrefslogtreecommitdiff
path: root/drivers/scsi/qla4xxx/ql4_version.h
diff options
context:
space:
mode:
authorRobert Love <robert.w.love@intel.com>2012-11-27 06:53:19 +0000
committerRobert Love <robert.w.love@intel.com>2012-12-04 10:16:38 -0800
commitef60f674344cdb6d1da199f6b8d7d7016813cc6f (patch)
treeaafc59aa0fe5fd86e29c01abc882f819a8239725 /drivers/scsi/qla4xxx/ql4_version.h
parent354d1123c16942b8a3ca9131b8fc2f8c06e2ed7f (diff)
libfcoe: Save some memory and optimize name lookups
Instead of creating a structure with an enum and a pointer to a string, simply allocate an array of strings and use the enum values for the indicies. This means that we do not need to iterate through the list of entries when looking up a string name by its enum key. This will also help with a latter patch that will add more fcoe_sysfs attributes that will also use the fcoe_enum_name_search macro. One attribute will also do a reverse lookup which requires less code when the enum-to-string mappings are organized as this patch makes them to be. Signed-off-by: Robert Love <robert.w.love@intel.com> Acked-by: Neil Horman <nhorman@tuxdriver.com>
Diffstat (limited to 'drivers/scsi/qla4xxx/ql4_version.h')
0 files changed, 0 insertions, 0 deletions