aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/libfc
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2010-08-04 18:31:02 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2010-08-04 18:31:02 -0400
commit3cfc2c42c1cbc8e238bb9c0612c0df4565e3a8b4 (patch)
tree5adc1ff2eaf64d450bf28bb6b2ce890db2567288 /drivers/scsi/libfc
parent5cf65713f87775c548e3eb48dbafa32e12f28000 (diff)
parent0ea6e61122196509af82cc4f36cbdaacbefb8227 (diff)
Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial
* 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (48 commits) Documentation: update broken web addresses. fix comment typo "choosed" -> "chosen" hostap:hostap_hw.c Fix typo in comment Fix spelling contorller -> controller in comments Kconfig.debug: FAIL_IO_TIMEOUT: typo Faul -> Fault fs/Kconfig: Fix typo Userpace -> Userspace Removing dead MACH_U300_BS26 drivers/infiniband: Remove unnecessary casts of private_data fs/ocfs2: Remove unnecessary casts of private_data libfc: use ARRAY_SIZE scsi: bfa: use ARRAY_SIZE drm: i915: use ARRAY_SIZE drm: drm_edid: use ARRAY_SIZE synclink: use ARRAY_SIZE block: cciss: use ARRAY_SIZE comment typo fixes: charater => character fix comment typos concerning "challenge" arm: plat-spear: fix typo in kerneldoc reiserfs: typo comment fix update email address ...
Diffstat (limited to 'drivers/scsi/libfc')
-rw-r--r--drivers/scsi/libfc/fc_exch.c4
-rw-r--r--drivers/scsi/libfc/fc_lport.c6
-rw-r--r--drivers/scsi/libfc/fc_rport.c2
3 files changed, 5 insertions, 7 deletions
diff --git a/drivers/scsi/libfc/fc_exch.c b/drivers/scsi/libfc/fc_exch.c
index b8560ad8cf66..ec2a1aec2350 100644
--- a/drivers/scsi/libfc/fc_exch.c
+++ b/drivers/scsi/libfc/fc_exch.c
@@ -219,8 +219,6 @@ static void fc_exch_els_rrq(struct fc_frame *);
219 */ 219 */
220static char *fc_exch_rctl_names[] = FC_RCTL_NAMES_INIT; 220static char *fc_exch_rctl_names[] = FC_RCTL_NAMES_INIT;
221 221
222#define FC_TABLE_SIZE(x) (sizeof(x) / sizeof(x[0]))
223
224/** 222/**
225 * fc_exch_name_lookup() - Lookup name by opcode 223 * fc_exch_name_lookup() - Lookup name by opcode
226 * @op: Opcode to be looked up 224 * @op: Opcode to be looked up
@@ -249,7 +247,7 @@ static inline const char *fc_exch_name_lookup(unsigned int op, char **table,
249static const char *fc_exch_rctl_name(unsigned int op) 247static const char *fc_exch_rctl_name(unsigned int op)
250{ 248{
251 return fc_exch_name_lookup(op, fc_exch_rctl_names, 249 return fc_exch_name_lookup(op, fc_exch_rctl_names,
252 FC_TABLE_SIZE(fc_exch_rctl_names)); 250 ARRAY_SIZE(fc_exch_rctl_names));
253} 251}
254 252
255/** 253/**
diff --git a/drivers/scsi/libfc/fc_lport.c b/drivers/scsi/libfc/fc_lport.c
index 6eb334a8a7fa..d9b6e11b0e88 100644
--- a/drivers/scsi/libfc/fc_lport.c
+++ b/drivers/scsi/libfc/fc_lport.c
@@ -32,11 +32,11 @@
32 * invalid SID. We also need to ensure that states don't change unexpectedly 32 * invalid SID. We also need to ensure that states don't change unexpectedly
33 * while processing another state. 33 * while processing another state.
34 * 34 *
35 * HEIRARCHY 35 * HIERARCHY
36 * 36 *
37 * The following heirarchy defines the locking rules. A greater lock 37 * The following hierarchy defines the locking rules. A greater lock
38 * may be held before acquiring a lesser lock, but a lesser lock should never 38 * may be held before acquiring a lesser lock, but a lesser lock should never
39 * be held while attempting to acquire a greater lock. Here is the heirarchy- 39 * be held while attempting to acquire a greater lock. Here is the hierarchy-
40 * 40 *
41 * lport > disc, lport > rport, disc > rport 41 * lport > disc, lport > rport, disc > rport
42 * 42 *
diff --git a/drivers/scsi/libfc/fc_rport.c b/drivers/scsi/libfc/fc_rport.c
index 25479cc7f170..b9f2286fe0cb 100644
--- a/drivers/scsi/libfc/fc_rport.c
+++ b/drivers/scsi/libfc/fc_rport.c
@@ -34,7 +34,7 @@
34 * The rport should never hold the rport mutex and then attempt to acquire 34 * The rport should never hold the rport mutex and then attempt to acquire
35 * either the lport or disc mutexes. The rport's mutex is considered lesser 35 * either the lport or disc mutexes. The rport's mutex is considered lesser
36 * than both the lport's mutex and the disc mutex. Refer to fc_lport.c for 36 * than both the lport's mutex and the disc mutex. Refer to fc_lport.c for
37 * more comments on the heirarchy. 37 * more comments on the hierarchy.
38 * 38 *
39 * The locking strategy is similar to the lport's strategy. The lock protects 39 * The locking strategy is similar to the lport's strategy. The lock protects
40 * the rport's states and is held and released by the entry points to the rport 40 * the rport's states and is held and released by the entry points to the rport