baf5b805cdd824011c20b361fcda9d60595af106
[openwrt/staging/ansuel.git] /
1 From bb8bc7cf60d2c0b097c8b3b0e807f805b577a53f Mon Sep 17 00:00:00 2001
2 From: =?UTF-8?q?Joan=20Bruguera=20Mic=C3=B3?= <joanbrugueram@gmail.com>
3 Date: Mon, 3 Jul 2023 00:46:02 +0000
4 Subject: [PATCH] Move recent Linux version #ifdefs from v6.4 to v6.5
5 MIME-Version: 1.0
6 Content-Type: text/plain; charset=UTF-8
7 Content-Transfer-Encoding: 8bit
8
9 The latest commits, meant to fix the build on Linux 6.4, are actually
10 fixing the build for API changes introduced in the merge window of the
11 yet-unreleased Linux 6.5, and actually break the build for Linux 6.4.
12
13 In particular, the upstream commits introducing the API changes are the
14 following, which are *not* included in the Linux v6.4 tag:
15 * https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=19c4e618a1bc3d0cad1f04c857be8076cb05bbb2
16 * https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=ca5e863233e8f6acd1792fd85d6bc2729a1b2c10
17
18 Change to #ifdef's to v6.5, where they will most likely be included.
19
20 Signed-off-by: Joan Bruguera Micó <joanbrugueram@gmail.com>
21 ---
22 ioctl.c | 4 ++--
23 zc.c | 2 +-
24 2 files changed, 3 insertions(+), 3 deletions(-)
25
26 diff --git a/ioctl.c b/ioctl.c
27 index 4262bbd..e3eefe1 100644
28 --- a/ioctl.c
29 +++ b/ioctl.c
30 @@ -1246,7 +1246,7 @@ static struct ctl_table verbosity_ctl_root[] = {
31 {
32 .procname = "ioctl",
33 .mode = 0555,
34 -#if (LINUX_VERSION_CODE < KERNEL_VERSION(6, 4, 0))
35 +#if (LINUX_VERSION_CODE < KERNEL_VERSION(6, 5, 0))
36 .child = verbosity_ctl_dir,
37 #endif
38 },
39 @@ -1269,7 +1269,7 @@ static int __init init_cryptodev(void)
40 return rc;
41 }
42
43 -#if (LINUX_VERSION_CODE < KERNEL_VERSION(6, 4, 0))
44 +#if (LINUX_VERSION_CODE < KERNEL_VERSION(6, 5, 0))
45 verbosity_sysctl_header = register_sysctl_table(verbosity_ctl_root);
46 #else
47 verbosity_sysctl_header = register_sysctl(verbosity_ctl_root->procname, verbosity_ctl_dir);
48 diff --git a/zc.c b/zc.c
49 index 6637945..00e00c1 100644
50 --- a/zc.c
51 +++ b/zc.c
52 @@ -80,7 +80,7 @@ int __get_userbuf(uint8_t __user *addr, uint32_t len, int write,
53 ret = get_user_pages_remote(task, mm,
54 (unsigned long)addr, pgcount, write ? FOLL_WRITE : 0,
55 pg, NULL, NULL);
56 -#elif (LINUX_VERSION_CODE < KERNEL_VERSION(6, 4, 0))
57 +#elif (LINUX_VERSION_CODE < KERNEL_VERSION(6, 5, 0))
58 ret = get_user_pages_remote(mm,
59 (unsigned long)addr, pgcount, write ? FOLL_WRITE : 0,
60 pg, NULL, NULL);