public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drbd: Remove unused conn_lowest_minor
@ 2024-10-10 20:44 linux
  2024-10-11  8:24 ` Christoph Hellwig
  2024-10-11 17:11 ` Jens Axboe
  0 siblings, 2 replies; 3+ messages in thread
From: linux @ 2024-10-10 20:44 UTC (permalink / raw)
  To: philipp.reisner, lars.ellenberg, christoph.boehmwalder, axboe
  Cc: drbd-dev, linux-block, linux-kernel, Dr. David Alan Gilbert

From: "Dr. David Alan Gilbert" <linux@treblig.org>

conn_lowest_minor() last use was removed by 2011 commit
69a227731a37 ("drbd: Pass a peer device to a number of fuctions")

Remove it.

Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org>
---
 drivers/block/drbd/drbd_int.h  |  1 -
 drivers/block/drbd/drbd_main.c | 14 --------------
 2 files changed, 15 deletions(-)

diff --git a/drivers/block/drbd/drbd_int.h b/drivers/block/drbd/drbd_int.h
index 2a05d955e30b..e21492981f7d 100644
--- a/drivers/block/drbd/drbd_int.h
+++ b/drivers/block/drbd/drbd_int.h
@@ -1364,7 +1364,6 @@ extern struct bio_set drbd_io_bio_set;
 
 extern struct mutex resources_mutex;
 
-extern int conn_lowest_minor(struct drbd_connection *connection);
 extern enum drbd_ret_code drbd_create_device(struct drbd_config_context *adm_ctx, unsigned int minor);
 extern void drbd_destroy_device(struct kref *kref);
 extern void drbd_delete_device(struct drbd_device *device);
diff --git a/drivers/block/drbd/drbd_main.c b/drivers/block/drbd/drbd_main.c
index 0d74d75260ef..5bbd312c3e14 100644
--- a/drivers/block/drbd/drbd_main.c
+++ b/drivers/block/drbd/drbd_main.c
@@ -471,20 +471,6 @@ void _drbd_thread_stop(struct drbd_thread *thi, int restart, int wait)
 		wait_for_completion(&thi->stop);
 }
 
-int conn_lowest_minor(struct drbd_connection *connection)
-{
-	struct drbd_peer_device *peer_device;
-	int vnr = 0, minor = -1;
-
-	rcu_read_lock();
-	peer_device = idr_get_next(&connection->peer_devices, &vnr);
-	if (peer_device)
-		minor = device_to_minor(peer_device->device);
-	rcu_read_unlock();
-
-	return minor;
-}
-
 #ifdef CONFIG_SMP
 /*
  * drbd_calc_cpu_mask() - Generate CPU masks, spread over all CPUs
-- 
2.47.0


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

* Re: [PATCH] drbd: Remove unused conn_lowest_minor
  2024-10-10 20:44 [PATCH] drbd: Remove unused conn_lowest_minor linux
@ 2024-10-11  8:24 ` Christoph Hellwig
  2024-10-11 17:11 ` Jens Axboe
  1 sibling, 0 replies; 3+ messages in thread
From: Christoph Hellwig @ 2024-10-11  8:24 UTC (permalink / raw)
  To: linux
  Cc: philipp.reisner, lars.ellenberg, christoph.boehmwalder, axboe,
	drbd-dev, linux-block, linux-kernel

Looks good:

Reviewed-by: Christoph Hellwig <hch@lst.de>


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

* Re: [PATCH] drbd: Remove unused conn_lowest_minor
  2024-10-10 20:44 [PATCH] drbd: Remove unused conn_lowest_minor linux
  2024-10-11  8:24 ` Christoph Hellwig
@ 2024-10-11 17:11 ` Jens Axboe
  1 sibling, 0 replies; 3+ messages in thread
From: Jens Axboe @ 2024-10-11 17:11 UTC (permalink / raw)
  To: philipp.reisner, lars.ellenberg, christoph.boehmwalder, linux
  Cc: drbd-dev, linux-block, linux-kernel


On Thu, 10 Oct 2024 21:44:26 +0100, linux@treblig.org wrote:
> conn_lowest_minor() last use was removed by 2011 commit
> 69a227731a37 ("drbd: Pass a peer device to a number of fuctions")
> 
> Remove it.
> 
> 

Applied, thanks!

[1/1] drbd: Remove unused conn_lowest_minor
      commit: 1e3fc2000035ffea0b1b7ec2423706715ab2e7f6

Best regards,
-- 
Jens Axboe




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

end of thread, other threads:[~2024-10-11 17:11 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-10 20:44 [PATCH] drbd: Remove unused conn_lowest_minor linux
2024-10-11  8:24 ` Christoph Hellwig
2024-10-11 17:11 ` Jens Axboe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox