hc
2023-12-11 d2ccde1c8e90d38cee87a1b0309ad2827f3fd30d
kernel/drivers/crypto/nx/nx-842-pseries.c
....@@ -1,19 +1,6 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /*
23 * Driver for IBM Power 842 compression accelerator
3
- *
4
- * This program is free software; you can redistribute it and/or modify
5
- * it under the terms of the GNU General Public License as published by
6
- * the Free Software Foundation; either version 2 of the License, or
7
- * (at your option) any later version.
8
- *
9
- * This program is distributed in the hope that it will be useful,
10
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
11
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
- * GNU General Public License for more details.
13
- *
14
- * You should have received a copy of the GNU General Public License
15
- * along with this program; if not, write to the Free Software
16
- * Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
174 *
185 * Copyright (C) IBM Corporation, 2012
196 *
....@@ -296,7 +283,7 @@
296283 struct nx842_workmem *workmem;
297284 struct nx842_scatterlist slin, slout;
298285 struct nx_csbcpb *csbcpb;
299
- int ret = 0, max_sync_size;
286
+ int ret = 0;
300287 unsigned long inbuf, outbuf;
301288 struct vio_pfo_op op = {
302289 .done = NULL,
....@@ -319,7 +306,6 @@
319306 rcu_read_unlock();
320307 return -ENODEV;
321308 }
322
- max_sync_size = local_devdata->max_sync_size;
323309 dev = local_devdata->dev;
324310
325311 /* Init scatterlist */
....@@ -427,7 +413,7 @@
427413 struct nx842_workmem *workmem;
428414 struct nx842_scatterlist slin, slout;
429415 struct nx_csbcpb *csbcpb;
430
- int ret = 0, max_sync_size;
416
+ int ret = 0;
431417 unsigned long inbuf, outbuf;
432418 struct vio_pfo_op op = {
433419 .done = NULL,
....@@ -451,7 +437,6 @@
451437 rcu_read_unlock();
452438 return -ENODEV;
453439 }
454
- max_sync_size = local_devdata->max_sync_size;
455440 dev = local_devdata->dev;
456441
457442 workmem = PTR_ALIGN(wmem, WORKMEM_ALIGN);
....@@ -873,7 +858,7 @@
873858 rcu_read_lock(); \
874859 local_devdata = rcu_dereference(devdata); \
875860 if (local_devdata) \
876
- p = snprintf(buf, PAGE_SIZE, "%ld\n", \
861
+ p = snprintf(buf, PAGE_SIZE, "%lld\n", \
877862 atomic64_read(&local_devdata->counters->_name)); \
878863 rcu_read_unlock(); \
879864 return p; \
....@@ -926,7 +911,7 @@
926911 }
927912
928913 for (i = 0; i < (NX842_HIST_SLOTS - 2); i++) {
929
- bytes = snprintf(p, bytes_remain, "%u-%uus:\t%ld\n",
914
+ bytes = snprintf(p, bytes_remain, "%u-%uus:\t%lld\n",
930915 i ? (2<<(i-1)) : 0, (2<<i)-1,
931916 atomic64_read(&times[i]));
932917 bytes_remain -= bytes;
....@@ -934,7 +919,7 @@
934919 }
935920 /* The last bucket holds everything over
936921 * 2<<(NX842_HIST_SLOTS - 2) us */
937
- bytes = snprintf(p, bytes_remain, "%uus - :\t%ld\n",
922
+ bytes = snprintf(p, bytes_remain, "%uus - :\t%lld\n",
938923 2<<(NX842_HIST_SLOTS - 2),
939924 atomic64_read(&times[(NX842_HIST_SLOTS - 1)]));
940925 p += bytes;