* [PATCH v2 0/2] media: Fix gcc8 warnings
@ 2025-04-01 14:17 Ricardo Ribalda
2025-04-01 14:17 ` [PATCH v2 1/2] media: atomisp: Fix Wformat-truncation warning Ricardo Ribalda
2025-04-01 14:17 ` [PATCH v2 2/2] media: cec: extron-da-hd-4k-plus: Fix Wformat-truncation Ricardo Ribalda
0 siblings, 2 replies; 4+ messages in thread
From: Ricardo Ribalda @ 2025-04-01 14:17 UTC (permalink / raw)
To: Hans Verkuil, Mauro Carvalho Chehab, Hans de Goede, Sakari Ailus,
Andy Shevchenko, Greg Kroah-Hartman
Cc: linux-media, linux-kernel, linux-staging, Ricardo Ribalda
Kernel 6.14 has increased its minimum gcc requirements. After bumping
the "ancient" test in media-ci 2 new warnings have been found. Let's try
to fix them.
Signed-off-by: Ricardo Ribalda <ribalda@chromium.org>
---
Changes in v2:
- Incorporate Hans changes.
- Add comment (Thanks Andy).
- EDITME: describe what is new in this series revision.
- EDITME: use bulletpoints and terse descriptions.
- Link to v1: https://lore.kernel.org/r/20250331-v614-v1-0-9bc69a873720@chromium.org
---
Hans Verkuil (1):
media: cec: extron-da-hd-4k-plus: Fix Wformat-truncation
Ricardo Ribalda (1):
media: atomisp: Fix Wformat-truncation warning
drivers/media/cec/usb/extron-da-hd-4k-plus/extron-da-hd-4k-plus.c | 4 ++--
drivers/staging/media/atomisp/pci/runtime/debug/src/ia_css_debug.c | 3 ++-
2 files changed, 4 insertions(+), 3 deletions(-)
---
base-commit: 4e82c87058f45e79eeaa4d5bcc3b38dd3dce7209
change-id: 20250331-v614-8485d3382935
Best regards,
--
Ricardo Ribalda <ribalda@chromium.org>
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH v2 1/2] media: atomisp: Fix Wformat-truncation warning
2025-04-01 14:17 [PATCH v2 0/2] media: Fix gcc8 warnings Ricardo Ribalda
@ 2025-04-01 14:17 ` Ricardo Ribalda
2025-04-02 10:42 ` Andy Shevchenko
2025-04-01 14:17 ` [PATCH v2 2/2] media: cec: extron-da-hd-4k-plus: Fix Wformat-truncation Ricardo Ribalda
1 sibling, 1 reply; 4+ messages in thread
From: Ricardo Ribalda @ 2025-04-01 14:17 UTC (permalink / raw)
To: Hans Verkuil, Mauro Carvalho Chehab, Hans de Goede, Sakari Ailus,
Andy Shevchenko, Greg Kroah-Hartman
Cc: linux-media, linux-kernel, linux-staging, Ricardo Ribalda
Gcc8 is convinced that we do not have enough space in dot_id_input_bin.
Extend the variable 17 bytes which is just used for debugging.
drivers/staging/media/atomisp/pci/runtime/debug/src/ia_css_debug.c:1336:9: warning: '(pipe' directive output may be truncated writing 5 bytes into a region of size between 1 and 74 [-Wformat-truncation=]
Signed-off-by: Ricardo Ribalda <ribalda@chromium.org>
---
drivers/staging/media/atomisp/pci/runtime/debug/src/ia_css_debug.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/staging/media/atomisp/pci/runtime/debug/src/ia_css_debug.c b/drivers/staging/media/atomisp/pci/runtime/debug/src/ia_css_debug.c
index 9818771a35e550c0ce98da826caff5f834867e7c..84220359c9576b0021ea7ac7ba13548bd77e49fd 100644
--- a/drivers/staging/media/atomisp/pci/runtime/debug/src/ia_css_debug.c
+++ b/drivers/staging/media/atomisp/pci/runtime/debug/src/ia_css_debug.c
@@ -121,7 +121,8 @@ static const char *const pipe_id_to_str[] = {
/* [IA_CSS_PIPE_ID_YUVPP] =*/ "yuvpp",
};
-static char dot_id_input_bin[SH_CSS_MAX_BINARY_NAME + 10];
+/* 27 is combined length of _stage%d(pipe%d)\0. */
+static char dot_id_input_bin[SH_CSS_MAX_BINARY_NAME + 27];
static char ring_buffer[200];
void ia_css_debug_dtrace(unsigned int level, const char *fmt, ...)
--
2.49.0.472.ge94155a9ec-goog
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH v2 2/2] media: cec: extron-da-hd-4k-plus: Fix Wformat-truncation
2025-04-01 14:17 [PATCH v2 0/2] media: Fix gcc8 warnings Ricardo Ribalda
2025-04-01 14:17 ` [PATCH v2 1/2] media: atomisp: Fix Wformat-truncation warning Ricardo Ribalda
@ 2025-04-01 14:17 ` Ricardo Ribalda
1 sibling, 0 replies; 4+ messages in thread
From: Ricardo Ribalda @ 2025-04-01 14:17 UTC (permalink / raw)
To: Hans Verkuil, Mauro Carvalho Chehab, Hans de Goede, Sakari Ailus,
Andy Shevchenko, Greg Kroah-Hartman
Cc: linux-media, linux-kernel, linux-staging, Ricardo Ribalda
From: Hans Verkuil <hverkuil@xs4all.nl>
Fix gcc8 warning:
drivers/media/cec/usb/extron-da-hd-4k-plus/extron-da-hd-4k-plus.c:1014:44: warning: 'DCEC' directive output may be truncated writing 4 bytes into a region of size between 0 and 53 [-Wformat-truncation=]
Resizing the 'buf' and 'cmd' arrays fixed the warning.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Ricardo Ribalda <ribalda@chromium.org>
---
drivers/media/cec/usb/extron-da-hd-4k-plus/extron-da-hd-4k-plus.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/media/cec/usb/extron-da-hd-4k-plus/extron-da-hd-4k-plus.c b/drivers/media/cec/usb/extron-da-hd-4k-plus/extron-da-hd-4k-plus.c
index cfbfc4c1b2e67fec9434aa6852ab465ad8c11225..41d019b01ec09d1d3e72c89155042888b7948463 100644
--- a/drivers/media/cec/usb/extron-da-hd-4k-plus/extron-da-hd-4k-plus.c
+++ b/drivers/media/cec/usb/extron-da-hd-4k-plus/extron-da-hd-4k-plus.c
@@ -1002,8 +1002,8 @@ static int extron_cec_adap_transmit(struct cec_adapter *adap, u8 attempts,
u32 signal_free_time, struct cec_msg *msg)
{
struct extron_port *port = cec_get_drvdata(adap);
- char buf[CEC_MAX_MSG_SIZE * 3 + 1];
- char cmd[CEC_MAX_MSG_SIZE * 3 + 13];
+ char buf[(CEC_MAX_MSG_SIZE - 1) * 3 + 1];
+ char cmd[sizeof(buf) + 14];
unsigned int i;
if (port->disconnected)
--
2.49.0.472.ge94155a9ec-goog
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH v2 1/2] media: atomisp: Fix Wformat-truncation warning
2025-04-01 14:17 ` [PATCH v2 1/2] media: atomisp: Fix Wformat-truncation warning Ricardo Ribalda
@ 2025-04-02 10:42 ` Andy Shevchenko
0 siblings, 0 replies; 4+ messages in thread
From: Andy Shevchenko @ 2025-04-02 10:42 UTC (permalink / raw)
To: Ricardo Ribalda
Cc: Hans Verkuil, Mauro Carvalho Chehab, Hans de Goede, Sakari Ailus,
Greg Kroah-Hartman, linux-media, linux-kernel, linux-staging
On Tue, Apr 01, 2025 at 02:17:54PM +0000, Ricardo Ribalda wrote:
> Gcc8 is convinced that we do not have enough space in dot_id_input_bin.
> Extend the variable 17 bytes which is just used for debugging.
>
> drivers/staging/media/atomisp/pci/runtime/debug/src/ia_css_debug.c:1336:9: warning: '(pipe' directive output may be truncated writing 5 bytes into a region of size between 1 and 74 [-Wformat-truncation=]
Note, you may drop the drivers/staging/media/ as the driver is unique enough.
Reviewed-by: Andy Shevchenko <andy@kernel.org>
...
You also want to send this patch separately since the AtomISP has its own
MAINTAINERS record (and there are patches in the queue there, IIRC).
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2025-04-02 10:42 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-01 14:17 [PATCH v2 0/2] media: Fix gcc8 warnings Ricardo Ribalda
2025-04-01 14:17 ` [PATCH v2 1/2] media: atomisp: Fix Wformat-truncation warning Ricardo Ribalda
2025-04-02 10:42 ` Andy Shevchenko
2025-04-01 14:17 ` [PATCH v2 2/2] media: cec: extron-da-hd-4k-plus: Fix Wformat-truncation Ricardo Ribalda
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).