linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/6] staging: erofs: formatting fix in unzip_vle_lz4.c
@ 2018-08-30 15:13 Pavel Zemlyanoy
  2018-08-30 15:13 ` [PATCH 2/6] staging: erofs: formatting fix to NULL comparison Pavel Zemlyanoy
                   ` (5 more replies)
  0 siblings, 6 replies; 23+ messages in thread
From: Pavel Zemlyanoy @ 2018-08-30 15:13 UTC (permalink / raw)
  To: Gao Xiang, Chao Yu
  Cc: Pavel Zemlyanoy, Greg Kroah-Hartman, linux-erofs, devel,
	linux-kernel, ldv-project


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: Pavel Zemlyanoy <zemlyanoy@ispras.ru>
---
 drivers/staging/erofs/unzip_vle_lz4.c | 23 +++++++++++------------
 1 file changed, 11 insertions(+), 12 deletions(-)

diff --git a/drivers/staging/erofs/unzip_vle_lz4.c b/drivers/staging/erofs/unzip_vle_lz4.c
index f5b665f..f9e6b78 100644
--- a/drivers/staging/erofs/unzip_vle_lz4.c
+++ b/drivers/staging/erofs/unzip_vle_lz4.c
@@ -23,14 +23,14 @@ static struct {
 } erofs_pcpubuf[NR_CPUS];
 
 int z_erofs_vle_plain_copy(struct page **compressed_pages,
-			   unsigned clusterpages,
+			   unsigned int clusterpages,
 			   struct page **pages,
-			   unsigned nr_pages,
+			   unsigned int nr_pages,
 			   unsigned short pageofs)
 {
-	unsigned i, j;
+	unsigned int i, j;
 	void *src = NULL;
-	const unsigned righthalf = PAGE_SIZE - pageofs;
+	const unsigned int righthalf = PAGE_SIZE - pageofs;
 	char *percpu_data;
 	bool mirrored[Z_EROFS_CLUSTER_MAX_PAGES] = { 0 };
 
@@ -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);
 
 int z_erofs_vle_unzip_fast_percpu(struct page **compressed_pages,
-				  unsigned clusterpages,
+				  unsigned int clusterpages,
 				  struct page **pages,
-				  unsigned outlen,
+				  unsigned int outlen,
 				  unsigned short pageofs,
 				  void (*endio)(struct page *))
 {
 	void *vin, *vout;
-	unsigned nr_pages, i, j;
+	unsigned int nr_pages, i, j;
 	int ret;
 
 	if (outlen + pageofs > EROFS_PERCPU_NR_PAGES * PAGE_SIZE)
@@ -134,7 +134,7 @@ int z_erofs_vle_unzip_fast_percpu(struct page **compressed_pages,
 	}
 
 	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 (ret < 0)
@@ -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,
-			   unsigned clusterpages,
+			   unsigned int clusterpages,
 			   void *vout,
-			   unsigned llen,
+			   unsigned int llen,
 			   unsigned short pageofs,
 			   bool overlapped)
 {
 	void *vin;
-	unsigned i;
+	unsigned int i;
 	int ret;
 
 	if (overlapped) {
@@ -206,4 +206,3 @@ int z_erofs_vle_unzip_vmap(struct page **compressed_pages,
 
 	return ret;
 }
-
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 23+ messages in thread

end of thread, other threads:[~2018-09-03  4:51 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-08-30 15:13 [PATCH 1/6] staging: erofs: formatting fix in unzip_vle_lz4.c Pavel Zemlyanoy
2018-08-30 15:13 ` [PATCH 2/6] staging: erofs: formatting fix to NULL comparison Pavel Zemlyanoy
2018-08-30 16:09   ` Gao Xiang
2018-08-30 16:32     ` Gao Xiang
2018-08-31  3:29       ` Chao Yu
2018-08-31  9:41         ` Dan Carpenter
2018-09-03  1:59           ` Chao Yu
2018-09-03  4:23             ` Gao Xiang
2018-09-03  1:48   ` Chao Yu
2018-08-30 15:13 ` [PATCH 3/6] staging: erofs: formatting spaces around '-' Pavel Zemlyanoy
2018-09-03  1:48   ` Chao Yu
2018-09-03  4:32     ` Gao Xiang
2018-08-30 15:14 ` [PATCH 4/6] staging: erofs: formatting add spaces arround '*' Pavel Zemlyanoy
2018-09-03  1:48   ` Chao Yu
2018-09-03  4:33     ` Gao Xiang
2018-08-30 15:14 ` [PATCH 5/6] staging: erofs: formatting alignment parenthesis Pavel Zemlyanoy
2018-09-03  1:49   ` Chao Yu
2018-09-03  4:43     ` Gao Xiang
2018-08-30 15:14 ` [PATCH 6/6] staging: erofs: fix 1 warning and 9 checks Pavel Zemlyanoy
2018-09-03  1:49   ` Chao Yu
2018-09-03  4:50     ` Gao Xiang
2018-09-03  1:47 ` [PATCH 1/6] staging: erofs: formatting fix in unzip_vle_lz4.c Chao Yu
2018-09-03  4:30   ` Gao Xiang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).