Re: [PATCH v2 1/3] block: simplify calling convention of elv_unregister_queue()

From
Hannes Reinecke <hare@suse.de>
Date
2021-11-30 06:44:53
Also in
linux-block, linux-mmc, linux-scsi, lkml
Reply to
Eric Biggers, 2021-11-30
On 11/30/21 5:03 AM, Eric Biggers wrote:
From: Eric Biggers <redacted>

Make elv_unregister_queue() a no-op if q->elevator is NULL or is not
registered.

This simplifies the existing callers, as well as the future caller in
the error path of blk_register_queue().

Also don't bother checking whether q is NULL, since it never is.

Signed-off-by: Eric Biggers <redacted>
---
  block/blk-sysfs.c | 3 +--
  block/elevator.c  | 8 ++++----
  2 files changed, 5 insertions(+), 6 deletions(-)
Reviewed-by: Hannes Reinecke <hare@suse.de>

Cheers,

Hannes
-- 
Dr. Hannes Reinecke                Kernel Storage Architect
hare@suse.de                              +49 911 74053 688
SUSE Software Solutions GmbH, Maxfeldstr. 5, 90409 Nürnberg
HRB 36809 (AG Nürnberg), Geschäftsführer: Felix Imendörffer
Thread (13 messages) 13 messages, 3 authors, last reply 2021-12-01
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help