s390/dasd: Simplify uid string generation
authorJan Höppner <hoeppner@linux.ibm.com>
Thu, 8 Feb 2024 16:42:40 +0000 (17:42 +0100)
committerJens Axboe <axboe@kernel.dk>
Thu, 8 Feb 2024 17:12:01 +0000 (10:12 -0700)
commite5de34db1e95ef549236f9a2630d396a41c208a2
tree5e716ffd128ef4cbdc82668bb2051c91964674aa
parent052618c71c66d5de5e9b6cbcbad26932d951919c
s390/dasd: Simplify uid string generation

There are two variants of the device uid string. One containing the
virtual device unit information table (vduit) identifying the device as
a virtual device located on a real device in a z/VM environment. The
other variant does not contain those additional information.

Simplify the string generation with a shorter check of an existing vduit
embedded in the snprintf() calls.

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>
Link: https://lore.kernel.org/r/20240208164248.540985-2-sth@linux.ibm.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/s390/block/dasd_devmap.c
drivers/s390/block/dasd_eckd.c