hc
2024-12-19 9370bb92b2d16684ee45cf24e879c93c509162da
kernel/drivers/scsi/libfc/fc_exch.c
....@@ -1,20 +1,8 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * Copyright(c) 2007 Intel Corporation. All rights reserved.
34 * Copyright(c) 2008 Red Hat, Inc. All rights reserved.
45 * Copyright(c) 2008 Mike Christie
5
- *
6
- * This program is free software; you can redistribute it and/or modify it
7
- * under the terms and conditions of the GNU General Public License,
8
- * version 2, as published by the Free Software Foundation.
9
- *
10
- * This program is distributed in the hope it will be useful, but WITHOUT
11
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
13
- * more details.
14
- *
15
- * You should have received a copy of the GNU General Public License along with
16
- * this program; if not, write to the Free Software Foundation, Inc.,
17
- * 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
186 *
197 * Maintained at www.Open-FCoE.org
208 */
....@@ -61,6 +49,8 @@
6149 * @total_exches: Total allocated exchanges
6250 * @lock: Exch pool lock
6351 * @ex_list: List of exchanges
52
+ * @left: Cache of free slot in exch array
53
+ * @right: Cache of free slot in exch array
6454 *
6555 * This structure manages per cpu exchanges in array of exchange pointers.
6656 * This array is allocated followed by struct fc_exch_pool memory for
....@@ -72,7 +62,6 @@
7262 u16 next_index;
7363 u16 total_exches;
7464
75
- /* two cache of free slot in exch array */
7665 u16 left;
7766 u16 right;
7867 } ____cacheline_aligned_in_smp;
....@@ -86,6 +75,7 @@
8675 * @ep_pool: Reserved exchange pointers
8776 * @pool_max_index: Max exch array index in exch pool
8877 * @pool: Per cpu exch pool
78
+ * @lport: Local exchange port
8979 * @stats: Statistics structure
9080 *
9181 * This structure is the center for creating exchanges and sequences.
....@@ -714,6 +704,9 @@
714704
715705 /**
716706 * fc_invoke_resp() - invoke ep->resp()
707
+ * @ep: The exchange to be operated on
708
+ * @fp: The frame pointer to pass through to ->resp()
709
+ * @sp: The sequence pointer to pass through to ->resp()
717710 *
718711 * Notes:
719712 * It is assumed that after initialization finished (this means the
....@@ -1709,6 +1702,7 @@
17091702 if (cancel_delayed_work_sync(&ep->timeout_work)) {
17101703 FC_EXCH_DBG(ep, "Exchange timer canceled due to ABTS response\n");
17111704 fc_exch_release(ep); /* release from pending timer hold */
1705
+ return;
17121706 }
17131707
17141708 spin_lock_bh(&ep->ex_lock);
....@@ -2127,7 +2121,7 @@
21272121 switch (op) {
21282122 case ELS_LS_RJT:
21292123 FC_EXCH_DBG(aborted_ep, "LS_RJT for RRQ\n");
2130
- /* fall through */
2124
+ fallthrough;
21312125 case ELS_LS_ACC:
21322126 goto cleanup;
21332127 default:
....@@ -2641,7 +2635,7 @@
26412635 case FC_EOF_T:
26422636 if (f_ctl & FC_FC_END_SEQ)
26432637 skb_trim(fp_skb(fp), fr_len(fp) - FC_FC_FILL(f_ctl));
2644
- /* fall through */
2638
+ fallthrough;
26452639 case FC_EOF_N:
26462640 if (fh->fh_type == FC_TYPE_BLS)
26472641 fc_exch_recv_bls(ema->mp, fp);