[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20220428033533.249463-1-zhangxuezhi1@coolpad.com>
Date: Thu, 28 Apr 2022 03:35:33 +0000
From: Xuezhi Zhang <zhangxuezhi1@...lpad.com>
To: stefanr@...6.in-berlin.de
Cc: linux1394-devel@...ts.sourceforge.net,
linux-kernel@...r.kernel.org,
Xuezhi Zhang <zhangxuezhi1@...lpad.com>
Subject: [PATCH] firewire: core: convert snprintf to sysfs_emit
Fix the following coccicheck warning:
drivers/firewire/core-device.c:375:8-16:
WARNING: use scnprintf or sprintf
Signed-off-by: Xuezhi Zhang <zhangxuezhi1@...lpad.com>
---
drivers/firewire/core-device.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/firewire/core-device.c b/drivers/firewire/core-device.c
index 90ed8fdaba75..5ad373419d00 100644
--- a/drivers/firewire/core-device.c
+++ b/drivers/firewire/core-device.c
@@ -372,7 +372,7 @@ static ssize_t rom_index_show(struct device *dev,
struct fw_device *device = fw_device(dev->parent);
struct fw_unit *unit = fw_unit(dev);
- return snprintf(buf, PAGE_SIZE, "%d\n",
+ return sysfs_emit(buf, "%d\n",
(int)(unit->directory - device->config_rom));
}
--
2.25.1
Powered by blists - more mailing lists