public inbox for linux-pci@vger.kernel.org
 help / color / mirror / Atom feed
From: Bjorn Helgaas <helgaas@kernel.org>
To: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Cc: linux-pci@vger.kernel.org, linux-mediatek@lists.infradead.org
Subject: mt7621 static check warning
Date: Tue, 9 Jan 2024 17:51:48 -0600	[thread overview]
Message-ID: <20240109235148.GA2082000@bhelgaas> (raw)

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

             reply	other threads:[~2024-01-09 23:51 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-09 23:51 Bjorn Helgaas [this message]
2024-01-10  7:16 ` mt7621 static check warning Sergio Paracuellos
2024-01-10 21:23   ` Bjorn Helgaas

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240109235148.GA2082000@bhelgaas \
    --to=helgaas@kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=sergio.paracuellos@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox