All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ricardo Ribalda <ribalda@chromium.org>
To: Thierry Reding <thierry.reding@gmail.com>,
	 Jonathan Hunter <jonathanh@nvidia.com>,
	 Sowjanya Komatineni <skomatineni@nvidia.com>,
	 Luca Ceresoli <luca.ceresoli@bootlin.com>,
	 Mauro Carvalho Chehab <mchehab@kernel.org>,
	 Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	 Hans Verkuil <hverkuil@xs4all.nl>
Cc: linux-media@vger.kernel.org, linux-tegra@vger.kernel.org,
	 linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org,
	 Ricardo Ribalda <ribalda@chromium.org>
Subject: [PATCH v3 2/3] media: radio-shark2: Avoid led_names truncations
Date: Mon, 25 Mar 2024 14:50:24 +0000	[thread overview]
Message-ID: <20240325-gcc-arm-warnings-v3-2-81b8c10dc18a@chromium.org> (raw)
In-Reply-To: <20240325-gcc-arm-warnings-v3-0-81b8c10dc18a@chromium.org>

Increase the size of led_names so it can fit any valid v4l2 device name.

Fixes:
drivers/media/radio/radio-shark2.c:197:17: warning: ‘%s’ directive output may be truncated writing up to 35 bytes into a region of size 32 [-Wformat-truncation=]

Signed-off-by: Ricardo Ribalda <ribalda@chromium.org>
---
 drivers/media/radio/radio-shark2.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/media/radio/radio-shark2.c b/drivers/media/radio/radio-shark2.c
index f1c5c0a6a335c..e3e6aa87fe081 100644
--- a/drivers/media/radio/radio-shark2.c
+++ b/drivers/media/radio/radio-shark2.c
@@ -62,7 +62,7 @@ struct shark_device {
 #ifdef SHARK_USE_LEDS
 	struct work_struct led_work;
 	struct led_classdev leds[NO_LEDS];
-	char led_names[NO_LEDS][32];
+	char led_names[NO_LEDS][64];
 	atomic_t brightness[NO_LEDS];
 	unsigned long brightness_new;
 #endif

-- 
2.44.0.396.g6e790dbe36-goog


  parent reply	other threads:[~2024-03-25 14:50 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-25 14:50 [PATCH v3 0/3] media: Fix gcc warnings Ricardo Ribalda
2024-03-25 14:50 ` [PATCH v3 1/3] staging: media: tegra-video: Fix -Wmaybe-unitialized warn in gcc Ricardo Ribalda
2024-03-25 16:42   ` Luca Ceresoli
2024-03-25 14:50 ` Ricardo Ribalda [this message]
2024-03-25 14:50 ` [PATCH v3 3/3] media: dvbdev: Initialize sbuf Ricardo Ribalda

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=20240325-gcc-arm-warnings-v3-2-81b8c10dc18a@chromium.org \
    --to=ribalda@chromium.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=hverkuil@xs4all.nl \
    --cc=jonathanh@nvidia.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=linux-staging@lists.linux.dev \
    --cc=linux-tegra@vger.kernel.org \
    --cc=luca.ceresoli@bootlin.com \
    --cc=mchehab@kernel.org \
    --cc=skomatineni@nvidia.com \
    --cc=thierry.reding@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.