Replace snprintf("%s", ...) with the faster and more direct strscpy().
Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
Reviewed-by: Andreas Larsson <andreas@gaisler.com>
Signed-off-by: Andreas Larsson <andreas@gaisler.com>
#include <linux/kernel.h>
#include <linux/slab.h>
+#include <linux/string.h>
#include <linux/irq.h>
#include <linux/export.h>
#include <linux/init.h>
* the parent doesn't require the MD node info.
*/
if (node_name != NULL) {
- (void) snprintf(vdev->node_name, VIO_MAX_NAME_LEN, "%s",
- node_name);
+ strscpy(vdev->node_name, node_name);
err = mdesc_get_node_info(hp, mp, node_name,
&vdev->md_node_info);