[PATCH 0/6] media: string truncate warnings: increase name fields

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a second batch of patches: the first 3 fix some more low-hanging
fruit that I missed in the first round.

The next two patches increase two internal name fields: one
in struct video_device and one in struct v4l2_subdev.

Generally speaking: 
 
sizeof(v4l2_device.name) < sizeof(v4l2_subdev.name) < sizeof(video_device.name)

With this patch series these become:

36 < 52 < 64.

The exact sizes are a bit trial and error, I'm afraid.

Typically v4l2_subdev.name uses v4l2_device.name with some extra text,
and the same happens for video_device.name.

The last patch removes V4L2_SUBDEV_NAME_SIZE and replaces all uses of
it by sizeof(), which is much safer than relying on a define.

With these changes I am left with 11 warnings, 10 of which are bus_info
related (uAPI). Especially for the platform devices this can likely
be dropped altogether since today it is filled in by the core for
platform devices.

Something to look at in the next round.

Regards,

	Hans

Hans Verkuil (6):
  media: cec.h: increase input_phys buffer
  media: renesas-ceu: keep input name simple
  media: zoran: increase name size
  media: v4l2-dev.h: increase struct video_device name size
  media: v4l2-subdev.h: increase struct v4l2_subdev name size
  media: use sizeof() instead of V4L2_SUBDEV_NAME_SIZE

 drivers/media/i2c/msp3400-driver.c                  | 2 +-
 drivers/media/pci/zoran/zoran.h                     | 2 +-
 drivers/media/platform/cadence/cdns-csi2rx.c        | 4 ++--
 drivers/media/platform/cadence/cdns-csi2tx.c        | 4 ++--
 drivers/media/platform/renesas/rcar-isp.c           | 2 +-
 drivers/media/platform/renesas/rcar-vin/rcar-csi2.c | 2 +-
 drivers/media/platform/renesas/renesas-ceu.c        | 6 +-----
 drivers/media/platform/ti/omap3isp/ispstat.c        | 2 +-
 drivers/staging/media/omap4iss/iss_csi2.c           | 2 +-
 drivers/staging/media/tegra-video/csi.c             | 4 ++--
 drivers/staging/media/tegra-video/vip.c             | 2 +-
 include/media/cec.h                                 | 2 +-
 include/media/v4l2-dev.h                            | 2 +-
 include/media/v4l2-subdev.h                         | 4 +---
 14 files changed, 17 insertions(+), 23 deletions(-)

-- 
2.40.1




[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux