mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Yue Hu <zbestahu@gmail.com>
To: xiang@kernel.org, chao@kernel.org, linux-erofs@lists.ozlabs.org
Cc: jefflexu@linux.alibaba.com, huyue2@coolpad.com,
	linux-kernel@vger.kernel.org, zhangwen@coolpad.com
Subject: [PATCH 1/2] erofs: get rid of name from struct z_erofs_decompressor
Date: Wed, 26 Apr 2023 12:10:26 +0800	[thread overview]
Message-ID: <a0c8b87b5c165750107bbaad6b014c02311b610d.1682481589.git.huyue2@coolpad.com> (raw)

From: Yue Hu <huyue2@coolpad.com>

There are no users of the name and we can get this via ->alg if needed.
Also, move struct z_erofs_decompressor into decompressor.c which is the
only one to use it.

Signed-off-by: Yue Hu <huyue2@coolpad.com>
---
 fs/erofs/compress.h     | 6 ------
 fs/erofs/decompressor.c | 9 +++++----
 2 files changed, 5 insertions(+), 10 deletions(-)

diff --git a/fs/erofs/compress.h b/fs/erofs/compress.h
index 26fa170090b8..d161683bda03 100644
--- a/fs/erofs/compress.h
+++ b/fs/erofs/compress.h
@@ -20,12 +20,6 @@ struct z_erofs_decompress_req {
 	bool inplace_io, partial_decoding, fillgaps;
 };
 
-struct z_erofs_decompressor {
-	int (*decompress)(struct z_erofs_decompress_req *rq,
-			  struct page **pagepool);
-	char *name;
-};
-
 /* some special page->private (unsigned long, see below) */
 #define Z_EROFS_SHORTLIVED_PAGE		(-1UL << 2)
 #define Z_EROFS_PREALLOCATED_PAGE	(-2UL << 2)
diff --git a/fs/erofs/decompressor.c b/fs/erofs/decompressor.c
index 7021e2cf6146..f416ebd6f0dc 100644
--- a/fs/erofs/decompressor.c
+++ b/fs/erofs/decompressor.c
@@ -363,23 +363,24 @@ static int z_erofs_transform_plain(struct z_erofs_decompress_req *rq,
 	return 0;
 }
 
+struct z_erofs_decompressor {
+	int (*decompress)(struct z_erofs_decompress_req *rq,
+			  struct page **pagepool);
+};
+
 static struct z_erofs_decompressor decompressors[] = {
 	[Z_EROFS_COMPRESSION_SHIFTED] = {
 		.decompress = z_erofs_transform_plain,
-		.name = "shifted"
 	},
 	[Z_EROFS_COMPRESSION_INTERLACED] = {
 		.decompress = z_erofs_transform_plain,
-		.name = "interlaced"
 	},
 	[Z_EROFS_COMPRESSION_LZ4] = {
 		.decompress = z_erofs_lz4_decompress,
-		.name = "lz4"
 	},
 #ifdef CONFIG_EROFS_FS_ZIP_LZMA
 	[Z_EROFS_COMPRESSION_LZMA] = {
 		.decompress = z_erofs_lzma_decompress,
-		.name = "lzma"
 	},
 #endif
 };
-- 
2.17.1


             reply	other threads:[~2023-04-26  4:12 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-26  4:10 Yue Hu [this message]
2023-04-26  4:10 ` [PATCH 2/2] erofs: replace global decompressors[] with stack memory Yue Hu
2023-04-26  6:08 ` [PATCH 1/2] erofs: get rid of name from struct z_erofs_decompressor Gao Xiang

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=a0c8b87b5c165750107bbaad6b014c02311b610d.1682481589.git.huyue2@coolpad.com \
    --to=zbestahu@gmail.com \
    --cc=chao@kernel.org \
    --cc=huyue2@coolpad.com \
    --cc=jefflexu@linux.alibaba.com \
    --cc=linux-erofs@lists.ozlabs.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=xiang@kernel.org \
    --cc=zhangwen@coolpad.com \
    /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

all inboxes | Powered by JetHome®