use precision to cap length of firmware strings

It is the precision not field width in the format
which limits length of printed string.

Fixes: 28f93be713 ("remove get_string helper")
Signed-off-by: Jakub Kicinski <[email protected]>
This commit is contained in:
Jakub Kicinski
2015-02-23 19:00:07 +01:00
parent 9553279f3d
commit 295951c20a
+2 -2
View File
@@ -161,7 +161,7 @@ mt76pci_load_rom_patch(struct mt76_dev *dev)
} }
hdr = (struct mt76_patch_header *) fw->data; hdr = (struct mt76_patch_header *) fw->data;
printk("ROM patch build: %15s\n", hdr->build_time); printk("ROM patch build: %.15s\n", hdr->build_time);
mt76_wr(dev, MT_MCU_PCIE_REMAP_BASE4, MT_MCU_ROM_PATCH_OFFSET); mt76_wr(dev, MT_MCU_PCIE_REMAP_BASE4, MT_MCU_ROM_PATCH_OFFSET);
@@ -217,7 +217,7 @@ mt76pci_load_firmware(struct mt76_dev *dev)
val = le16_to_cpu(hdr->build_ver); val = le16_to_cpu(hdr->build_ver);
printk("Build: %x\n", val); printk("Build: %x\n", val);
printk("Build Time: %16s\n", hdr->build_time); printk("Build Time: %.16s\n", hdr->build_time);
cur = (__le32 *) (fw->data + sizeof(*hdr)); cur = (__le32 *) (fw->data + sizeof(*hdr));
len = le32_to_cpu(hdr->ilm_len); len = le32_to_cpu(hdr->ilm_len);