linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Sergey Senozhatsky <senozhatsky@chromium.org>
To: Andrew Morton <akpm@linux-foundation.org>,
	Minchan Kim <minchan@kernel.org>
Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org,
	Sergey Senozhatsky <senozhatsky@chromium.org>
Subject: [PATCHv2 3/9] zram: remove crypto include
Date: Mon, 27 Jan 2025 16:29:14 +0900	[thread overview]
Message-ID: <20250127072932.1289973-4-senozhatsky@chromium.org> (raw)
In-Reply-To: <20250127072932.1289973-1-senozhatsky@chromium.org>

Remove a leftover crypto header include.

Signed-off-by: Sergey Senozhatsky <senozhatsky@chromium.org>
---
 drivers/block/zram/zcomp.c    | 1 -
 drivers/block/zram/zram_drv.c | 4 +++-
 drivers/block/zram/zram_drv.h | 1 -
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/block/zram/zcomp.c b/drivers/block/zram/zcomp.c
index 982c769d5831..efd5919808d9 100644
--- a/drivers/block/zram/zcomp.c
+++ b/drivers/block/zram/zcomp.c
@@ -7,7 +7,6 @@
 #include <linux/wait.h>
 #include <linux/sched.h>
 #include <linux/cpumask.h>
-#include <linux/crypto.h>
 #include <linux/vmalloc.h>
 
 #include "zcomp.h"
diff --git a/drivers/block/zram/zram_drv.c b/drivers/block/zram/zram_drv.c
index 486068dda395..c1ecaac0b39f 100644
--- a/drivers/block/zram/zram_drv.c
+++ b/drivers/block/zram/zram_drv.c
@@ -43,6 +43,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	64
+
 /* Module params (documentation at end) */
 static unsigned int num_devices = 1;
 /*
@@ -1148,7 +1150,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);
diff --git a/drivers/block/zram/zram_drv.h b/drivers/block/zram/zram_drv.h
index 3436ddf8ab23..045032acb22f 100644
--- a/drivers/block/zram/zram_drv.h
+++ b/drivers/block/zram/zram_drv.h
@@ -16,7 +16,6 @@
 #define _ZRAM_DRV_H_
 
 #include <linux/zsmalloc.h>
-#include <linux/crypto.h>
 
 #include "zcomp.h"
 
-- 
2.48.1.262.g85cc9f2d1e-goog



  parent reply	other threads:[~2025-01-27  7:30 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-27  7:29 [PATCHv2 0/9] zram: preemptible writes and occasionally preemptible reads Sergey Senozhatsky
2025-01-27  7:29 ` [PATCHv2 1/9] zram: switch to non-atomic entry locking Sergey Senozhatsky
2025-01-27  7:29 ` [PATCHv2 2/9] zram: do not use per-CPU compression streams Sergey Senozhatsky
2025-01-27  7:29 ` Sergey Senozhatsky [this message]
2025-01-27  7:29 ` [PATCHv2 4/9] zram: remove max_comp_streams device attr Sergey Senozhatsky
2025-01-27  7:29 ` [PATCHv2 5/9] zram: remove two-staged handle allocation Sergey Senozhatsky
2025-01-27  7:29 ` [PATCHv2 6/9] zram: permit reclaim in zstd custom allocator Sergey Senozhatsky
2025-01-27  7:29 ` [PATCHv2 7/9] zram: permit reclaim in recompression handle allocation Sergey Senozhatsky
2025-01-27  7:29 ` [PATCHv2 8/9] zram: remove writestall zram_stats member Sergey Senozhatsky
2025-01-27  7:29 ` [PATCHv2 9/9] zram: unlock slot during recompression Sergey Senozhatsky

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250127072932.1289973-4-senozhatsky@chromium.org \
    --to=senozhatsky@chromium.org \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=minchan@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox