]> git.baikalelectronics.ru Git - kernel.git/commit
target_core: simplify scsi_name_len calculation
authorHannes Reinecke <hare@suse.de>
Tue, 17 Dec 2013 08:18:47 +0000 (09:18 +0100)
committerNicholas Bellinger <nab@linux-iscsi.org>
Tue, 17 Dec 2013 19:05:33 +0000 (11:05 -0800)
commit923a824b83bd36071875b2c5093ff7c4e8818274
treea19747e4c25e7eb33b33eb077903f38897b66e69
parentb8cf9b718b5b241928b5640a8499134983460b84
target_core: simplify scsi_name_len calculation

scsi_name_len in spc_emulate_evpd_83 is calculated twice, with
the results of the first calculation discarded. So remove it.
And check for the maximum allowed length, too.

Signed-off-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
drivers/target/target_core_spc.c