Commit e84e1ed8 authored by Pavel Zemlyanoy's avatar Pavel Zemlyanoy Committed by Greg Kroah-Hartman

staging: erofs: formatting fix in unzip_vle_lz4.c

This patch does not change the logic, it only
corrects the formatting and checkpatch warnings by
adding "int" to the unsigned type.

The patch fixes 11 warnings of the type:
"WARNING: Prefer 'unsigned int' to bare use of 'unsigned'"
Signed-off-by: default avatarPavel Zemlyanoy <zemlyanoy@ispras.ru>
Reviewed-by: default avatarChao Yu <yuchao0@huawei.com>
Reviewed-by: default avatarGao Xiang <gaoxiang25@huawei.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent aca19723
...@@ -23,14 +23,14 @@ static struct { ...@@ -23,14 +23,14 @@ static struct {
} erofs_pcpubuf[NR_CPUS]; } erofs_pcpubuf[NR_CPUS];
int z_erofs_vle_plain_copy(struct page **compressed_pages, int z_erofs_vle_plain_copy(struct page **compressed_pages,
unsigned clusterpages, unsigned int clusterpages,
struct page **pages, struct page **pages,
unsigned nr_pages, unsigned int nr_pages,
unsigned short pageofs) unsigned short pageofs)
{ {
unsigned i, j; unsigned int i, j;
void *src = NULL; void *src = NULL;
const unsigned righthalf = PAGE_SIZE - pageofs; const unsigned int righthalf = PAGE_SIZE - pageofs;
char *percpu_data; char *percpu_data;
bool mirrored[Z_EROFS_CLUSTER_MAX_PAGES] = { 0 }; bool mirrored[Z_EROFS_CLUSTER_MAX_PAGES] = { 0 };
...@@ -102,14 +102,14 @@ int z_erofs_vle_plain_copy(struct page **compressed_pages, ...@@ -102,14 +102,14 @@ int z_erofs_vle_plain_copy(struct page **compressed_pages,
extern int z_erofs_unzip_lz4(void *in, void *out, size_t inlen, size_t outlen); extern int z_erofs_unzip_lz4(void *in, void *out, size_t inlen, size_t outlen);
int z_erofs_vle_unzip_fast_percpu(struct page **compressed_pages, int z_erofs_vle_unzip_fast_percpu(struct page **compressed_pages,
unsigned clusterpages, unsigned int clusterpages,
struct page **pages, struct page **pages,
unsigned outlen, unsigned int outlen,
unsigned short pageofs, unsigned short pageofs,
void (*endio)(struct page *)) void (*endio)(struct page *))
{ {
void *vin, *vout; void *vin, *vout;
unsigned nr_pages, i, j; unsigned int nr_pages, i, j;
int ret; int ret;
if (outlen + pageofs > EROFS_PERCPU_NR_PAGES * PAGE_SIZE) if (outlen + pageofs > EROFS_PERCPU_NR_PAGES * PAGE_SIZE)
...@@ -134,7 +134,7 @@ int z_erofs_vle_unzip_fast_percpu(struct page **compressed_pages, ...@@ -134,7 +134,7 @@ int z_erofs_vle_unzip_fast_percpu(struct page **compressed_pages,
} }
for (i = 0; i < nr_pages; ++i) { for (i = 0; i < nr_pages; ++i) {
j = min((unsigned)PAGE_SIZE - pageofs, outlen); j = min((unsigned int)PAGE_SIZE - pageofs, outlen);
if (pages[i] != NULL) { if (pages[i] != NULL) {
if (ret < 0) if (ret < 0)
...@@ -164,14 +164,14 @@ int z_erofs_vle_unzip_fast_percpu(struct page **compressed_pages, ...@@ -164,14 +164,14 @@ int z_erofs_vle_unzip_fast_percpu(struct page **compressed_pages,
} }
int z_erofs_vle_unzip_vmap(struct page **compressed_pages, int z_erofs_vle_unzip_vmap(struct page **compressed_pages,
unsigned clusterpages, unsigned int clusterpages,
void *vout, void *vout,
unsigned llen, unsigned int llen,
unsigned short pageofs, unsigned short pageofs,
bool overlapped) bool overlapped)
{ {
void *vin; void *vin;
unsigned i; unsigned int i;
int ret; int ret;
if (overlapped) { if (overlapped) {
...@@ -206,4 +206,3 @@ int z_erofs_vle_unzip_vmap(struct page **compressed_pages, ...@@ -206,4 +206,3 @@ int z_erofs_vle_unzip_vmap(struct page **compressed_pages,
return ret; return ret;
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment