All of lore.kernel.org
 help / color / mirror / Atom feed
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Cc: linux-media@vger.kernel.org, Arnd Bergmann <arnd@kernel.org>
Subject: Re: [PATCHv2 12/23] media: v4l2-subdev.h: increase struct v4l2_subdev name size
Date: Sat, 23 Sep 2023 21:11:28 +0300	[thread overview]
Message-ID: <20230923181128.GA22193@pendragon.ideasonboard.com> (raw)
In-Reply-To: <20230923152107.283289-13-hverkuil-cisco@xs4all.nl>

Hi Hans,

Thank you for the patch.

On Sat, Sep 23, 2023 at 05:20:56PM +0200, Hans Verkuil wrote:
> This resolves a lot of the string truncate compiler warnings.
> 
> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
> ---
>  drivers/staging/media/omap4iss/iss_csi2.c | 2 +-
>  include/media/v4l2-subdev.h               | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/staging/media/omap4iss/iss_csi2.c b/drivers/staging/media/omap4iss/iss_csi2.c
> index 04ce0e7eb557..d2844414de4f 100644
> --- a/drivers/staging/media/omap4iss/iss_csi2.c
> +++ b/drivers/staging/media/omap4iss/iss_csi2.c
> @@ -1260,7 +1260,7 @@ static int csi2_init_entities(struct iss_csi2_device *csi2, const char *subname)
>  	struct media_pad *pads = csi2->pads;
>  	struct media_entity *me = &sd->entity;
>  	int ret;
> -	char name[V4L2_SUBDEV_NAME_SIZE];
> +	char name[32];
>  
>  	v4l2_subdev_init(sd, &csi2_ops);
>  	sd->internal_ops = &csi2_internal_ops;
> diff --git a/include/media/v4l2-subdev.h b/include/media/v4l2-subdev.h
> index 5f59ff0796b7..5711354056b9 100644
> --- a/include/media/v4l2-subdev.h
> +++ b/include/media/v4l2-subdev.h
> @@ -951,7 +951,7 @@ struct v4l2_subdev_internal_ops {
>  	void (*release)(struct v4l2_subdev *sd);
>  };
>  
> -#define V4L2_SUBDEV_NAME_SIZE 32
> +#define V4L2_SUBDEV_NAME_SIZE 52

Can we allocate it dynamically instead ?

>  
>  /* Set this flag if this subdev is a i2c device. */
>  #define V4L2_SUBDEV_FL_IS_I2C			(1U << 0)

-- 
Regards,

Laurent Pinchart

  reply	other threads:[~2023-09-23 18:11 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-23 15:20 [PATCHv2 00/23] media: fix all string truncate warnings Hans Verkuil
2023-09-23 15:20 ` [PATCHv2 01/23] media: allegro-dvt: increase buffer size in msg_type_name() Hans Verkuil
2023-09-23 15:20 ` [PATCHv2 02/23] media: cadence: increase buffer size in csi2tx_get_resources() Hans Verkuil
2023-09-23 15:20 ` [PATCHv2 03/23] media: atomisp: ia_ccs_debug.c: increase enable_info buffer Hans Verkuil
2023-09-23 15:20 ` [PATCHv2 04/23] media: vivid: avoid integer overflow Hans Verkuil
2023-09-23 15:20 ` [PATCHv2 05/23] media: ipu-bridge: increase sensor_name size Hans Verkuil
2023-09-23 15:20 ` [PATCHv2 06/23] media: cx18: increase in_workq_name size Hans Verkuil
2023-09-23 15:20 ` [PATCHv2 07/23] media: rc: ati_remote: increase mouse_name buffer size Hans Verkuil
2023-09-23 15:20 ` [PATCHv2 08/23] media: cec.h: increase input_phys buffer Hans Verkuil
2023-09-23 15:20 ` [PATCHv2 09/23] media: renesas-ceu: keep input name simple Hans Verkuil
2023-09-23 15:20 ` [PATCHv2 10/23] media: zoran: increase name size Hans Verkuil
2023-09-23 15:20 ` [PATCHv2 11/23] media: v4l2-dev.h: increase struct video_device " Hans Verkuil
2023-09-24 10:55   ` Sakari Ailus
2023-09-25  6:28     ` Hans Verkuil
2023-09-23 15:20 ` [PATCHv2 12/23] media: v4l2-subdev.h: increase struct v4l2_subdev " Hans Verkuil
2023-09-23 18:11   ` Laurent Pinchart [this message]
2023-09-25  6:26     ` Hans Verkuil
2023-09-25  6:51       ` Arnd Bergmann
2023-09-23 15:20 ` [PATCHv2 13/23] media: use sizeof() instead of V4L2_SUBDEV_NAME_SIZE Hans Verkuil
2023-09-23 18:06   ` Laurent Pinchart
2023-09-23 19:33   ` Niklas Söderlund
2023-09-25  7:42   ` Maxime Ripard
2023-09-25 16:51   ` Luca Ceresoli
2023-09-26 10:29     ` Luca Ceresoli
2023-09-23 15:20 ` [PATCHv2 14/23] media: v4l2-device.h: drop V4L2_DEVICE_NAME_SIZE Hans Verkuil
2023-09-23 15:20 ` [PATCHv2 15/23] media: vivid: use VIVID_MODULE_NAME to fill bus_info Hans Verkuil
2023-09-23 15:21 ` [PATCHv2 16/23] media: microchip: don't set bus_info Hans Verkuil
2023-09-25 12:01   ` Nicolas Ferre
2023-09-23 15:21 ` [PATCHv2 17/23] media: rcar_drif: use explicit name for bus_info Hans Verkuil
2023-09-23 15:21 ` [PATCHv2 18/23] media: am437x: don't fill in bus_info Hans Verkuil
2023-09-25  7:45   ` Lad, Prabhakar
2023-09-23 15:21 ` [PATCHv2 19/23] media: atmel: drop bus_info Hans Verkuil
2023-09-25 12:01   ` Nicolas Ferre
2023-09-23 15:21 ` [PATCHv2 20/23] media: radio-isa: use dev_name to fill in bus_info Hans Verkuil
2023-09-23 15:21 ` [PATCHv2 21/23] media: radio-miropcm20: set bus_info to explicit name Hans Verkuil
2023-09-23 15:21 ` [PATCHv2 22/23] media: verisilicon: replace snprintf with strscpy+strlcat Hans Verkuil
2023-09-23 15:21 ` [PATCHv2 23/23] media: radio-si476x: don't fill in bus_info Hans Verkuil

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=20230923181128.GA22193@pendragon.ideasonboard.com \
    --to=laurent.pinchart@ideasonboard.com \
    --cc=arnd@kernel.org \
    --cc=hverkuil-cisco@xs4all.nl \
    --cc=linux-media@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 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.