Commit 35c9ffba authored by Jakub Kicinski's avatar Jakub Kicinski
Browse files

Merge branch 'bnxt_en-address-string-truncation'

Simon Horman says:

====================
bnxt_en: address string truncation

This series addresses several string truncation issues that are flagged
by gcc-14. I do not have any reason to believe these are bugs, so I am
targeting this at net-next and have not provided Fixes tags.

v1: https://lore.kernel.org/r/20240705-bnxt-str-v1-0-bafc769ed89e@kernel.org
====================

Link: https://patch.msgid.link/20240813-bnxt-str-v2-0-872050a157e7@kernel.org


Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parents 2984e69a 1418e9ab
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -64,9 +64,9 @@ static const struct file_operations debugfs_dim_fops = {
static void debugfs_dim_ring_init(struct dim *dim, int ring_idx,
				  struct dentry *dd)
{
	static char qname[16];
	static char qname[12];

	snprintf(qname, 10, "%d", ring_idx);
	snprintf(qname, sizeof(qname), "%d", ring_idx);
	debugfs_create_file(qname, 0600, dd, dim, &debugfs_dim_fops);
}

+1 −1
Original line number Diff line number Diff line
@@ -4161,7 +4161,7 @@ static void bnxt_get_pkgver(struct net_device *dev)

	if (!bnxt_get_pkginfo(dev, buf, sizeof(buf))) {
		len = strlen(bp->fw_ver_str);
		snprintf(bp->fw_ver_str + len, FW_VER_STR_LEN - len - 1,
		snprintf(bp->fw_ver_str + len, FW_VER_STR_LEN - len,
			 "/pkg %s", buf);
	}
}