All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: Jens Axboe <axboe@kernel.dk>, Tim Waugh <tim@cyberelk.net>
Cc: linux-block@vger.kernel.org
Subject: [PATCH 1/3] paride/pd: remove ->revalidate_disk
Date: Mon,  8 Mar 2021 08:45:48 +0100	[thread overview]
Message-ID: <20210308074550.422714-2-hch@lst.de> (raw)
In-Reply-To: <20210308074550.422714-1-hch@lst.de>

->revalidate_disk is only called during add_disk for pd, but at that
point the driver has already set the capacity to the one returned from
Identify a little earlier, so this additional update is entirely
superflous.

Signed-off-by: Christoph Hellwig <hch@lst.de>
---
 drivers/block/paride/pd.c | 11 -----------
 1 file changed, 11 deletions(-)

diff --git a/drivers/block/paride/pd.c b/drivers/block/paride/pd.c
index 897acda20ac85a..828a45ffe0e7d8 100644
--- a/drivers/block/paride/pd.c
+++ b/drivers/block/paride/pd.c
@@ -859,16 +859,6 @@ static unsigned int pd_check_events(struct gendisk *p, unsigned int clearing)
 	return r ? DISK_EVENT_MEDIA_CHANGE : 0;
 }
 
-static int pd_revalidate(struct gendisk *p)
-{
-	struct pd_unit *disk = p->private_data;
-	if (pd_special_command(disk, pd_identify) == 0)
-		set_capacity(p, disk->capacity);
-	else
-		set_capacity(p, 0);
-	return 0;
-}
-
 static const struct block_device_operations pd_fops = {
 	.owner		= THIS_MODULE,
 	.open		= pd_open,
@@ -877,7 +867,6 @@ static const struct block_device_operations pd_fops = {
 	.compat_ioctl	= pd_ioctl,
 	.getgeo		= pd_getgeo,
 	.check_events	= pd_check_events,
-	.revalidate_disk= pd_revalidate
 };
 
 /* probing */
-- 
2.30.1


  reply	other threads:[~2021-03-08  7:47 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-08  7:45 remove ->revalidate_disk (resend) Christoph Hellwig
2021-03-08  7:45 ` Christoph Hellwig [this message]
2021-03-08  7:45 ` [PATCH 2/3] umem: remove ->revalidate_disk Christoph Hellwig
2021-03-08  7:45 ` [PATCH 3/3] block: remove the revalidate_disk method Christoph Hellwig
2021-03-29  5:55 ` remove ->revalidate_disk (resend) Christoph Hellwig
2021-03-29 13:01   ` Jens Axboe
2021-03-30  5:28     ` Christoph Hellwig
2021-06-16  9:41 ` chenxiang (M)
2021-06-16 13:50   ` Christoph Hellwig
2021-06-17  3:43     ` chenxiang (M)
2021-06-17 10:29       ` Christoph Hellwig
2021-06-17 11:50         ` chenxiang (M)
  -- strict thread matches above, loose matches on Subject: below --
2020-09-14  7:03 remove ->revalidate_disk Christoph Hellwig
2020-09-14  7:03 ` [PATCH 1/3] paride/pd: " Christoph Hellwig

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=20210308074550.422714-2-hch@lst.de \
    --to=hch@lst.de \
    --cc=axboe@kernel.dk \
    --cc=linux-block@vger.kernel.org \
    --cc=tim@cyberelk.net \
    /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.