srp_transport: Simplify attribute initialization code
authorBart Van Assche <bvanassche@acm.org>
Sat, 10 Sep 2011 14:31:57 +0000 (16:31 +0200)
committerRoland Dreier <roland@purestorage.com>
Sat, 1 Dec 2012 01:40:33 +0000 (17:40 -0800)
commit9134a855178f141b9be48aa19b49ed92d82665ce
tree3465c38adc44a680b31f6b0b91ef4b93bbd20398
parentac9be30e91cffe07f762bd91ca40de065bf257d7
srp_transport: Simplify attribute initialization code

Eliminate the private_rport_attrs[] array and the SETUP_*() macros
used to set up that array since the information in that array
duplicates the information in the static device attributes. Also,
verify whether SRP_RPORT_ATTRS is large enough since it is easy to
forget to update that macro when adding new attributes.

Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Cc: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Cc: Robert Jennings <rcj@linux.vnet.ibm.com>
Acked-by: David Dillow <dillowda@ornl.gov>
Signed-off-by: Roland Dreier <roland@purestorage.com>
drivers/scsi/scsi_transport_srp.c