public inbox for linux-pci@vger.kernel.org
 help / color / mirror / Atom feed
* mt7621 static check warning
@ 2024-01-09 23:51 Bjorn Helgaas
  2024-01-10  7:16 ` Sergio Paracuellos
  0 siblings, 1 reply; 3+ messages in thread
From: Bjorn Helgaas @ 2024-01-09 23:51 UTC (permalink / raw)
  To: Sergio Paracuellos; +Cc: linux-pci, linux-mediatek

Hi Sergio,

FYI:

  $ make W=1 drivers/pci/
    CC      drivers/pci/controller/pcie-mt7621.o
  drivers/pci/controller/pcie-mt7621.c: In function ‘mt7621_pcie_probe’:
  drivers/pci/controller/pcie-mt7621.c:228:49: error: ‘snprintf’ output may be truncated before the last format character [-Werror=format-truncation=]
    228 |         snprintf(name, sizeof(name), "pcie-phy%d", slot);
	|                                                 ^
  drivers/pci/controller/pcie-mt7621.c:228:9: note: ‘snprintf’ output between 10 and 11 bytes into a destination of size 10
    228 |         snprintf(name, sizeof(name), "pcie-phy%d", slot);
	|         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

I know we'll never actually hit this, but it'd be nice to clean this
up, and I don't think it would really cost us anything.  I think it's
currently the only "W=1" warning in drivers/pci/.

Bjorn

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-01-10 21:23 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-01-09 23:51 mt7621 static check warning Bjorn Helgaas
2024-01-10  7:16 ` Sergio Paracuellos
2024-01-10 21:23   ` Bjorn Helgaas

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox