Thread (26 messages) 26 messages, 5 authors, 2021-06-23
STALE1834d
Revisions (2)
  1. v1 [diff vs current]
  2. v2 current

[PATCH v2 06/10] target: reduce stack footprint in iblock_show_configfs_dev_params()

From: Anton Suvorov <hidden>
Date: 2021-06-22 17:45:02
Also in: linux-fsdevel, lkml
Subsystem: scsi target subsystem, the rest · Maintainers: "Martin K. Petersen", Linus Torvalds

Stack usage reduced (measured with allyesconfig):

./drivers/target/target_core_iblock.c   iblock_show_configfs_dev_params 192     56      -136

Signed-off-by: Anton Suvorov <redacted>
---
 drivers/target/target_core_iblock.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/target/target_core_iblock.c b/drivers/target/target_core_iblock.c
index 44d9d028f716..a95f0b9bccf8 100644
--- a/drivers/target/target_core_iblock.c
+++ b/drivers/target/target_core_iblock.c
@@ -634,12 +634,10 @@ static ssize_t iblock_show_configfs_dev_params(struct se_device *dev, char *b)
 {
 	struct iblock_dev *ib_dev = IBLOCK_DEV(dev);
 	struct block_device *bd = ib_dev->ibd_bd;
-	char buf[BDEVNAME_SIZE];
 	ssize_t bl = 0;
 
 	if (bd)
-		bl += sprintf(b + bl, "iBlock device: %s",
-				bdevname(bd, buf));
+		bl += sprintf(b + bl, "iBlock device: %pg", bd);
 	if (ib_dev->ibd_flags & IBDF_HAS_UDEV_PATH)
 		bl += sprintf(b + bl, "  UDEV PATH: %s",
 				ib_dev->ibd_udev_path);
-- 
2.25.1
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help