All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
To: linux-block@vger.kernel.org
Cc: axboe@kernel.dk, Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
Subject: [RFC PATCH 07/20] loop: use uniform variable declaration style
Date: Mon,  1 Feb 2021 21:35:39 -0800	[thread overview]
Message-ID: <20210202053552.4844-8-chaitanya.kulkarni@wdc.com> (raw)
In-Reply-To: <20210202053552.4844-1-chaitanya.kulkarni@wdc.com>

The mixing of two different styles of variable declaration cretes
confusion for the new developer when adding the code. since this is
a block driver use standard variable declaration present in the block
layer.

No functional change in this patch.

Signed-off-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
---
 drivers/block/loop.c | 22 +++++++++++-----------
 1 file changed, 11 insertions(+), 11 deletions(-)

diff --git a/drivers/block/loop.c b/drivers/block/loop.c
index 9e59adfd11ff..c4458b3f1dab 100644
--- a/drivers/block/loop.c
+++ b/drivers/block/loop.c
@@ -669,8 +669,8 @@ static inline int is_loop_device(struct file *file)
 
 static int loop_validate_file(struct file *file, struct block_device *bdev)
 {
-	struct inode	*inode = file->f_mapping->host;
-	struct file	*f = file;
+	struct inode *inode = file->f_mapping->host;
+	struct file *f = file;
 
 	/* Avoid recursion */
 	while (is_loop_device(f)) {
@@ -701,9 +701,9 @@ static int loop_validate_file(struct file *file, struct block_device *bdev)
 static int loop_change_fd(struct loop_device *lo, struct block_device *bdev,
 			  unsigned int arg)
 {
-	struct file	*file = NULL, *old_file;
-	int		error;
-	bool		partscan;
+	struct file *file = NULL, *old_file;
+	bool partscan;
+	int error;
 
 	error = mutex_lock_killable(&lo->lo_mutex);
 	if (error)
@@ -1069,13 +1069,13 @@ static int loop_configure(struct loop_device *lo, fmode_t mode,
 			  struct block_device *bdev,
 			  const struct loop_config *config)
 {
-	struct file	*file;
-	struct inode	*inode;
+	struct file *file;
+	struct inode *inode;
 	struct address_space *mapping;
-	int		error;
-	loff_t		size;
-	bool		partscan;
-	unsigned short  bsize;
+	int error;
+	loff_t size;
+	bool partscan;
+	unsigned short bsize;
 
 	/* This is safe, since we have a reference from open(). */
 	__module_get(THIS_MODULE);
-- 
2.22.1


  parent reply	other threads:[~2021-02-02  5:37 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-02  5:35 [RFC PATCH 00/20] loop: cleanup and small improvement Chaitanya Kulkarni
2021-02-02  5:35 ` [RFC PATCH 01/20] loop: use uniform alignment for struct members Chaitanya Kulkarni
2021-02-02  5:35 ` [RFC PATCH 02/20] loop: add lockdep assert in loop_add() Chaitanya Kulkarni
2021-02-02  5:35 ` [RFC PATCH 03/20] loop: add lockdep assert in loop_lookup() Chaitanya Kulkarni
2021-02-02  5:35 ` [RFC PATCH 04/20] loop: allow user to set the queue depth Chaitanya Kulkarni
2021-02-02  5:35 ` [RFC PATCH 05/20] loop: use snprintf for XXX_show() Chaitanya Kulkarni
2021-02-02 11:05   ` Johannes Thumshirn
2021-02-02 19:56     ` Chaitanya Kulkarni
2021-02-02  5:35 ` [RFC PATCH 06/20] loop: add newline after variable declaration Chaitanya Kulkarni
2021-02-02  5:35 ` Chaitanya Kulkarni [this message]
2021-02-02  5:35 ` [RFC PATCH 08/20] loop: use uniform function header style Chaitanya Kulkarni
2021-02-02  5:35 ` [RFC PATCH 09/20] loop: remove extra variable in lo_fallocate() Chaitanya Kulkarni
2021-02-02 11:50   ` Johannes Thumshirn
2021-02-02  5:35 ` [RFC PATCH 10/20] loop: remove extra variable in lo_req_flush Chaitanya Kulkarni
2021-02-02 11:50   ` Johannes Thumshirn
2021-02-02  5:35 ` [RFC PATCH 11/20] loop: remove local variable in lo_compat_ioctl Chaitanya Kulkarni
2021-02-02 11:52   ` Johannes Thumshirn
2021-02-02  5:35 ` [RFC PATCH 12/20] loop: cleanup lo_ioctl() Chaitanya Kulkarni
2021-02-02  5:35 ` [RFC PATCH 13/20] loop: remove memset in info64 to compat Chaitanya Kulkarni
2021-02-02 11:55   ` Johannes Thumshirn
2021-02-02  5:35 ` [RFC PATCH 14/20] loop: remove memset in info64 from compat Chaitanya Kulkarni
2021-02-02 11:55   ` Johannes Thumshirn
2021-02-02  5:35 ` [RFC PATCH 15/20] loop: remove memset in loop_info64_from_old() Chaitanya Kulkarni
2021-02-02 11:58   ` Johannes Thumshirn
2021-02-02  5:35 ` [RFC PATCH 16/20] loop: remove memset in loop_info64_to_old() Chaitanya Kulkarni
2021-02-02 11:59   ` Johannes Thumshirn
2021-02-02  5:35 ` [RFC PATCH 17/20] loop: change fd set err at actual error condition Chaitanya Kulkarni
2021-02-02  5:35 ` [RFC PATCH 18/20] loop: configure " Chaitanya Kulkarni
2021-02-02  5:35 ` [RFC PATCH 19/20] loop: set error value in case of actual error Chaitanya Kulkarni
2021-02-02  5:35 ` [RFC PATCH 20/20] loop: remove the extra line in declaration Chaitanya Kulkarni
2021-02-02 12:07   ` Johannes Thumshirn

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=20210202053552.4844-8-chaitanya.kulkarni@wdc.com \
    --to=chaitanya.kulkarni@wdc.com \
    --cc=axboe@kernel.dk \
    --cc=linux-block@vger.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.