]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
zram: remove unused crypto include
authorSergey Senozhatsky <senozhatsky@chromium.org>
Fri, 21 Feb 2025 22:25:34 +0000 (07:25 +0900)
committerAndrew Morton <akpm@linux-foundation.org>
Fri, 28 Feb 2025 01:00:22 +0000 (17:00 -0800)
We stopped using crypto API (for the time being), so remove its include
and replace CRYPTO_MAX_ALG_NAME with a local define.

Link: https://lkml.kernel.org/r/20250221222958.2225035-4-senozhatsky@chromium.org
Signed-off-by: Sergey Senozhatsky <senozhatsky@chromium.org>
Cc: Minchan Kim <minchan@kernel.org>
Cc: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Cc: Yosry Ahmed <yosry.ahmed@linux.dev>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
drivers/block/zram/zcomp.c
drivers/block/zram/zram_drv.c
drivers/block/zram/zram_drv.h

index 53e4c37441be1d77b3e3c0266b77acd9d73d7586..cfdde2e0748a91cccb9fdca7e16c5253809c2eb8 100644 (file)
@@ -7,7 +7,6 @@
 #include <linux/wait.h>
 #include <linux/sched.h>
 #include <linux/cpuhotplug.h>
-#include <linux/crypto.h>
 #include <linux/vmalloc.h>
 
 #include "zcomp.h"
index 1b5bb206239f4e35a19371a5a1f0c39afa7354de..c73d8024f48fc36afa06aa4d94b482d1c81df59e 100644 (file)
@@ -44,6 +44,8 @@ static DEFINE_MUTEX(zram_index_mutex);
 static int zram_major;
 static const char *default_compressor = CONFIG_ZRAM_DEF_COMP;
 
+#define ZRAM_MAX_ALGO_NAME_SZ  128
+
 /* Module params (documentation at end) */
 static unsigned int num_devices = 1;
 /*
@@ -1154,7 +1156,7 @@ static int __comp_algorithm_store(struct zram *zram, u32 prio, const char *buf)
        size_t sz;
 
        sz = strlen(buf);
-       if (sz >= CRYPTO_MAX_ALG_NAME)
+       if (sz >= ZRAM_MAX_ALGO_NAME_SZ)
                return -E2BIG;
 
        compressor = kstrdup(buf, GFP_KERNEL);
index 794c9234e627ccb986c4cbe146a4926e3c57bcb1..2c380ea9a8164036c241fbdb6140e24a39578c2d 100644 (file)
@@ -17,7 +17,6 @@
 
 #include <linux/rwsem.h>
 #include <linux/zsmalloc.h>
-#include <linux/crypto.h>
 
 #include "zcomp.h"