hc
2023-12-09 b22da3d8526a935aa31e086e63f60ff3246cb61c
kernel/drivers/net/ethernet/ibm/ehea/ehea_qmr.c
....@@ -1,3 +1,4 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /*
23 * linux/drivers/net/ethernet/ibm/ehea/ehea_qmr.c
34 *
....@@ -9,21 +10,6 @@
910 * Christoph Raisch <raisch@de.ibm.com>
1011 * Jan-Bernd Themann <themann@de.ibm.com>
1112 * Thomas Klein <tklein@de.ibm.com>
12
- *
13
- *
14
- * This program is free software; you can redistribute it and/or modify
15
- * it under the terms of the GNU General Public License as published by
16
- * the Free Software Foundation; either version 2, or (at your option)
17
- * any later version.
18
- *
19
- * This program is distributed in the hope that it will be useful,
20
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
21
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22
- * GNU General Public License for more details.
23
- *
24
- * You should have received a copy of the GNU General Public License
25
- * along with this program; if not, write to the Free Software
26
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
2713 */
2814
2915 #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
....@@ -123,9 +109,8 @@
123109 int nr_of_cqe, u64 eq_handle, u32 cq_token)
124110 {
125111 struct ehea_cq *cq;
126
- struct h_epa epa;
127
- u64 *cq_handle_ref, hret, rpage;
128
- u32 act_nr_of_entries, act_pages, counter;
112
+ u64 hret, rpage;
113
+ u32 counter;
129114 int ret;
130115 void *vpage;
131116
....@@ -138,10 +123,6 @@
138123 cq->attr.eq_handle = eq_handle;
139124
140125 cq->adapter = adapter;
141
-
142
- cq_handle_ref = &cq->fw_handle;
143
- act_nr_of_entries = 0;
144
- act_pages = 0;
145126
146127 hret = ehea_h_alloc_resource_cq(adapter->handle, &cq->attr,
147128 &cq->fw_handle, &cq->epas);
....@@ -190,7 +171,6 @@
190171 }
191172
192173 hw_qeit_reset(&cq->hw_queue);
193
- epa = cq->epas.kernel;
194174 ehea_reset_cq_ep(cq);
195175 ehea_reset_cq_n1(cq);
196176
....@@ -690,13 +670,10 @@
690670
691671 static int ehea_is_hugepage(unsigned long pfn)
692672 {
693
- int page_order;
694
-
695673 if (pfn & EHEA_HUGEPAGE_PFN_MASK)
696674 return 0;
697675
698
- page_order = compound_order(pfn_to_page(pfn));
699
- if (page_order + PAGE_SHIFT != EHEA_HUGEPAGESHIFT)
676
+ if (page_shift(pfn_to_page(pfn)) != EHEA_HUGEPAGESHIFT)
700677 return 0;
701678
702679 return 1;