linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Aaron Strahlberger <aaron.strahlberger@posteo.de>
To: Gao Xiang <gaoxiang25@huawei.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Chao Yu <yuchao0@huawei.com>,
	linux-erofs@lists.ozlabs.org, devel@driverdev.osuosl.org,
	linux-kernel@vger.kernel.org, linux-kernel@i4.cs.fau.de,
	Aaron Strahlberger <aaron.strahlberger@posteo.de>,
	Julius Wiedmann <julius.wiedmann@fau.de>,
	Dominik Huber <domi250@gmx.de>
Subject: [PATCH 1/5] drivers: staging: erofs: Fix alignment.
Date: Tue, 11 Dec 2018 11:54:39 +0100	[thread overview]
Message-ID: <20181211105443.21826-2-aaron.strahlberger@posteo.de> (raw)
In-Reply-To: <20181211105443.21826-1-aaron.strahlberger@posteo.de>

Fix of 17 `CHECK: Alignment should match open parenthesis` checkpatch.pl
issues.

Signed-off-by: Aaron Strahlberger <aaron.strahlberger@posteo.de>
Signed-off-by: Julius Wiedmann <julius.wiedmann@fau.de>
Signed-off-by: Dominik Huber <domi250@gmx.de>

LocalWords:  Alighnment
---
 drivers/staging/erofs/data.c | 42 ++++++++++++++++++------------------
 drivers/staging/erofs/dir.c  |  8 +++----
 2 files changed, 25 insertions(+), 25 deletions(-)

diff --git a/drivers/staging/erofs/data.c b/drivers/staging/erofs/data.c
index 6384f73e5418..d1c0a7be6eb8 100644
--- a/drivers/staging/erofs/data.c
+++ b/drivers/staging/erofs/data.c
@@ -40,7 +40,7 @@ static inline void read_endio(struct bio *bio)
 
 /* prio -- true is used for dir */
 struct page *__erofs_get_meta_page(struct super_block *sb,
-	erofs_blk_t blkaddr, bool prio, bool nofail)
+				   erofs_blk_t blkaddr, bool prio, bool nofail)
 {
 	struct inode *const bd_inode = sb->s_bdev->bd_inode;
 	struct address_space *const mapping = bd_inode->i_mapping;
@@ -76,7 +76,7 @@ struct page *__erofs_get_meta_page(struct super_block *sb,
 		}
 
 		__submit_bio(bio, REQ_OP_READ,
-			REQ_META | (prio ? REQ_PRIO : 0));
+			     REQ_META | (prio ? REQ_PRIO : 0));
 
 		lock_page(page);
 
@@ -107,8 +107,8 @@ struct page *__erofs_get_meta_page(struct super_block *sb,
 }
 
 static int erofs_map_blocks_flatmode(struct inode *inode,
-	struct erofs_map_blocks *map,
-	int flags)
+				     struct erofs_map_blocks *map,
+				     int flags)
 {
 	int err = 0;
 	erofs_blk_t nblocks, lastblk;
@@ -151,7 +151,7 @@ static int erofs_map_blocks_flatmode(struct inode *inode,
 		map->m_flags |= EROFS_MAP_META;
 	} else {
 		errln("internal error @ nid: %llu (size %llu), m_la 0x%llx",
-			vi->nid, inode->i_size, map->m_la);
+		      vi->nid, inode->i_size, map->m_la);
 		DBG_BUGON(1);
 		err = -EIO;
 		goto err_out;
@@ -192,27 +192,26 @@ int erofs_map_blocks_iter(struct inode *inode,
 }
 
 int erofs_map_blocks(struct inode *inode,
-	struct erofs_map_blocks *map, int flags)
+		     struct erofs_map_blocks *map, int flags)
 {
 	if (unlikely(is_inode_layout_compression(inode))) {
 		struct page *mpage = NULL;
 		int err;
 
 		err = erofs_map_blocks_iter(inode, map, &mpage, flags);
-		if (mpage != NULL)
+		if (mpage)
 			put_page(mpage);
 		return err;
 	}
 	return erofs_map_blocks_flatmode(inode, map, flags);
 }
 
