public inbox for linux-block@vger.kernel.org
 help / color / mirror / Atom feed
From: Guoqing Jiang <guoqing.jiang@linux.dev>
To: axboe@kernel.dk
Cc: haris.iqbal@ionos.com, jinpu.wang@ionos.com, linux-block@vger.kernel.org
Subject: [PATCH V2 8/8] rnbd-clt: make rnbd_clt_change_capacity return void
Date: Wed,  6 Jul 2022 21:31:52 +0800	[thread overview]
Message-ID: <20220706133152.12058-9-guoqing.jiang@linux.dev> (raw)
In-Reply-To: <20220706133152.12058-1-guoqing.jiang@linux.dev>

No need to checking the return value, make it return void.

Acked-by: Jack Wang <jinpu.wang@ionos.com>
Signed-off-by: Guoqing Jiang <guoqing.jiang@linux.dev>
---
 drivers/block/rnbd/rnbd-clt.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/drivers/block/rnbd/rnbd-clt.c b/drivers/block/rnbd/rnbd-clt.c
index 58e5ffcfbf7c..04da33a22ef4 100644
--- a/drivers/block/rnbd/rnbd-clt.c
+++ b/drivers/block/rnbd/rnbd-clt.c
@@ -68,11 +68,11 @@ static inline bool rnbd_clt_get_dev(struct rnbd_clt_dev *dev)
 	return refcount_inc_not_zero(&dev->refcount);
 }
 
-static int rnbd_clt_change_capacity(struct rnbd_clt_dev *dev,
+static void rnbd_clt_change_capacity(struct rnbd_clt_dev *dev,
 				    sector_t new_nsectors)
 {
 	if (get_capacity(dev->gd) == new_nsectors)
-		return 0;
+		return;
 
 	/*
 	 * If the size changed, we need to revalidate it
@@ -80,7 +80,6 @@ static int rnbd_clt_change_capacity(struct rnbd_clt_dev *dev,
 	rnbd_clt_info(dev, "Device size changed from %llu to %llu sectors\n",
 		      get_capacity(dev->gd), new_nsectors);
 	set_capacity_and_notify(dev->gd, new_nsectors);
-	return 0;
 }
 
 static int process_msg_open_rsp(struct rnbd_clt_dev *dev,
@@ -127,7 +126,7 @@ int rnbd_clt_resize_disk(struct rnbd_clt_dev *dev, sector_t newsize)
 		ret = -ENOENT;
 		goto out;
 	}
-	ret = rnbd_clt_change_capacity(dev, newsize);
+	rnbd_clt_change_capacity(dev, newsize);
 
 out:
 	mutex_unlock(&dev->lock);
-- 
2.31.1


  parent reply	other threads:[~2022-07-06 13:32 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-06 13:31 [PATCH V2 0/8] reduce the size of rnbd_clt_dev Guoqing Jiang
2022-07-06 13:31 ` [PATCH V2 1/8] rnbd-clt: open code send_msg_open in rnbd_clt_map_device Guoqing Jiang
2022-07-06 13:31 ` [PATCH V2 2/8] rnbd-clt: don't free rsp in msg_open_conf for map scenario Guoqing Jiang
2022-07-06 13:31 ` [PATCH V2 3/8] rnbd-clt: kill read_only from struct rnbd_clt_dev Guoqing Jiang
2022-07-06 13:31 ` [PATCH V2 4/8] rnbd-clt: reduce the size of " Guoqing Jiang
2022-07-06 13:31 ` [PATCH V2 5/8] rnbd-clt: adjust the layout " Guoqing Jiang
2022-07-06 13:31 ` [PATCH V2 6/8] rnbd-clt: check capacity inside rnbd_clt_change_capacity Guoqing Jiang
2022-07-06 13:31 ` [PATCH V2 7/8] rnbd-clt: pass sector_t type for resize capacity Guoqing Jiang
2022-07-06 13:31 ` Guoqing Jiang [this message]
2022-07-06 14:52 ` [PATCH V2 0/8] reduce the size of rnbd_clt_dev Jens Axboe

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=20220706133152.12058-9-guoqing.jiang@linux.dev \
    --to=guoqing.jiang@linux.dev \
    --cc=axboe@kernel.dk \
    --cc=haris.iqbal@ionos.com \
    --cc=jinpu.wang@ionos.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox