summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorManuel Bentele2022-10-05 08:02:50 +0200
committerManuel Bentele2022-10-05 08:12:17 +0200
commitc2c1f5f9b8fd207f0a4a45136613ef3ada16d58e (patch)
treebcf8934074c3c3eba4e9b5c20903bed5971f355b
parentAdapt to Linux 5.18 (diff)
downloadxloop-c2c1f5f9b8fd207f0a4a45136613ef3ada16d58e.tar.gz
xloop-c2c1f5f9b8fd207f0a4a45136613ef3ada16d58e.tar.xz
xloop-c2c1f5f9b8fd207f0a4a45136613ef3ada16d58e.zip
Fix linter issues to satisfy Linux kernel code style
-rw-r--r--src/kernel/xloop_file_fmt_qcow_main.c4
-rw-r--r--src/kernel/xloop_main.c2
-rw-r--r--src/kernel/xloop_main.h2
3 files changed, 7 insertions, 1 deletions
diff --git a/src/kernel/xloop_file_fmt_qcow_main.c b/src/kernel/xloop_file_fmt_qcow_main.c
index d80a074..8eb7b52 100644
--- a/src/kernel/xloop_file_fmt_qcow_main.c
+++ b/src/kernel/xloop_file_fmt_qcow_main.c
@@ -682,6 +682,7 @@ static int qcow_file_fmt_init(struct xloop_file_fmt *xlo_fmt)
if (qcow_data->l1_size > 0) {
const int read_size = qcow_data->l1_size * QCOW_L1E_SIZE;
+
qcow_data->l1_table = vzalloc(round_up(qcow_data->l1_size * QCOW_L1E_SIZE, 512));
if (qcow_data->l1_table == NULL) {
ret = -ENOMEM;
@@ -920,7 +921,8 @@ static ssize_t __qcow_file_fmt_zstd_decompress(struct xloop_file_fmt *xlo_fmt, v
if (zstd_is_error(zstd_ret)) {
dev_err(xloop_file_fmt_to_dev(xlo_fmt), "zstd decompress error: %d\n", (int)zstd_ret);
ret = -EIO;
- } if (zstd_ret) {
+ }
+ if (zstd_ret) {
dev_err(xloop_file_fmt_to_dev(xlo_fmt), "zstd incomplete frame at end of cluster\n");
ret = -EIO;
} else {
diff --git a/src/kernel/xloop_main.c b/src/kernel/xloop_main.c
index cd1a767..9a9479f 100644
--- a/src/kernel/xloop_main.c
+++ b/src/kernel/xloop_main.c
@@ -1,3 +1,5 @@
+// SPDX-License-Identifier: GPL-2.0
+
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
#include "xloop_main.h"
diff --git a/src/kernel/xloop_main.h b/src/kernel/xloop_main.h
index 3649039..a71f776 100644
--- a/src/kernel/xloop_main.h
+++ b/src/kernel/xloop_main.h
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+
#include <linux/version.h>
/* define RHEL_CHECK_VERSION macro to check CentOS version */