From: Takashi Iwai <tiwai@suse.de>
To: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Cc: tiwai@suse.com, perex@perex.cz, arnd@arndb.de,
masahiroy@kernel.org, linux-kernel@vger.kernel.org,
alsa-devel@alsa-project.org,
pierre-louis.bossart@linux.intel.com
Subject: Re: [PATCH] ALSA: hda: intel-sdw-acpi: Use u8 type for link index
Date: Wed, 13 Sep 2023 09:43:34 +0200 [thread overview]
Message-ID: <87y1ha4ixl.wl-tiwai@suse.de> (raw)
In-Reply-To: <20230912162617.29178-1-peter.ujfalusi@linux.intel.com>
On Tue, 12 Sep 2023 18:26:17 +0200,
Peter Ujfalusi wrote:
>
> Use consistently u8 for sdw link index. The id is limited to 4, u8 is
> adequate in size to store it.
>
> This change will also fixes the following compiler warning/error (W=1):
>
> sound/hda/intel-sdw-acpi.c: In function ‘sdw_intel_acpi_scan’:
> sound/hda/intel-sdw-acpi.c:34:35: error: ‘-subproperties’ directive output may be truncated writing 14 bytes into a region of size between 7 and 17 [-Werror=format-truncation=]
> 34 | "mipi-sdw-link-%d-subproperties", i);
> | ^~~~~~~~~~~~~~
> In function ‘is_link_enabled’,
> inlined from ‘sdw_intel_scan_controller’ at sound/hda/intel-sdw-acpi.c:106:8,
> inlined from ‘sdw_intel_acpi_scan’ at sound/hda/intel-sdw-acpi.c:180:9:
> sound/hda/intel-sdw-acpi.c:33:9: note: ‘snprintf’ output between 30 and 40 bytes into a destination of size 32
> 33 | snprintf(name, sizeof(name),
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
> 34 | "mipi-sdw-link-%d-subproperties", i);
> | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> cc1: all warnings being treated as errors
>
> The warnings got brought to light by a recent patch upstream:
> commit 6d4ab2e97dcf ("extrawarn: enable format and stringop overflow warnings in W=1")
>
> Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Thanks, applied now.
Takashi
prev parent reply other threads:[~2023-09-13 7:43 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-12 16:26 Peter Ujfalusi
2023-09-12 17:33 ` Pierre-Louis Bossart
2023-09-13 7:43 ` Takashi Iwai [this message]
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=87y1ha4ixl.wl-tiwai@suse.de \
--to=tiwai@suse.de \
--cc=alsa-devel@alsa-project.org \
--cc=arnd@arndb.de \
--cc=linux-kernel@vger.kernel.org \
--cc=masahiroy@kernel.org \
--cc=perex@perex.cz \
--cc=peter.ujfalusi@linux.intel.com \
--cc=pierre-louis.bossart@linux.intel.com \
--cc=tiwai@suse.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
all inboxes | Powered by JetHome®