forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-01-31 f70575805708cabdedea7498aaa3f710fde4d920
kernel/drivers/target/tcm_fc/tfc_io.c
....@@ -1,3 +1,4 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * Copyright (c) 2010 Cisco Systems, Inc.
34 *
....@@ -9,19 +10,6 @@
910 * Copyright (c) 2009 Rising Tide, Inc.
1011 * Copyright (c) 2009 Linux-iSCSI.org
1112 * Copyright (c) 2009 Nicholas A. Bellinger <nab@linux-iscsi.org>
12
- *
13
- * This program is free software; you can redistribute it and/or modify it
14
- * under the terms and conditions of the GNU General Public License,
15
- * version 2, as published by the Free Software Foundation.
16
- *
17
- * This program is distributed in the hope it will be useful, but WITHOUT
18
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
19
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
20
- * more details.
21
- *
22
- * You should have received a copy of the GNU General Public License along with
23
- * this program; if not, write to the Free Software Foundation, Inc.,
24
- * 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
2513 */
2614
2715 /* XXX TBD some includes may be extraneous */
....@@ -148,8 +136,7 @@
148136 page, off_in_page, tlen);
149137 fr_len(fp) += tlen;
150138 fp_skb(fp)->data_len += tlen;
151
- fp_skb(fp)->truesize +=
152
- PAGE_SIZE << compound_order(page);
139
+ fp_skb(fp)->truesize += page_size(page);
153140 } else {
154141 BUG_ON(!page);
155142 from = kmap_atomic(page + (mem_off >> PAGE_SHIFT));
....@@ -234,7 +221,6 @@
234221 ep = fc_seq_exch(seq);
235222 lport = ep->lp;
236223 if (cmd->was_ddp_setup) {
237
- BUG_ON(!ep);
238224 BUG_ON(!lport);
239225 /*
240226 * Since DDP (Large Rx offload) was setup for this request,