| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-or-later |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * 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. |
|---|
| 17 | 4 | * |
|---|
| 18 | 5 | * Copyright (C) IBM Corporation, 2012 |
|---|
| 19 | 6 | * |
|---|
| .. | .. |
|---|
| 296 | 283 | struct nx842_workmem *workmem; |
|---|
| 297 | 284 | struct nx842_scatterlist slin, slout; |
|---|
| 298 | 285 | struct nx_csbcpb *csbcpb; |
|---|
| 299 | | - int ret = 0, max_sync_size; |
|---|
| 286 | + int ret = 0; |
|---|
| 300 | 287 | unsigned long inbuf, outbuf; |
|---|
| 301 | 288 | struct vio_pfo_op op = { |
|---|
| 302 | 289 | .done = NULL, |
|---|
| .. | .. |
|---|
| 319 | 306 | rcu_read_unlock(); |
|---|
| 320 | 307 | return -ENODEV; |
|---|
| 321 | 308 | } |
|---|
| 322 | | - max_sync_size = local_devdata->max_sync_size; |
|---|
| 323 | 309 | dev = local_devdata->dev; |
|---|
| 324 | 310 | |
|---|
| 325 | 311 | /* Init scatterlist */ |
|---|
| .. | .. |
|---|
| 427 | 413 | struct nx842_workmem *workmem; |
|---|
| 428 | 414 | struct nx842_scatterlist slin, slout; |
|---|
| 429 | 415 | struct nx_csbcpb *csbcpb; |
|---|
| 430 | | - int ret = 0, max_sync_size; |
|---|
| 416 | + int ret = 0; |
|---|
| 431 | 417 | unsigned long inbuf, outbuf; |
|---|
| 432 | 418 | struct vio_pfo_op op = { |
|---|
| 433 | 419 | .done = NULL, |
|---|
| .. | .. |
|---|
| 451 | 437 | rcu_read_unlock(); |
|---|
| 452 | 438 | return -ENODEV; |
|---|
| 453 | 439 | } |
|---|
| 454 | | - max_sync_size = local_devdata->max_sync_size; |
|---|
| 455 | 440 | dev = local_devdata->dev; |
|---|
| 456 | 441 | |
|---|
| 457 | 442 | workmem = PTR_ALIGN(wmem, WORKMEM_ALIGN); |
|---|
| .. | .. |
|---|
| 873 | 858 | rcu_read_lock(); \ |
|---|
| 874 | 859 | local_devdata = rcu_dereference(devdata); \ |
|---|
| 875 | 860 | if (local_devdata) \ |
|---|
| 876 | | - p = snprintf(buf, PAGE_SIZE, "%ld\n", \ |
|---|
| 861 | + p = snprintf(buf, PAGE_SIZE, "%lld\n", \ |
|---|
| 877 | 862 | atomic64_read(&local_devdata->counters->_name)); \ |
|---|
| 878 | 863 | rcu_read_unlock(); \ |
|---|
| 879 | 864 | return p; \ |
|---|
| .. | .. |
|---|
| 926 | 911 | } |
|---|
| 927 | 912 | |
|---|
| 928 | 913 | 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", |
|---|
| 930 | 915 | i ? (2<<(i-1)) : 0, (2<<i)-1, |
|---|
| 931 | 916 | atomic64_read(×[i])); |
|---|
| 932 | 917 | bytes_remain -= bytes; |
|---|
| .. | .. |
|---|
| 934 | 919 | } |
|---|
| 935 | 920 | /* The last bucket holds everything over |
|---|
| 936 | 921 | * 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", |
|---|
| 938 | 923 | 2<<(NX842_HIST_SLOTS - 2), |
|---|
| 939 | 924 | atomic64_read(×[(NX842_HIST_SLOTS - 1)])); |
|---|
| 940 | 925 | p += bytes; |
|---|