]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
s390/dasd: Move device name formatting into separate function
authorJan Höppner <hoeppner@linux.ibm.com>
Wed, 26 Nov 2025 16:06:33 +0000 (17:06 +0100)
committerJens Axboe <axboe@kernel.dk>
Wed, 26 Nov 2025 17:14:17 +0000 (10:14 -0700)
commit43198756ee8cade0acc17a89f959764cd17776bb
treebc31bbc9b31c465646c629f7b3ad5d4c99e9272a
parent764def9e8eaf1b1ccdcd89b8c16db4194ade775f
s390/dasd: Move device name formatting into separate function

The device name formatting can be generalized and made more readable
compared to the current state. SCSI already provides a generalized way
to format many devices in the same naming scheme as DASD does, which was
introduced with commit 3e1a7ff8a0a7 ("block: allow disk to have extended
device number").

Use this much cleaner code from drivers/scsi/sd.c to handle the legacy
naming scheme in DASD as a replacement for the current implementation.

For easier error handling for the new function, move the gendisk free
portion of dasd_gendisk_free() out into a new function dasd_gd_free().

Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
Reviewed-by: Stefan Haberland <sth@linux.ibm.com>
Signed-off-by: Stefan Haberland <sth@linux.ibm.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/s390/block/dasd_genhd.c