-static inline struct bio *erofs_read_raw_page(
-	struct bio *bio,
-	struct address_space *mapping,
-	struct page *page,
-	erofs_off_t *last_block,
-	unsigned int nblocks,
-	bool ra)
+static inline struct bio *erofs_read_raw_page(struct bio *bio,
+					      struct address_space *mapping,
+					      struct page *page,
+					      erofs_off_t *last_block,
+					      unsigned int nblocks,
+					      bool ra)
 {
 	struct inode *inode = mapping->host;
 	erofs_off_t current_block = (erofs_off_t)page->index;
@@ -307,7 +306,7 @@ static inline struct bio *erofs_read_raw_page(
 			nblocks = BIO_MAX_PAGES;
 
 		bio = erofs_grab_bio(inode->i_sb,
-			blknr, nblocks, read_endio, false);
+				     blknr, nblocks, read_endio, false);
 
 		if (IS_ERR(bio)) {
 			err = PTR_ERR(bio);
@@ -361,7 +360,7 @@ static int erofs_raw_access_readpage(struct file *file, struct page *page)
 	trace_erofs_readpage(page, true);
 
 	bio = erofs_read_raw_page(NULL, page->mapping,
-		page, &last_block, 1, false);
+				  page, &last_block, 1, false);
 
 	if (IS_ERR(bio))
 		return PTR_ERR(bio);
@@ -371,8 +370,9 @@ static int erofs_raw_access_readpage(struct file *file, struct page *page)
 }
 
 static int erofs_raw_access_readpages(struct file *filp,
-	struct address_space *mapping,
-	struct list_head *pages, unsigned int nr_pages)
+				      struct address_space *mapping,
+				      struct list_head *pages,
+				      unsigned int nr_pages)
 {
 	erofs_off_t last_block;
 	struct bio *bio = NULL;
@@ -389,13 +389,13 @@ static int erofs_raw_access_readpages(struct file *filp,
 
 		if (!add_to_page_cache_lru(page, mapping, page->index, gfp)) {
 			bio = erofs_read_raw_page(bio, mapping, page,
-				&last_block, nr_pages, true);
+						  &last_block, nr_pages, true);
 
 			/* all the page errors are ignored when readahead */
 			if (IS_ERR(bio)) {
 				pr_err("%s, readahead error at page %lu of nid %llu\n",
-					__func__, page->index,
-					EROFS_V(mapping->host)->nid);
+				       __func__, page->index,
+				       EROFS_V(mapping->host)->nid);
 
 				bio = NULL;
 			}
diff --git a/drivers/staging/erofs/dir.c b/drivers/staging/erofs/dir.c
index d1cb0d78ab84..49a4e7730df0 100644
--- a/drivers/staging/erofs/dir.c
+++ b/drivers/staging/erofs/dir.c
@@ -24,8 +24,8 @@ static const unsigned char erofs_filetype_table[EROFS_FT_MAX] = {
 };
 
 static int erofs_fill_dentries(struct dir_context *ctx,
-	void *dentry_blk, unsigned int *ofs,
-	unsigned int nameoff, unsigned int maxsize)
+			       void *dentry_blk, unsigned int *ofs,
+			       unsigned int nameoff, unsigned int maxsize)
 {
 	struct erofs_dirent *de = dentry_blk;
 	const struct erofs_dirent *end = dentry_blk + nameoff;
@@ -101,9 +101,9 @@ static int erofs_readdir(struct file *f, struct dir_context *ctx)
 		nameoff = le16_to_cpu(de->nameoff);
 
 		if (unlikely(nameoff < sizeof(struct erofs_dirent) ||
-			nameoff >= PAGE_SIZE)) {
+			     nameoff >= PAGE_SIZE)) {
 			errln("%s, invalid de[0].nameoff %u",
-				__func__, nameoff);
+			      __func__, nameoff);
 
 			err = -EIO;
 			goto skip_this;
-- 
2.19.2


  reply	other threads:[~2018-12-11 10:55 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-11  9:06 [PATCH] drivers: staging: erofs: Fix styling issues Aaron Strahlberger
2018-12-11  9:18 ` Gao Xiang
2018-12-11 10:54   ` [PATCH 0/5] " Aaron Strahlberger
2018-12-11 10:54     ` Aaron Strahlberger [this message]
2018-12-11 11:19       ` [PATCH 1/5] drivers: staging: erofs: Fix alignment Gao Xiang
2018-12-11 13:00       ` Dan Carpenter
2018-12-11 10:54     ` [PATCH 2/5] drivers: staging: erofs: Fix comparison to NULL issues Aaron Strahlberger
2018-12-11 11:22       ` Gao Xiang
2018-12-11 10:54     ` [PATCH 3/5] drivers: staging: erofs: Fix spelling issue Aaron Strahlberger
2018-12-11 11:27       ` Gao Xiang
2018-12-11 10:54     ` [PATCH 4/5] drivers: staging: erofs: Fix parentheses error in macro Aaron Strahlberger
2018-12-11 11:06       ` Gao Xiang
2018-12-11 15:48         ` Joe Perches
2018-12-11 17:05           ` Gao Xiang
2018-12-12 12:02             ` [PATCH v2] staging:erofs: Remove __EROFS_BIT macro Aaron Strahlberger
2018-12-12 12:18               ` Gao Xiang
2018-12-11 10:54     ` [PATCH 5/5] drivers: staging: erofs: Add blank line after function Aaron Strahlberger
2018-12-12 12:00   ` [PATCH v2] staging:erofs: Fix alignment issues Aaron Strahlberger
2018-12-12 12:11     ` Gao Xiang
2018-12-12 12:29       ` Gao Xiang
2018-12-11 12:51 ` [PATCH] drivers: staging: erofs: Fix styling issues Dan Carpenter

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=20181211105443.21826-2-aaron.strahlberger@posteo.de \
    --to=aaron.strahlberger@posteo.de \
    --cc=devel@driverdev.osuosl.org \
    --cc=domi250@gmx.de \
    --cc=gaoxiang25@huawei.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=julius.wiedmann@fau.de \
    --cc=linux-erofs@lists.ozlabs.org \
    --cc=linux-kernel@i4.cs.fau.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=yuchao0@huawei.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;
as well as URLs for NNTP newsgroup(s).