linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff Johnson <quic_jjohnson@quicinc.com>
To: Kalle Valo <kvalo@kernel.org>, <ath11k@lists.infradead.org>
Cc: <linux-wireless@vger.kernel.org>
Subject: Re: [PATCH] wifi: ath11k: ath11k_debugfs_register(): fix format-truncation warning
Date: Tue, 10 Oct 2023 08:23:16 -0700	[thread overview]
Message-ID: <2c08791e-44b7-444e-9fb6-a828d849a67b@quicinc.com> (raw)
In-Reply-To: <20231010062250.2580951-1-kvalo@kernel.org>

On 10/9/2023 11:22 PM, Kalle Valo wrote:
> From: Kalle Valo <quic_kvalo@quicinc.com>
> 
> In v6.6-rc4 with GCC 13.2 I see a new warning:
> 
> drivers/net/wireless/ath/ath11k/debugfs.c: In function 'ath11k_debugfs_register':
> drivers/net/wireless/ath/ath11k/debugfs.c:1597:51: error: '%d' directive output may be truncated writing between 1 and 3 bytes into a region of size 2 [-Werror=format-truncation=]
> drivers/net/wireless/ath/ath11k/debugfs.c:1597:48: note: directive argument in the range [0, 255]
> drivers/net/wireless/ath/ath11k/debugfs.c:1597:9: note: 'snprintf' output between 5 and 7 bytes into a destination of size 5
> 
> Increase the size of pdev_name to 10 bytes to make sure there's enough room for
> the string. Also change the format to '%u' as ar->pdev_idx is u8.
> 
> Compile tested only.
> 
> Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
Reviewed-by: Jeff Johnson <quic_jjohnson@quicinc.com>


  reply	other threads:[~2023-10-10 15:24 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-10  6:22 [PATCH] wifi: ath11k: ath11k_debugfs_register(): fix format-truncation warning Kalle Valo
2023-10-10 15:23 ` Jeff Johnson [this message]
2023-10-12 16:04 ` Kalle Valo

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=2c08791e-44b7-444e-9fb6-a828d849a67b@quicinc.com \
    --to=quic_jjohnson@quicinc.com \
    --cc=ath11k@lists.infradead.org \
    --cc=kvalo@kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).